Skip to content

upgrade.RunWithContext fails if task is canceled through context, rather than proceeding in the background #12877

@rni-HMC

Description

@rni-HMC

Output of helm version: (from go.mod) helm.sh/helm/v3 v3.13.3

Output of kubectl version: (from go.mod) k8s.io/cli-runtime v0.29.0

Cloud Provider/Platform (AKS, GKE, Minikube etc.): Minikube

Using the helm go sdk, calling install.RunWithContext
with a context and then cancelling it, the install proceeds in the background, as documented.

However, calling upgrade.RunWithContext with a context and then cancelling it, the upgrade will proceed in the background, but warn "warning: Upgrade "my-test-deployment" failed: context canceled "

The output of helm status my-test-deployment --debug -n hmd-orc is:

NAME: my-test-deployment
LAST DEPLOYED: Wed Mar 13 17:53:15 2024
NAMESPACE: hmd-orc
STATUS: failed
REVISION: 3
TEST SUITE: None

However, the k8s pod, deployment, replicaset, all seem healthy, and everything appears to function correctly after the update. Only the helm release status shows as failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalehelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.question/support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions