TRON-2277: Pass along non_retryable_exit_codes to KubernetesCluster objects #998
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Looks like we missed one place where we need to pass along the k8s_options from MASTER configs, when we instantiate our
KubernetesCluster
s fromKubernetesClusterRepository
.Applying this change to a local instance and infrastage now do what we expect and do not retry failed actions if their exit codes are in non_retryable_exit_codes, plus logs what we expect:
(i.e. no retries after the
non-retryable exit code
line + goes to jobrun failed)This also adds 2 fairly dumb tests (the actionrun test alone wouldn't have caught the fix since we're mocking get_cluster's result itself, hence why I also added a really dumb KubernetesClusterRepository->KubernetesCluster one to make sure we don't skip passing along new configs here in the future.
Let me know if you have a better idea for any tests!