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

[Fleet] Check bundled packages when querying package info in getInfo API #141462

Merged
merged 3 commits into from
Sep 22, 2022

Conversation

kpollich
Copy link
Member

@kpollich kpollich commented Sep 22, 2022

Summary

Relates to #139567

Check bundled packages on disk for the exact name/version of a given package when requesting packages through the get package info Fleet API.

To test

  • Add bundled packages to x-pack/plugins/fleet/target directory (see detailed steps in linked PR)
  • Make a request to the get package info API without a version specified
  • Ensure the latest version of the package returned is the bundled one so long as its semver exceeds the latest package from the registry
GET http://localhost:5601/kyle/api/fleet/epm/packages/apm
User-Agent: vscode-restclient
Authorization: Basic elastic:changeme
Content-Type: application/json
kbn-xsrf: xxx

image

cc @sqren

@kpollich kpollich added release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Sep 22, 2022
@kpollich kpollich requested a review from a team as a code owner September 22, 2022 15:18
@kpollich kpollich self-assigned this Sep 22, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kpollich
Copy link
Member Author

@elasticmachine merge upstream

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🚀 It is worth adding a test?

@kpollich
Copy link
Member Author

@nchaulet Added two basic unit tests to cover the fallback and error cases.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @kpollich

@kpollich kpollich merged commit 8774859 into elastic:main Sep 22, 2022
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 22, 2022
…API (elastic#141462)

* Check bundled packages when querying package info in getInfo API

* Add tests for fetchInfo

* Remove needless beforeEach

(cherry picked from commit 8774859)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.5

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 22, 2022
…API (#141462) (#141498)

* Check bundled packages when querying package info in getInfo API

* Add tests for fetchInfo

* Remove needless beforeEach

(cherry picked from commit 8774859)

Co-authored-by: Kyle Pollich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.5.0 v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants