Skip to content

[Fleet] Add categories to search response output#735

Merged
thomasneirynck merged 7 commits intoelastic:masterfrom
thomasneirynck:fleet/add_categories
Sep 29, 2021
Merged

[Fleet] Add categories to search response output#735
thomasneirynck merged 7 commits intoelastic:masterfrom
thomasneirynck:fleet/add_categories

Conversation

@thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck commented Sep 28, 2021

Closes #722

This adds the categories to the search-response output.

  • Inclusion of categories is required so clients can build a facetted browser, merging multiple sources into overlapping category taxonomy. (this is the goal of [Fleet] Unified Integrations view kibana#93084)
  • Adding this will also avoid having to run repeated requests to EPR. Now Kibana needs to issue a search each time a category is selected. It also needs to run a single-search up-front for all packages just so it can provide a total count. This PR will remove the need for this redundant network traffic.

cc @joshdover

@elasticmachine
Copy link

elasticmachine commented Sep 28, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-09-28T19:05:51.721+0000

  • Duration: 5 min 38 sec

  • Commit: d2bbfb6

Test stats 🧪

Test Results
Failed 0
Passed 95
Skipped 0
Total 95

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@thomasneirynck thomasneirynck marked this pull request as ready for review September 28, 2021 02:37
Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Let's make sure if it works correctly for all our use cases.

  1. Please run make formatmage format to clean this code.
  2. Please add a changelog entry to the CHANGELOG.md.
  3. Please run go test . to see if something has changed (-generate to regenerate golden files).

@mtojek mtojek requested a review from ruflin September 28, 2021 07:45
@thomasneirynck thomasneirynck added the enhancement New feature or request label Sep 28, 2021
Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

LGTM!

I double-checked it against the policy template case (url: /search?category=datastore&experimental=true) and it seems to be correct: https://github.com/elastic/package-registry/blob/d2bbfb6efbca8c93d0c9195c871d40450817fae0/testdata/generated/search-category-datastore.json

I think you're good to go, Thomas. You can proceed with releasing procedure. If you encounter any blockers, we can help you with them. FYI release cycles of EPR are detached from Elastic release trains, so feel free to do this anytime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request v7.16.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add category-names to packages in search response / Add package-ids to category list in categories response

3 participants