mirror of https://github.com/helm/helm
fix: protect FailingKubeClient.RecordedWaitOptions from data race (#31925)
* fix: protect FailingKubeClient.RecordedWaitOptions from concurrent access Add a sync.Mutex to guard the append to RecordedWaitOptions in GetWaiterWithOptions, fixing a data race detected by -race when concurrent goroutines (e.g. upgrade + rollback) both call GetWaiterWithOptions on the same FailingKubeClient instance. Fixes race failures in TestUpgradeRelease_Interrupted_RollbackOnFailure and TestInstallRelease_RollbackOnFailure_Interrupted. Signed-off-by: Terry Howe <thowe@nvidia.com> * fix: extract appendRecordedWaitOptionsLocked helper with defer unlock Signed-off-by: Terry Howe <terrylhowe@gmail.com> --------- Signed-off-by: Terry Howe <thowe@nvidia.com> Signed-off-by: Terry Howe <terrylhowe@gmail.com>pull/32208/head
parent
c2f1b238a1
commit
a5552edf9f
Loading…
Reference in new issue