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

added fix for add and edit integrations page not loading for beta versions #144431

Merged

Conversation

juliaElastic
Copy link
Contributor

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.

image

image

@juliaElastic juliaElastic added release_note:skip Skip the PR/issue when compiling release notes v8.6.0 labels Nov 2, 2022
@juliaElastic juliaElastic requested a review from a team as a code owner November 2, 2022 14:36
@juliaElastic juliaElastic self-assigned this Nov 2, 2022
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Nov 2, 2022
@elasticmachine
Copy link
Contributor

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 });
Copy link
Contributor Author

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.

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 🚀

Thanks for the fix here.

@juliaElastic juliaElastic enabled auto-merge (squash) November 2, 2022 14:44
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 855.1KB 855.1KB +48.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 57 63 +6
osquery 103 108 +5
securitySolution 439 445 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 65 71 +6
osquery 104 110 +6
securitySolution 516 522 +6
total +20

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

cc @juliaElastic

@juliaElastic juliaElastic merged commit 2e23aa0 into elastic:main Nov 2, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 2, 2022
juliaElastic added a commit that referenced this pull request Dec 12, 2022
## 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
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Dec 12, 2022
## 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)
kibanamachine added a commit that referenced this pull request Dec 12, 2022
#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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants