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] Fallback to bundled packages on GET package route #129999

Merged
merged 7 commits into from
Apr 25, 2022

Conversation

joshdover
Copy link
Contributor

@joshdover joshdover commented Apr 12, 2022

Summary

Fixes #129998

This fixes both the integration detail page and the integration policy editor for cases where the bundled package version is not available in the registry.

Optimizations made in #123509 broke this functionality so I have added an explicit test for this case.

How to test (only valid before 8.2.0 is released)

  1. Add apm-8.2.0.zip to x-pack/plugins/fleet/target/bundled_packages
  2. Add this to your kibana.yml:
    xpack.fleet.registryUrl: https://epr.elastic.co
    xpack.fleet.packages:
      - name: apm
        version: latest
  3. Go to /app/integrations/detail/apm-8.2.0/settings and ensure APM page is shown without errors
  4. Create an APM integration policy and ensure the editor is shown without errors

Checklist

@joshdover joshdover requested a review from a team as a code owner April 12, 2022 11:25
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Apr 12, 2022
@joshdover joshdover marked this pull request as draft April 12, 2022 11:25
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@joshdover joshdover added v8.2.0 v8.3.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed labels Apr 12, 2022
@joshdover joshdover force-pushed the fleet/fix-129998 branch 2 times, most recently from 29c60d9 to c97baa3 Compare April 12, 2022 14:09
@joshdover joshdover marked this pull request as ready for review April 12, 2022 14:10
@nchaulet nchaulet self-requested a review April 12, 2022 17:06
savedObjectsClient,
pkgName,
pkgVersion,
skipArchive = false,
Copy link
Contributor Author

@joshdover joshdover Apr 13, 2022

Choose a reason for hiding this comment

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

This new flag is a pretty ugly hack. I think I'll be able to remove this as part of the work I'm planning for #115032. This is necessary for use cases that depend on the archive having been loaded into the archive cache as a side effect of this function.

Copy link
Member

@kpollich kpollich left a comment

Choose a reason for hiding this comment

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

LGTM

@joshdover joshdover added v8.2.1 and removed v8.2.0 labels Apr 25, 2022
@joshdover joshdover enabled auto-merge (squash) April 25, 2022 10:24
@joshdover joshdover merged commit 63e95ab into elastic:main Apr 25, 2022
@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

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.2 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 129999

Questions ?

Please refer to the Backport tool documentation

joshdover added a commit to joshdover/kibana that referenced this pull request Apr 25, 2022
…9999)

(cherry picked from commit 63e95ab)

# Conflicts:
#	x-pack/plugins/fleet/server/services/epm/packages/get.ts
joshdover added a commit that referenced this pull request Apr 25, 2022
) (#130901)

* [Fleet] Fallback to bundled packages on GET package route (#129999)

(cherry picked from commit 63e95ab)

# Conflicts:
#	x-pack/plugins/fleet/server/services/epm/packages/get.ts

* Fix bad merge conflict
kertal pushed a commit to kertal/kibana that referenced this pull request May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.2.1 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Bundled packages are failing to load in policy editor
6 participants