-
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
[Fleet] Use optimistic locking when updating installed_es
on input package policy creation
#148883
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hop-dev
added
the
Team:Fleet
Team label for Observability Data Collection Fleet team
label
Jan 13, 2023
hop-dev
added
the
release_note:skip
Skip the PR/issue when compiling release notes
label
Jan 13, 2023
5 tasks
hop-dev
force-pushed
the
145529-input-pkg-asset-race
branch
from
January 19, 2023 10:03
3a55996
to
3ffceda
Compare
Pinging @elastic/fleet (Team:Fleet) |
nchaulet
reviewed
Jan 19, 2023
nchaulet
approved these changes
Jan 19, 2023
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.
Maybe worth adding a unit test, to prevent removing that feature by mistake? Otherwise LGTM 🚀
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @hop-dev |
kibanamachine
added
v8.7.0
backport:skip
This commit does not require backporting
labels
Jan 24, 2023
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Jan 24, 2023
* main: (54 commits) [APM] Allow calling `createInternalESClient` without `context` (elastic#149320) [Synthetics] Errors list active state (elastic#149387) [FTRs] Execution Context: fix no data flakiness (elastic#149406) [Cloud Posture] - Deprecate csp rule remove migration object (elastic#148530) Bump elasticsearch-js to 8.6.0-canary.3 (elastic#148521) [Fleet] Use optimistic locking when updating `installed_es` on input package policy creation (elastic#148883) [ML] Remove job_type from job definitions in modules (elastic#149247) [ML] Consolidate `query_utils` into package `@kbn/ml-query-utils` (elastic#149224) [Synthetics] Better formatting for waterfall timeline tooltips (elastic#149142) [Cloud Posture] CIS AWS support - changes to findings tables (elastic#148945) [Lens] Enable previous time shift when using a date histogram (elastic#149126) [Synthetics] Object types panel and thresholds (elastic#149099) [Fleet] added back batch exec for update tags (elastic#148618) 148790 - Fix scroll style for setup guide flyout (elastic#149242) Fix a11y issue with dev tool tabs (elastic#149349) [APM] Fix mobile indices (elastic#149230) [Dashboard] Fix Phrase_filter query for scripted fields (elastic#148942) (elastic#148943) renderCustomActionsRow with named params instead of args (elastic#149304) [ML] Adding ML execution context to es requests (elastic#148746) [Custom Branding] Replace EuiLoadingElastic with EuiLoadingSpinner (elastic#149261) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport:skip
This commit does not require backporting
release_note:skip
Skip the PR/issue when compiling release notes
Team:Fleet
Team label for Observability Data Collection Fleet team
v8.7.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Part of #145529
When creating an input package policy, we now create index templates and ingest pipelines. As part of this operation we have to update installed_es on the installation saved object, there is a risk of lost updates if multiple package policies are created at the same time, to combat this i have used the in built saved object optimistic concurrency.
I have tested this locally, we do start see conflicts occur if I create 500 package policies in concurrent batches of 25, but I think we should have a dedicated bulk endpoint if we want to handle more than that.
I haven't pushed the automated tests as they take a few minutes to run and I don't think there is a big enough benefit to running them as part of CI every time.