-
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] Allow bundled installs to occur even if EPR is unreachable #125127
Merged
kpollich
merged 40 commits into
elastic:main
from
kpollich:125097-prevent-registry-network-errors-blocking-fleet-bulk-install
Feb 16, 2022
Merged
Changes from 7 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
1d75cc6
Allow bundled installs to occur even if EPR is unreachable
kpollich 68ad69a
Fix type errors in test
kpollich c69c92a
Fix failing test
kpollich c09df4f
fixup! Fix failing test
kpollich 8056bba
Remove unused object in mock
kpollich aba45c7
Make creation of preconfigured agent policy functional
kpollich 928b7ef
Always fall back to bundled packages if available
kpollich 13e218d
Remove unused import
kpollich e2f2fea
Use packageInfo object instead of RegistryPackage where possible
kpollich bac2d46
Fix type error in assets test
kpollich f833166
Fix test timeouts
kpollich bdcc878
Fix promise logic for registry fetch fallback
kpollich e23ddbb
Merge branch 'main' into 125097-prevent-registry-network-errors-block…
kpollich af1d13c
Merge branch 'main' into 125097-prevent-registry-network-errors-block…
kpollich 49be525
Use archive package as default in create package policy
kpollich f165e5d
Always install from bundled package if it exists - regardless of inst…
kpollich 132b81d
Clean up + refactor a bit
kpollich ecfa6fa
Default to cached package archive for policy updates
kpollich b4d244c
Merge branch 'main' into 125097-prevent-registry-network-errors-block…
kibanamachine 8634894
Update mock in get.test.ts
kpollich 80f3e65
Add test for install from bundled package logic
kpollich 1f2dfe3
Merge branch 'main' into 125097-prevent-registry-network-errors-block…
kibanamachine 61fa10e
Merge branch 'main' into 125097-prevent-registry-network-errors-block…
kibanamachine 670d24c
Merge branch 'main' into 125097-prevent-registry-network-errors-block…
kpollich 8f0ad33
Delete timeout call in security solution tests
kpollich 84751f1
Merge branch 'main' into 125097-prevent-registry-network-errors-block…
kibanamachine d192922
Fix unused var in endpoint test
kpollich 840c4ec
Fix another unused var in endpoint test
kpollich 513dcc1
[Debug] Add some logging to test installation times in CI
kpollich 21baf09
Revert "[Debug] Add some logging to test installation times in CI"
kpollich d79e967
Update docker images for registry
kpollich cce17e3
Merge branch 'main' into 125097-prevent-registry-network-errors-block…
kpollich 2310ec8
Update docker image digest again
kpollich 53f3b60
Refactor latest package fetching to fix broken logic/tests
kpollich 883e216
Fix a bunch of type errors around renamed fetch latest package versio…
kpollich 3541e4f
Remove unused import
kpollich 3a828d5
Bump docker version to latest snapshot (again)
kpollich 9e7b122
Revert changes to endpoint tests
kpollich 351ce75
Pass experimental flag in synthetics tests
kpollich 7938cd7
Fix endpoint version in fleet api integration test
kpollich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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.
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.
Here the package should be installed right? can we directly fetch from ES the package instead of relying on the registry or the bundled package?
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.
Yeah I believe you are correct. I'm not sure why, but all of the policy compilation logic expected a
RegistryPackage
object. I would've assumed we would be fine withPackageInfo
here and so we could fetch from ES. I will take a look at this. You're right above that it's non-trivial but this is probably the "right" solution.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.
So it wound up being pretty easy to replace the
InstallablePackage
stuff with aPackageInfo
object - just needed to make a few changes here and there to support that. We only use a few fields here, andgetPackageInfo
will pull back anInstallation
object for installed packages, so I think we've pretty easily eliminated the registry call here. See e2f2fea