-
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
[Fleet] Fix asset creation during custom integration installation #174869
[Fleet] Fix asset creation during custom integration installation #174869
Conversation
Pinging @elastic/fleet (Feature:EPM) |
Pinging @elastic/fleet (Team:Fleet) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Sorry about the wrong committer e-mail 🙈 I'll force-push a fixed commit. |
5539a79
to
7ebfe01
Compare
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.
Thanks for fixing this, we should probably have some tests that cover that path too do you mind creating a follow up issue for that?
@weltenwort I verify that your fix works well, so I am closing my draft PR. |
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!
@weltenwort I did a bit more testing and as you can see when I uninstall my custom integration and reinstall it again it fails. Screen.Recording.2024-01-15.at.22.35.49.movAlso the Overview page of the custom integration is empty. This PR is approved, since it fixes the described issue. Above comments can be fixed in follow up issues. Not sure though if the uninstall/re-install issue is related only to the custom integration installation or if it is a general fleet issue. @nchaulet could weigh in here. |
The issue seems to be only related to the custom integration as when it's uninstalled we do not have the assets anymore (that make it impossible for us to reinstall it) I am wondering if we should just remove that install button for custom integration, or redirect somewhere else than that details page |
Yep removing that install button sounds like a good idea to me. |
@weltenwort I am reopening my PR, since your PR fixes newly created custom integrations. If the custom integration is in a broken state already, users will continue to get this error After me clicking on this reinstall button, I somehow ended up in a broken state and the Installed Integrations page was empty. After me applying the initial fix, the custom integration would not appear in the Installed Integrations page, but at least I could see my rest installed Integrations and following warning on the server |
@nchaulet thanks for the review. We actually have a test that caught this, but it was circumvented in #174734 instead of fixing the problem. We're discussing steps to make sure the test always runs on the PRs that are most likely to break this functionality. @mgiota thanks for checking. I'll investigate and possibly create a follow-up issue to disable the install button. |
@weltenwort we can bring back the test to the previous form, I just saw the PR as a patch because it was blocking something important behind. wdyt? |
@yngrdyn ok, I'll try to restore it and enable it for fleet-related changes in one go |
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @weltenwort |
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.
OPs changes lgtm
@weltenwort Cool! How about the empty Overview page of the Custom Integration? Update: I created this follow up issue. If needed, feel free to update. |
@mgiota good point, thanks for creating the issue. We should definitely generate a readme too 👍 |
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
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
I don't think backports are necessary, because the change that broke this wasn't backported either. |
📝 Summary
This fixes the way the asset paths are extracted since #173965. Since the
assetMap
is aMap
, the keys can be retrieved viaassetMap.keys()
.