-
Notifications
You must be signed in to change notification settings - Fork 808
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(clouddriver): make fetching properties file more resilient for k…
…8s jobs (#4783) * tests(orca/clouddriver): refactor tests to remove some test code duplications and make them more descriptive * feat(orca/clouddriver): make waitOnJobCompletion retries configurable * feat(clouddriver): make fetching properties file more resilient for k8s jobs If a k8s run job is marked as succeeded, and property file is defined in the stage context, then it can so happen that multiple pods are created for that job. See https://kubernetes.io/docs/concepts/workloads/controllers/job/#handling-pod-and-container-failures In extreme edge cases, the first pod may be around before the second one succeeds. That leads to kubectl logs job/ command failing as seen below: kubectl -n test logs job/test-run-job-5j2vl -c parser Found 2 pods, using pod/test-run-job-5j2vl-fj8hd Error from server (BadRequest): container "parser" in pod "test-run-job-5j2vl-fj8hd" is terminated or Found 2 pods, using pod/test-run-job-5j2vl-fj8hd Error from server (BadRequest): container "parser" in pod "test-run-job-5j2vl-fj8hd" is waiting to start: PodInitializing where that commands defaults to using one of the two pods. To fix this issue, if we encounter an error from the kubectl logs job/ command, we find a successful pod in the job and directly query it for logs. --------- Co-authored-by: Apoorv Mahajan <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
54ba109
commit 9428996
Showing
13 changed files
with
1,279 additions
and
1,045 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.