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] Fix bug caused by API changes #120886

Merged
merged 2 commits into from
Dec 9, 2021
Merged

Conversation

juliaElastic
Copy link
Contributor

@juliaElastic juliaElastic commented Dec 9, 2021

Summary

Fixed bug caused by API changes in #119494

Steps to reproduce:

  1. Go to kibana Integrations
  2. Select Endpoint Security (this url: http://localhost:5601/julia/app/integrations/detail/endpoint/overview)
  3. Page not loading, giving an error.
    Expected with this fix: Endpoint page opens as expected without error

image

Root cause:

Made /epm/packages/pkgkey route deprecated returning response field, and instead using /epm/packages/pkgName/pkgVersion returning item field from UI.

In some cases, pkgVersion is not specified (optional path param), and in this case, router calls the deprecated API.
To fix this, I'm returning item field from deprecated API as well. This makes it easier to remove the deprecated API later, since the UI is already using the new item field.

After fix:
image

Checklist

@juliaElastic juliaElastic requested a review from a team as a code owner December 9, 2021 11:53
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Dec 9, 2021
@juliaElastic juliaElastic self-assigned this Dec 9, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@juliaElastic juliaElastic added auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v8.0.0 v8.1.0 v8.2.0 labels Dec 9, 2021
@juliaElastic juliaElastic changed the title [Fleet] fix endpoint integration [Fleet] Fix bug caused by API changes Dec 9, 2021
Copy link
Contributor

@joshdover joshdover left a comment

Choose a reason for hiding this comment

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

Can we update the API integration test for this?

@joshdover joshdover removed the v8.2.0 label Dec 9, 2021
@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 @juliaElastic

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.

🚀

@juliaElastic juliaElastic merged commit 3a7d24b into elastic:main Dec 9, 2021
@juliaElastic juliaElastic deleted the api-fix branch December 9, 2021 14:57
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 9, 2021
* fix endpoint integration

* added test
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Dec 9, 2021
* fix endpoint integration

* added test

Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
TinLe pushed a commit to TinLe/kibana that referenced this pull request Dec 22, 2021
* fix endpoint integration

* added test
gbamparop pushed a commit to gbamparop/kibana that referenced this pull request Jan 12, 2022
* fix endpoint integration

* added test
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 bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants