fix: clean up helm releases in reverse order#10014
fix: clean up helm releases in reverse order#10014singhlovepreet9 wants to merge 1 commit intoGoogleContainerTools:mainfrom
Conversation
When skaffold cleans up helm releases (e.g. on Ctrl+C during skaffold dev), it now removes them in reverse order so that dependent releases are deleted before their dependencies. Previously releases were deleted in the same order as installation, causing failures when a CR was deleted after its operator. Fixes GoogleContainerTools#9837
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where interrupting Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request modifies the Helm deployer's cleanup logic to iterate through releases in reverse order. This change ensures that dependencies are cleaned up after the resources that depend on them, which fixes an issue where interrupting skaffold dev could leave orphaned resources. A new test case has been added to TestHelmCleanup to verify that releases are now deleted in the reverse of their installation order. The implementation is correct and the added test validates the new behavior.
Summary
Fixes #9837
skaffold devis interrupted (Ctrl+C), helm releases are now cleaned up in reverse order so that dependent releases (e.g. a PostgreSQL CR) are deleted before their dependencies (e.g. the postgres-operator).Deployer.Cleanup().Test plan
helm3 cleanup releases in reverse ordertest case toTestHelmCleanupthat verifies delete commands are issued in reverse order (E, D, C, B, A for releases defined as A, B, C, D, E)TestHelmCleanuptests continue to passgo test ./pkg/skaffold/deploy/helm/ -run TestHelmCleanup -vpasses