-
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] Fix package archive bug + reenable Endpoint tests #143120
Conversation
@elasticmachine merge upstream |
@elasticmachine merge upstream |
Pinging @elastic/fleet (Team:Fleet) |
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 this
I had a similar question in my original PR but unfortunately I didn't realise that it would break the install (for some reason I had no tests failing in the branch). |
@elasticmachine merge upstream |
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! Thank you for fixing this!
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
History
To update your PR or re-run it, just comment with: cc @kpollich |
…3120) * Reenable endpoint tests to debug in CI * Revert removal of skip in trusted apps * Try enabling Fleet debug logs * Fix missing archive path in bundled packages * Remove Fleet debug logs in endpoint tests * Reenable endpoint suites Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit d9d10f2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…143398) * Reenable endpoint tests to debug in CI * Revert removal of skip in trusted apps * Try enabling Fleet debug logs * Fix missing archive path in bundled packages * Remove Fleet debug logs in endpoint tests * Reenable endpoint suites Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit d9d10f2) Co-authored-by: Kyle Pollich <[email protected]>
Summary
Fixes failing endpoint tests - cc @kevinlog
@hop-dev @criamico - I tracked down the issue causing endpoint tests to fail to this chunk of code. As it stands, we are always querying EPR to fetch the archive buffer for a given package, even if it's already installed.
This means that bundled packages (which don't define a
download
property as they'reArchivePackage
records in code) were failing to fetch from EPR. We were querying a URL likelocalhost:12345undefined
and throwing 502's during package policy creation with anError: Invalid URL
thrown.I've pushed up a workaround here where we "fill in" the
downwload
property on these packages, but I don't think this will work in all situations (namely APM, where the bundled package name is dynamic based on the stack version). Is there a way to fetch these archive buffer objects from the cache instead of always querying from EPR viagetResponseStream
?