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 max 20 installed integrations returned from Fleet API #150780

Merged
merged 1 commit into from
Feb 9, 2023

Conversation

kpollich
Copy link
Member

@kpollich kpollich commented Feb 9, 2023

Summary

Fix an (old) bug where Fleet's "list packages" API endpoint would only ever return 20 installed integrations at most.

I haven't included a test case here because I'm not sure we have 20 test packages that can reasonably be installed at the same time. Also feels like an arbitrary number to introduce a "lists all packages even if there are more N" test case. Open to feedback on testing.

Before

23 installed integrations, only 20 in UI

image

image

After

23 installed integrations, 23 in UI

image

@kpollich kpollich added release_note:fix 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 Feb 9, 2023
@kpollich kpollich self-assigned this Feb 9, 2023
@kpollich kpollich requested a review from a team as a code owner February 9, 2023 20:34
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

Copy link
Contributor

@hop-dev hop-dev left a comment

Choose a reason for hiding this comment

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

RIP this bug 2020 - 2023

@kpollich kpollich enabled auto-merge (squash) February 9, 2023 21:03
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

cc @kpollich

@kpollich kpollich merged commit e7209f5 into elastic:main Feb 9, 2023
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 9, 2023
…astic#150780)

## Summary

Fix an (old) bug where Fleet's "list packages" API endpoint would only
ever return 20 installed integrations at most.

I haven't included a test case here because I'm not sure we have 20 test
packages that can reasonably be installed at the same time. Also feels
like an arbitrary number to introduce a "lists all packages even if
there are more N" test case. Open to feedback on testing.

## Before

23 installed integrations, only 20 in UI

![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)

![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)

## After

23 installed integrations, 23 in UI

![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)

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

💚 All backports created successfully

Status Branch Result
8.7

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 Feb 9, 2023
…PI (#150780) (#150795)

# Backport

This will backport the following commits from `main` to `8.7`:
- [[Fleet] Fix max 20 installed integrations returned from Fleet API
(#150780)](#150780)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kyle
Pollich","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-02-09T21:41:15Z","message":"[Fleet]
Fix max 20 installed integrations returned from Fleet API
(#150780)\n\n## Summary\r\n\r\nFix an (old) bug where Fleet's \"list
packages\" API endpoint would only\r\never return 20 installed
integrations at most.\r\n\r\nI haven't included a test case here because
I'm not sure we have 20 test\r\npackages that can reasonably be
installed at the same time. Also feels\r\nlike an arbitrary number to
introduce a \"lists all packages even if\r\nthere are more N\" test
case. Open to feedback on testing.\r\n\r\n## Before\r\n\r\n23 installed
integrations, only 20 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\r\n\r\n##
After\r\n\r\n23 installed integrations, 23 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)","sha":"e7209f52a91170ce3e53d2bd27bafaecf6195d54","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.8.0"],"number":150780,"url":"https://github.com/elastic/kibana/pull/150780","mergeCommit":{"message":"[Fleet]
Fix max 20 installed integrations returned from Fleet API
(#150780)\n\n## Summary\r\n\r\nFix an (old) bug where Fleet's \"list
packages\" API endpoint would only\r\never return 20 installed
integrations at most.\r\n\r\nI haven't included a test case here because
I'm not sure we have 20 test\r\npackages that can reasonably be
installed at the same time. Also feels\r\nlike an arbitrary number to
introduce a \"lists all packages even if\r\nthere are more N\" test
case. Open to feedback on testing.\r\n\r\n## Before\r\n\r\n23 installed
integrations, only 20 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\r\n\r\n##
After\r\n\r\n23 installed integrations, 23 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)","sha":"e7209f52a91170ce3e53d2bd27bafaecf6195d54"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150780","number":150780,"mergeCommit":{"message":"[Fleet]
Fix max 20 installed integrations returned from Fleet API
(#150780)\n\n## Summary\r\n\r\nFix an (old) bug where Fleet's \"list
packages\" API endpoint would only\r\never return 20 installed
integrations at most.\r\n\r\nI haven't included a test case here because
I'm not sure we have 20 test\r\npackages that can reasonably be
installed at the same time. Also feels\r\nlike an arbitrary number to
introduce a \"lists all packages even if\r\nthere are more N\" test
case. Open to feedback on testing.\r\n\r\n## Before\r\n\r\n23 installed
integrations, only 20 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\r\n\r\n##
After\r\n\r\n23 installed integrations, 23 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)","sha":"e7209f52a91170ce3e53d2bd27bafaecf6195d54"}}]}]
BACKPORT-->

Co-authored-by: Kyle Pollich <[email protected]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Feb 10, 2023
* main: (115 commits)
  [Custom branding] Add custom logo to space selector (elastic#150284)
  [api-docs] 2023-02-10 Daily api_docs build (elastic#150831)
  [ci] build next docs in PRs when relevant files change (elastic#149991)
  [codeowners] allow overrides to take higher precedence (elastic#150821)
  [docs] Remove kibDevDocsOpsPluginDiscovery (elastic#150788)
  [Fleet] Fix max 20 installed integrations returned from Fleet API (elastic#150780)
  [maps] fix Changing resolutions on Heat map layer throws error in console (elastic#150761)
  fixes Failing ES Promotion: X-Pack API Integration Tests x-pack/test/api_integration/apis/maps/get_grid_tile.js (elastic#150768)
  [Synthetics] adjust overview scrolling e2e (elastic#150774)
  [Security Solution] Fixes bulk close alerts from exception flyout type bug (elastic#150765)
  Upgrade EUI to v74.1.0 (elastic#150235)
  [skip ci] Fix labeling for Infrastructure UI (elastic#150571)
  [Enterprise Search] Move pipelines modal to flyout (elastic#150727)
  [Security Solution] fix flaky endpoint tests (elastic#150652)
  Fixes the space selector page layout  (elastic#150503)
  [Dashboard] [Navigation] Fix mount point bug (elastic#150507)
  [Infrastructure UI] Track host cloud provider on table entry click (elastic#150685)
  [Dashboard Usability] Moves scrollbar to panel section (elastic#145628)
  [Maps] fixes Kibana maps shows MVT borders if the geometry border style is greater than 1 (elastic#150497)
  [Cloud Posture][Dashboard] dashboard re-design enhancements (elastic#150394)
  ...
@kpollich
Copy link
Member Author

💚 All backports created successfully

Status Branch Result
8.6

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

Questions ?

Please refer to the Backport tool documentation

kpollich added a commit to kpollich/kibana that referenced this pull request Feb 10, 2023
…astic#150780)

## Summary

Fix an (old) bug where Fleet's "list packages" API endpoint would only
ever return 20 installed integrations at most.

I haven't included a test case here because I'm not sure we have 20 test
packages that can reasonably be installed at the same time. Also feels
like an arbitrary number to introduce a "lists all packages even if
there are more N" test case. Open to feedback on testing.

## Before

23 installed integrations, only 20 in UI

![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)

![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)

## After

23 installed integrations, 23 in UI

![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)

(cherry picked from commit e7209f5)
kpollich added a commit that referenced this pull request Feb 10, 2023
…PI (#150780) (#150891)

# Backport

This will backport the following commits from `main` to `8.6`:
- [[Fleet] Fix max 20 installed integrations returned from Fleet API
(#150780)](#150780)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kyle
Pollich","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-02-09T21:41:15Z","message":"[Fleet]
Fix max 20 installed integrations returned from Fleet API
(#150780)\n\n## Summary\r\n\r\nFix an (old) bug where Fleet's \"list
packages\" API endpoint would only\r\never return 20 installed
integrations at most.\r\n\r\nI haven't included a test case here because
I'm not sure we have 20 test\r\npackages that can reasonably be
installed at the same time. Also feels\r\nlike an arbitrary number to
introduce a \"lists all packages even if\r\nthere are more N\" test
case. Open to feedback on testing.\r\n\r\n## Before\r\n\r\n23 installed
integrations, only 20 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\r\n\r\n##
After\r\n\r\n23 installed integrations, 23 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)","sha":"e7209f52a91170ce3e53d2bd27bafaecf6195d54","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Fleet","backport:prev-minor","v8.7.0","v8.8.0"],"number":150780,"url":"https://github.com/elastic/kibana/pull/150780","mergeCommit":{"message":"[Fleet]
Fix max 20 installed integrations returned from Fleet API
(#150780)\n\n## Summary\r\n\r\nFix an (old) bug where Fleet's \"list
packages\" API endpoint would only\r\never return 20 installed
integrations at most.\r\n\r\nI haven't included a test case here because
I'm not sure we have 20 test\r\npackages that can reasonably be
installed at the same time. Also feels\r\nlike an arbitrary number to
introduce a \"lists all packages even if\r\nthere are more N\" test
case. Open to feedback on testing.\r\n\r\n## Before\r\n\r\n23 installed
integrations, only 20 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\r\n\r\n##
After\r\n\r\n23 installed integrations, 23 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)","sha":"e7209f52a91170ce3e53d2bd27bafaecf6195d54"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/150795","number":150795,"state":"MERGED","mergeCommit":{"sha":"84c92b53dc446e92a1a5cd7ed7a33cbf9913141d","message":"[8.7]
[Fleet] Fix max 20 installed integrations returned from Fleet API
(#150780) (#150795)\n\n# Backport\n\nThis will backport the following
commits from `main` to `8.7`:\n- [[Fleet] Fix max 20 installed
integrations returned from Fleet
API\n(#150780)](https://github.com/elastic/kibana/pull/150780)\n\n<!---
Backport version: 8.9.7 -->\n\n### Questions ?\nPlease refer to the
[Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n<!--BACKPORT
[{\"author\":{\"name\":\"Kyle\nPollich\",\"email\":\"[email protected]\"},\"sourceCommit\":{\"committedDate\":\"2023-02-09T21:41:15Z\",\"message\":\"[Fleet]\nFix
max 20 installed integrations returned from Fleet API\n(#150780)\\n\\n##
Summary\\r\\n\\r\\nFix an (old) bug where Fleet's \\\"list\npackages\\\"
API endpoint would only\\r\\never return 20 installed\nintegrations at
most.\\r\\n\\r\\nI haven't included a test case here because\nI'm not
sure we have 20 test\\r\\npackages that can reasonably be\ninstalled at
the same time. Also feels\\r\\nlike an arbitrary number to\nintroduce a
\\\"lists all packages even if\\r\\nthere are more N\\\" test\ncase.
Open to feedback on testing.\\r\\n\\r\\n## Before\\r\\n\\r\\n23
installed\nintegrations, only 20
in\nUI\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\\r\\n\\r\\n##\nAfter\\r\\n\\r\\n23
installed integrations, 23
in\nUI\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)\",\"sha\":\"e7209f52a91170ce3e53d2bd27bafaecf6195d54\",\"branchLabelMapping\":{\"^v8.8.0$\":\"main\",\"^v(\\\\d+).(\\\\d+).\\\\d+$\":\"$1.$2\"}},\"sourcePullRequest\":{\"labels\":[\"release_note:fix\",\"Team:Fleet\",\"backport:prev-minor\",\"v8.8.0\"],\"number\":150780,\"url\":\"https://github.com/elastic/kibana/pull/150780\",\"mergeCommit\":{\"message\":\"[Fleet]\nFix
max 20 installed integrations returned from Fleet API\n(#150780)\\n\\n##
Summary\\r\\n\\r\\nFix an (old) bug where Fleet's \\\"list\npackages\\\"
API endpoint would only\\r\\never return 20 installed\nintegrations at
most.\\r\\n\\r\\nI haven't included a test case here because\nI'm not
sure we have 20 test\\r\\npackages that can reasonably be\ninstalled at
the same time. Also feels\\r\\nlike an arbitrary number to\nintroduce a
\\\"lists all packages even if\\r\\nthere are more N\\\" test\ncase.
Open to feedback on testing.\\r\\n\\r\\n## Before\\r\\n\\r\\n23
installed\nintegrations, only 20
in\nUI\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\\r\\n\\r\\n##\nAfter\\r\\n\\r\\n23
installed integrations, 23
in\nUI\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)\",\"sha\":\"e7209f52a91170ce3e53d2bd27bafaecf6195d54\"}},\"sourceBranch\":\"main\",\"suggestedTargetBranches\":[],\"targetPullRequestStates\":[{\"branch\":\"main\",\"label\":\"v8.8.0\",\"labelRegex\":\"^v8.8.0$\",\"isSourceBranch\":true,\"state\":\"MERGED\",\"url\":\"https://github.com/elastic/kibana/pull/150780\",\"number\":150780,\"mergeCommit\":{\"message\":\"[Fleet]\nFix
max 20 installed integrations returned from Fleet API\n(#150780)\\n\\n##
Summary\\r\\n\\r\\nFix an (old) bug where Fleet's \\\"list\npackages\\\"
API endpoint would only\\r\\never return 20 installed\nintegrations at
most.\\r\\n\\r\\nI haven't included a test case here because\nI'm not
sure we have 20 test\\r\\npackages that can reasonably be\ninstalled at
the same time. Also feels\\r\\nlike an arbitrary number to\nintroduce a
\\\"lists all packages even if\\r\\nthere are more N\\\" test\ncase.
Open to feedback on testing.\\r\\n\\r\\n## Before\\r\\n\\r\\n23
installed\nintegrations, only 20
in\nUI\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\\r\\n\\r\\n##\nAfter\\r\\n\\r\\n23
installed integrations, 23
in\nUI\\r\\n\\r\\n\\r\\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)\",\"sha\":\"e7209f52a91170ce3e53d2bd27bafaecf6195d54\"}}]}]\nBACKPORT-->\n\nCo-authored-by:
Kyle Pollich
<[email protected]>"}},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150780","number":150780,"mergeCommit":{"message":"[Fleet]
Fix max 20 installed integrations returned from Fleet API
(#150780)\n\n## Summary\r\n\r\nFix an (old) bug where Fleet's \"list
packages\" API endpoint would only\r\never return 20 installed
integrations at most.\r\n\r\nI haven't included a test case here because
I'm not sure we have 20 test\r\npackages that can reasonably be
installed at the same time. Also feels\r\nlike an arbitrary number to
introduce a \"lists all packages even if\r\nthere are more N\" test
case. Open to feedback on testing.\r\n\r\n## Before\r\n\r\n23 installed
integrations, only 20 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930020-f6dafe56-191a-48c0-acb4-c567810a6dad.png)\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930126-441e78a8-d484-4c5d-b5df-00179d930e4a.png)\r\n\r\n##
After\r\n\r\n23 installed integrations, 23 in
UI\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/6766512/217930384-21506d77-7244-42c1-93bd-97025a8ec86e.png)","sha":"e7209f52a91170ce3e53d2bd27bafaecf6195d54"}}]}]
BACKPORT-->
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:fix Team:Fleet Team label for Observability Data Collection Fleet team v8.6.2 v8.7.0 v8.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants