Loading
Recognize AlreadyExists conflicts beyond generateName collisions
Fixes intermittent failures in testKubernetesFailingToPullImageTwiceFeatureFlag and its Helper/ServiceImage siblings by widening the k8s pod-create conflict check to cover a case beyond generateName collisions.
isConflict()only matched the "server was not able to generate a unique name" message (generateName collisions).- A fixed-
Namepod create retried while the previous same-named pod is still terminating returns a different message ("object is being deleted: ... already exists") with the sameAlreadyExistsreason, and was falling through as an unhandled error instead ofrequestPodCreation's intended GET-existing-resource fallback. - Switched to
kubeerrors.IsAlreadyExists(err), which matches on the standardReasonfield rather than a single hardcoded message substring, covering both cases. - Added
TestIsConflictcovering both message variants plus unrelated-conflict, non-status-error, and nil-error cases.
Closes #39692 (closed)