Skip to content

Explicitly set kubernetes pull image failure as script failure

What does this MR do?

Tis MR adds explicitness on the failure reason for kubernetes executor image pull failure

Why was this MR needed?

This MR is needed to avoid confusion on the k8s executor image pull failure raison and prevent futures changes to break the functionality

What's the best way to test this MR?

The tests are done manually:

  1. Remove the failure reason FailureReason: common.ScriptFailure from the following line
  2. Run the k8s integration test TestRunIntegrationTestsWithFeatureFlag with the following command
$ ./scripts/go_test_no_env -tags=integration,kubernetes -v -run TestRunIntegrationTestsWithFeatureFlag gitlab.com/gitlab-org/gitlab-runner/executors/kubernetes
  1. The following tests will fail : testKubernetesMissingImageFeatureFlag, testKubernetesMissingTagFeatureFlag, testKubernetesFailingToPullImageTwiceFeatureFlag, testKubernetesFailingToPullSvcImageTwiceFeatureFlag, testKubernetesFailingToPullHelperTwiceFeatureFlag
  2. Re add the failure reason FailureReason: common.ScriptFailure the following line
  3. Run the k8s integration test TestRunIntegrationTestsWithFeatureFlag with the following command
$ ./scripts/go_test_no_env -tags=integration,kubernetes -v -run TestRunIntegrationTestsWithFeatureFlag gitlab.com/gitlab-org/gitlab-runner/executors/kubernetes
  1. The following tests will pass : testKubernetesMissingImageFeatureFlag, testKubernetesMissingTagFeatureFlag, testKubernetesFailingToPullImageTwiceFeatureFlag, testKubernetesFailingToPullSvcImageTwiceFeatureFlag, testKubernetesFailingToPullHelperTwiceFeatureFlag

What are the relevant issue numbers?

closes #28041 (closed)

Edited by Arran Walker

Merge request reports