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

Propagate cancellation to Helm Release provider action #2579

Merged
merged 4 commits into from
Sep 29, 2023
Merged

Conversation

EronWright
Copy link
Contributor

@EronWright EronWright commented Sep 26, 2023

Proposed changes

Closes #2485.

This PR implements cancelation for Create and Update operations on the Helm Release resource. When the user presses ctrl-c, the Helm operation is cancelled and the stack state is updated accordingly. This is an improvement over the current behavior where the Helm release may be orphaned by Pulumi.

A future enhancement would be to implement cancelation for the Delete operation, once it becomes possible in the Helm v3 library (see PR and the RunWithContext variants).

Note: no new tests are provided because I don't see a way to simulate cancelation using the integration test framework.

Related issues (optional)

Related to pulumi/pulumi#14057. It is safe to merge this PR beforehand.

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Copy link
Member

@rquitales rquitales left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a minor remark to update the code comment and create a issue tracker. Approving so this review is non-blocking.

provider/pkg/provider/helm_release.go Show resolved Hide resolved
@EronWright EronWright enabled auto-merge (squash) September 29, 2023 05:11
@codecov-commenter
Copy link

Codecov Report

Merging #2579 (396f8c9) into master (8a67a13) will decrease coverage by 0.22%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #2579      +/-   ##
==========================================
- Coverage   18.73%   18.52%   -0.22%     
==========================================
  Files          47       47              
  Lines        9532     9534       +2     
==========================================
- Hits         1786     1766      -20     
- Misses       7642     7669      +27     
+ Partials      104       99       -5     
Files Coverage Δ
provider/pkg/provider/provider.go 7.37% <0.00%> (-0.01%) ⬇️
provider/pkg/provider/helm_release.go 4.39% <0.00%> (-0.01%) ⬇️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@EronWright EronWright merged commit 7a84ace into master Sep 29, 2023
17 checks passed
@EronWright EronWright deleted the issue-2485 branch September 29, 2023 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Helm - v3 Release leaks resources on ctrl-c command
3 participants