-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
added fix for add and edit integrations page not loading for beta versions #144431
added fix for add and edit integrations page not loading for beta versions #144431
Conversation
Pinging @elastic/fleet (Team:Fleet) |
@@ -99,7 +99,7 @@ export const CreatePackagePolicySinglePage: CreatePackagePolicyParams = ({ | |||
data: packageInfoData, | |||
error: packageInfoError, | |||
isLoading: isPackageInfoLoading, | |||
} = useGetPackageInfoByKey(pkgName, pkgVersion); | |||
} = useGetPackageInfoByKey(pkgName, pkgVersion, { prerelease: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As these pages are navigated to with a concrete pkgVersion
, I decided it is safe to set prerelease: true
rather than loading the settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Thanks for the fix here.
💚 Build Succeeded
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
To update your PR or re-run it, just comment with: |
## Summary Fixes #146312 Fall back to bundled packages when loading package archive. Also fixed an issue with prerelease flag caused by #144431 Loading prerelease setting on Add/Edit integration page, so that it works well for cases where the url doesn't contain a concrete version like APM Steps to verify: - Start kibana locally, make sure that APM bundled package is there in `x-pack/plugins/fleet/target/bundled_packages` - Load http://localhost:5601/julia/app/integrations/detail/apm/overview (with default "beta integrations" off flag) - Expect that 8.6.0 version is showing up (or 8.7.0 depending on the build) - When clicking on Add Elastic APM, expect 8.6.0 to be loaded successfully <img width="1773" alt="image" src="https://user-images.githubusercontent.com/90178898/206482128-634ca823-bb21-46a9-a8b9-fc81d5dc126d.png"> Note: there is still a UI issue with loading assets on Overview page if the package is not in EPR. <img width="1747" alt="image" src="https://user-images.githubusercontent.com/90178898/206478275-ee8e9494-234f-44c8-88d9-a91c791b0196.png"> - switch "beta integrations" on on Integrations page - Open APM overview page again - expect `8.7.0-preview` version with the selector to change to last GA <img width="1100" alt="image" src="https://user-images.githubusercontent.com/90178898/206480986-2ed05b12-49e4-4c88-97c6-6cdf12f819da.png"> ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
## Summary Fixes elastic#146312 Fall back to bundled packages when loading package archive. Also fixed an issue with prerelease flag caused by elastic#144431 Loading prerelease setting on Add/Edit integration page, so that it works well for cases where the url doesn't contain a concrete version like APM Steps to verify: - Start kibana locally, make sure that APM bundled package is there in `x-pack/plugins/fleet/target/bundled_packages` - Load http://localhost:5601/julia/app/integrations/detail/apm/overview (with default "beta integrations" off flag) - Expect that 8.6.0 version is showing up (or 8.7.0 depending on the build) - When clicking on Add Elastic APM, expect 8.6.0 to be loaded successfully <img width="1773" alt="image" src="https://user-images.githubusercontent.com/90178898/206482128-634ca823-bb21-46a9-a8b9-fc81d5dc126d.png"> Note: there is still a UI issue with loading assets on Overview page if the package is not in EPR. <img width="1747" alt="image" src="https://user-images.githubusercontent.com/90178898/206478275-ee8e9494-234f-44c8-88d9-a91c791b0196.png"> - switch "beta integrations" on on Integrations page - Open APM overview page again - expect `8.7.0-preview` version with the selector to change to last GA <img width="1100" alt="image" src="https://user-images.githubusercontent.com/90178898/206480986-2ed05b12-49e4-4c88-97c6-6cdf12f819da.png"> ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios (cherry picked from commit 24e2fcf)
#147335) # Backport This will backport the following commits from `main` to `8.6`: - [[Fleet] fix for apm not found in epr + prerelease flag (#147257)](#147257) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia Bardi","email":"[email protected]"},"sourceCommit":{"committedDate":"2022-12-12T10:06:50Z","message":"[Fleet] fix for apm not found in epr + prerelease flag (#147257)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/146312\r\n\r\nFall back to bundled packages when loading package archive.\r\n\r\nAlso fixed an issue with prerelease flag caused by\r\nhttps://github.com//pull/144431\r\n\r\nLoading prerelease setting on Add/Edit integration page, so that it\r\nworks well for cases where the url doesn't contain a concrete version\r\nlike APM\r\n\r\nSteps to verify:\r\n- Start kibana locally, make sure that APM bundled package is there in\r\n`x-pack/plugins/fleet/target/bundled_packages`\r\n- Load http://localhost:5601/julia/app/integrations/detail/apm/overview\r\n(with default \"beta integrations\" off flag)\r\n- Expect that 8.6.0 version is showing up (or 8.7.0 depending on the\r\nbuild)\r\n- When clicking on Add Elastic APM, expect 8.6.0 to be loaded\r\nsuccessfully\r\n\r\n<img width=\"1773\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206482128-634ca823-bb21-46a9-a8b9-fc81d5dc126d.png\">\r\n\r\nNote: there is still a UI issue with loading assets on Overview page if\r\nthe package is not in EPR.\r\n\r\n<img width=\"1747\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206478275-ee8e9494-234f-44c8-88d9-a91c791b0196.png\">\r\n\r\n- switch \"beta integrations\" on on Integrations page\r\n- Open APM overview page again\r\n- expect `8.7.0-preview` version with the selector to change to last GA\r\n\r\n<img width=\"1100\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206480986-2ed05b12-49e4-4c88-97c6-6cdf12f819da.png\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"24e2fcf47014d937a5019d83b95565a010ae4e22","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.6.0","v8.7.0"],"number":147257,"url":"https://github.com/elastic/kibana/pull/147257","mergeCommit":{"message":"[Fleet] fix for apm not found in epr + prerelease flag (#147257)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/146312\r\n\r\nFall back to bundled packages when loading package archive.\r\n\r\nAlso fixed an issue with prerelease flag caused by\r\nhttps://github.com//pull/144431\r\n\r\nLoading prerelease setting on Add/Edit integration page, so that it\r\nworks well for cases where the url doesn't contain a concrete version\r\nlike APM\r\n\r\nSteps to verify:\r\n- Start kibana locally, make sure that APM bundled package is there in\r\n`x-pack/plugins/fleet/target/bundled_packages`\r\n- Load http://localhost:5601/julia/app/integrations/detail/apm/overview\r\n(with default \"beta integrations\" off flag)\r\n- Expect that 8.6.0 version is showing up (or 8.7.0 depending on the\r\nbuild)\r\n- When clicking on Add Elastic APM, expect 8.6.0 to be loaded\r\nsuccessfully\r\n\r\n<img width=\"1773\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206482128-634ca823-bb21-46a9-a8b9-fc81d5dc126d.png\">\r\n\r\nNote: there is still a UI issue with loading assets on Overview page if\r\nthe package is not in EPR.\r\n\r\n<img width=\"1747\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206478275-ee8e9494-234f-44c8-88d9-a91c791b0196.png\">\r\n\r\n- switch \"beta integrations\" on on Integrations page\r\n- Open APM overview page again\r\n- expect `8.7.0-preview` version with the selector to change to last GA\r\n\r\n<img width=\"1100\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206480986-2ed05b12-49e4-4c88-97c6-6cdf12f819da.png\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"24e2fcf47014d937a5019d83b95565a010ae4e22"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/147257","number":147257,"mergeCommit":{"message":"[Fleet] fix for apm not found in epr + prerelease flag (#147257)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/146312\r\n\r\nFall back to bundled packages when loading package archive.\r\n\r\nAlso fixed an issue with prerelease flag caused by\r\nhttps://github.com//pull/144431\r\n\r\nLoading prerelease setting on Add/Edit integration page, so that it\r\nworks well for cases where the url doesn't contain a concrete version\r\nlike APM\r\n\r\nSteps to verify:\r\n- Start kibana locally, make sure that APM bundled package is there in\r\n`x-pack/plugins/fleet/target/bundled_packages`\r\n- Load http://localhost:5601/julia/app/integrations/detail/apm/overview\r\n(with default \"beta integrations\" off flag)\r\n- Expect that 8.6.0 version is showing up (or 8.7.0 depending on the\r\nbuild)\r\n- When clicking on Add Elastic APM, expect 8.6.0 to be loaded\r\nsuccessfully\r\n\r\n<img width=\"1773\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206482128-634ca823-bb21-46a9-a8b9-fc81d5dc126d.png\">\r\n\r\nNote: there is still a UI issue with loading assets on Overview page if\r\nthe package is not in EPR.\r\n\r\n<img width=\"1747\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206478275-ee8e9494-234f-44c8-88d9-a91c791b0196.png\">\r\n\r\n- switch \"beta integrations\" on on Integrations page\r\n- Open APM overview page again\r\n- expect `8.7.0-preview` version with the selector to change to last GA\r\n\r\n<img width=\"1100\" alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/90178898/206480986-2ed05b12-49e4-4c88-97c6-6cdf12f819da.png\">\r\n\r\n\r\n### Checklist\r\n\r\n- [ ] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"24e2fcf47014d937a5019d83b95565a010ae4e22"}}]}] BACKPORT--> Co-authored-by: Julia Bardi <[email protected]>
Summary
Caused by #143853
Noticed while testing that a beta version Add and Edit integrations page was not loading due to the last changes of the linked pr.