-
Notifications
You must be signed in to change notification settings - Fork 127
Provide contexts to kibana methods #1713
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
Provide contexts to kibana methods #1713
Conversation
| return result.WithError(fmt.Errorf("can't create the package installer: %w", err)) | ||
| } | ||
| installedPackage, err := packageInstaller.Install() | ||
| installedPackage, err := packageInstaller.Install(ctx) |
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.
Maybe add here context.WithoutCancel(ctx) to allow running teardown ?
Currently, it does not deletes the package if it is pressed Ctrl+C during the installation.
2024/03/25 11:06:40 DEBUG Skip validation of the built .zip package
2024/03/25 11:06:40 DEBUG POST https://127.0.0.1:5601/api/fleet/epm/packages
^C2024/03/25 11:06:40 INFO Signal caught!
2024/03/25 11:06:40 ERROR request failed error="Post \"https://127.0.0.1:5601/api/fleet/epm/packages\": context canceled" method=POST url=https://127.0.0.1:5601/api/fleet/epm/packages
interrupted
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.
Fixed in ecd4600, along with the tear down context.
At the end I am only running the tear down if the installation failed by context cancellation, in other cases I think we can assume that the package was not installed.
💚 Build Succeeded
History
cc @jsoriano |
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.
Nice! 🚀
Follow up to #1679, to provide contexts to kibana client.