-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Logs+] Create an integration while on-boarding logs #163219
[Logs+] Create an integration while on-boarding logs #163219
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
0b9b881
to
4a6e396
Compare
e4416ee
to
dc77da0
Compare
Pinging @elastic/infra-monitoring-ui (Team:Infra Monitoring UI) |
.../fleet/server/services/epm/packages/custom_integrations/validation/check_naming_collision.ts
Outdated
Show resolved
Hide resolved
Pinging @elastic/fleet (Team:Fleet) |
...plugins/observability_onboarding/public/components/app/custom_logs/wizard/configure_logs.tsx
Outdated
Show resolved
Hide resolved
When installing system integration (for system logs onboarding) we are showing this to the user Maybe it's worthy to align in that matter, though not a blocker for this PR. |
@yngrdyn Thanks for the heads-up, I'll match the messaging. |
…erry350/kibana into 161960-onboarding-integration-creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
.../fleet/server/services/epm/packages/custom_integrations/validation/check_naming_collision.ts
Outdated
Show resolved
Hide resolved
…n logic to include all installations
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @Kerry350 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the changes!
Summary
This closes #161960, a basic integration will now be created whilst onboarding logs (though the custom logs flow).
This implements the initial version of this work, and does not include things like adding a dataset to an existing integration.
UI / UX
General:
Naming conflict errors:
Lack of permissions error:
General errors:
Success callout on the next panel:
Delete previous flow (happens in the background):
Pointers for reviewers / next steps
This PR also creates a new package for the
useTrackedPromise
hook, as this is used in several places and I didn't want to just duplicate it again (I haven't replaced other current uses in this PR, but will as a followup).useFetcher
was avoided as A) it's very tightly coupled with the observability onboarding server route repository (andcallApi
is scoped to this) and I wanted to call an "external" API in Fleet and B) I wanted explicit control over when the request is dispatched (not on mount), and whilst this can sort of be achieved by not returning a promise from the callback it gets quite messy. I also wanted more granular error handling control.Moving forward I think we'll need to enhance the state management of the plugin. We'll want to add the ability to "add to existing integration" and this is going to make the state more complex (even with chunks of this functionality likely moved to it's own package). I did actually have the Wizard state moved in to a constate container at one point (as a starter) but I reverted this commit to make the changeset less intrusive. It's for this same reason that, for now, I haven't focussed too closely on extracting things like generating the friendly error messages etc as we'll likely want to extract some of the "create integration" hooks / UI in to a standalone package so they can be used elsewhere (not just onboarding). There are also quite a few
eslint-disable-next-line react-hooks/exhaustive-deps
rules in the plugin at the moment due to the references not being stable, we could improve that at the same time as any state changes.You can technically navigate directly to
/fox/app/observabilityOnboarding/customLogs/installElasticAgent
, but no state is stored in the URL, so nothing is rehydrated resulting in a very empty configuration. I'm not entirely sure this is a behaviour we want, but for now I've just made the callout conditional on state existing (so coming from the previous panel).The Fleet custom integrations API now throws a 409 (conflict) when using a name that already exists.
Testing
/app/observabilityOnboarding
to trigger the onboarding flowapi/fleet/epm/custom_integrations
)In progress
Two changes still in progress, but they don't need to hold up the review (8.10 coming soon 👀):To have a friendlier error for permissions issues (not just "forbidden")Fleet API integration test for the naming collision