Skip to content

Conversation

nojnhuh
Copy link

@nojnhuh nojnhuh commented Jul 29, 2025

What this PR does / why we need it:

This PR makes CAAPH try to upgrade Releases in pending-install and pending-upgrade states, which could indicate that a previous attempt to install or upgrade had started and then failed.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #416

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 29, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nojnhuh
Once this PR has been reviewed and has the lgtm label, please assign jackfrancis for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested review from Jont828 and mboersma July 29, 2025 19:57
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 29, 2025
if existing.Info.Status == helmRelease.StatusPendingInstall || existing.Info.Status == helmRelease.StatusPendingUpgrade {
log.Info("Release is in a pending state, upgrading")
return true, nil
}
Copy link
Author

Choose a reason for hiding this comment

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

@Jont828 Is there a place I could add a test for this? The closest place I could find with existing tests was in the HelmReleaseProxy controller tests where this is fronted by a mock, so this code wouldn't actually run.

Copy link
Contributor

@mboersma mboersma left a comment

Choose a reason for hiding this comment

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

This lgtm, but it might be a big effort to write a proper test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Partially-installed Releases are never retried
3 participants