Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GenAI] Integration assistant UI #184546

Closed
wants to merge 151 commits into from

Conversation

semd
Copy link
Contributor

@semd semd commented May 30, 2024

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

P1llus and others added 30 commits May 24, 2024 14:07
@semd
Copy link
Contributor Author

semd commented Jun 13, 2024

/ci

@semd
Copy link
Contributor Author

semd commented Jun 13, 2024

/ci

@semd
Copy link
Contributor Author

semd commented Jun 13, 2024

/ci

@semd
Copy link
Contributor Author

semd commented Jun 13, 2024

/ci

@semd
Copy link
Contributor Author

semd commented Jun 13, 2024

/ci

@semd
Copy link
Contributor Author

semd commented Jun 13, 2024

/ci

spong pushed a commit that referenced this pull request Jun 13, 2024
## Summary

This is a PR to add a new backend plugin (frontend will be done in
separate [PR](#184546)).

The purpose of the plugin is to provide a set of API routes that is used
to perform a variety of GenAI workflows to generate new integrations
based on provided inputs.

It reuses the existing GenAI connectors for its LLM communication, and
provides a set of API's to create ECS mapping, Categorization, Related
Fields and an API to generate the actual integration package zip, which
is forwarded to the UI component.

### Planned follow-up changes:

As the PR is getting way too large, some planned changes would be added
in much smaller follow-ups. This includes mostly more improved try/catch
for certain routes, adding debug/error log entries where relevant,
especially for the API endpoints themself, some more unit and end2end
tests.

- OpenAPI spec for the API will be handled in a separate PR
- All the missing unit tests will be added as a followup PR

### Testing

The `integration_assistant` plugin will be disabled by default while
it's being implemented so we can iterate and merge partial PRs without
interfering with the releases. This config will work as our feature
flag:


https://github.com/elastic/kibana/blob/6aefd4ff7be57d88936e71fbd6c22ed094d13676/x-pack/plugins/integration_assistant/server/config.ts#L11-L13

To test it add this to your _kibana.dev.yml_:
```
xpack.integration_assistant.enabled: true
```

### Checklist

Delete any items that are not applicable to this PR.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces—unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes—Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Patryk Kopycinski <[email protected]>
Co-authored-by: Sergi Massaneda <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Bharat Pasupula <[email protected]>
Co-authored-by: Bharat Pasupula <[email protected]>
@semd
Copy link
Contributor Author

semd commented Jun 17, 2024

/ci

@semd
Copy link
Contributor Author

semd commented Jun 17, 2024

/ci

@semd
Copy link
Contributor Author

semd commented Jun 17, 2024

/ci

@kibana-ci
Copy link
Collaborator

kibana-ci commented Jun 17, 2024

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #88 / Actions get should handle get a preconfigured connector
  • [job] [logs] FTR Configs #88 / Actions get should handle get a preconfigured connector
  • [job] [logs] FTR Configs #14 / alerting api integration security and spaces enabled - Group 2 Connectors get superuser at space1 should handle get preconfigured action request appropriately
  • [job] [logs] FTR Configs #24 / alerting api integration security and spaces enabled - Group 2 Connectors get superuser at space1 should handle get preconfigured action request appropriately
  • [job] [logs] FTR Configs #14 / alerting api integration security and spaces enabled - Group 2 Connectors get superuser at space1 should handle get preconfigured action request appropriately
  • [job] [logs] FTR Configs #24 / alerting api integration security and spaces enabled - Group 2 Connectors get superuser at space1 should handle get preconfigured action request appropriately
  • [job] [logs] Jest Tests #13 / get() does not throw when getting a system action if throwIfSystemAction=false
  • [job] [logs] Jest Tests #13 / get() does not throw when getting a system action if throwIfSystemAction=false
  • [job] [logs] Jest Tests #13 / get() return predefined action with id
  • [job] [logs] Jest Tests #13 / get() return predefined action with id
  • [job] [logs] FTR Configs #90 / lens app - TSVB Open in Lens Dashboard to TSVB to Lens should convert a by reference TSVB viz to a Lens viz

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 1032 1033 +1
integrationAssistant - 494 +494
total +495

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/doc-links 77 78 +1
@kbn/elastic-assistant 138 139 +1
fleet 1216 1218 +2
integrationAssistant 69 80 +11
total +15

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.4MB 1.4MB +817.0B
integrationAssistant - 977.5KB ⚠️ +977.5KB
lists 142.3KB 142.4KB +112.0B
securitySolution 13.6MB 13.6MB +263.0B
total ⚠️ +978.7KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
integrationAssistant 0 1 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 415.4KB 415.5KB +112.0B
fleet 165.8KB 165.8KB +67.0B
integrationAssistant - 6.0KB +6.0KB
securitySolutionServerless 20.1KB 20.2KB +75.0B
total +6.3KB
Unknown metric groups

API count

id before after diff
@kbn/doc-links 77 78 +1
@kbn/elastic-assistant 165 166 +1
fleet 1337 1339 +2
integrationAssistant 69 80 +11
total +15

async chunk count

id before after diff
integrationAssistant - 4 +4

ESLint disabled line counts

id before after diff
integrationAssistant 2 4 +2

miscellaneous assets size

id before after diff
integrationAssistant - 250.8KB ⚠️ +250.8KB

Total ESLint disabled count

id before after diff
integrationAssistant 5 7 +2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @semd

@semd semd removed ci:cloud-deploy Create or update a Cloud deployment ci:cloud-persist-deployment Persist cloud deployment indefinitely labels Jun 20, 2024
@semd semd closed this Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants