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:
- Remove the failure reason
FailureReason: common.ScriptFailure
from the following line - 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
- The following tests will fail :
testKubernetesMissingImageFeatureFlag
,testKubernetesMissingTagFeatureFlag
,testKubernetesFailingToPullImageTwiceFeatureFlag
,testKubernetesFailingToPullSvcImageTwiceFeatureFlag
,testKubernetesFailingToPullHelperTwiceFeatureFlag
- Re add the failure reason
FailureReason: common.ScriptFailure
the following line - 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
- The following tests will pass :
testKubernetesMissingImageFeatureFlag
,testKubernetesMissingTagFeatureFlag
,testKubernetesFailingToPullImageTwiceFeatureFlag
,testKubernetesFailingToPullSvcImageTwiceFeatureFlag
,testKubernetesFailingToPullHelperTwiceFeatureFlag
What are the relevant issue numbers?
closes #28041 (closed)
Edited by Arran Walker