-
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.
fix(kubernetes): Fix artifact binding for run job (#3540)
* fix(kubernetes): Fix artifact binding for run job The Kubernetes V2 Run Job stage doesn't bind artifacts if the manifest source is text. This is because we only populate artifacts if the source is an artifact; luckily the logic to populate artifacts is independent of the aritfact source, so we can run it in either case by just removing the if condition. * fix(kubernetes): Fix tests and V1 run job The prior commit broke the V1 run job stage, as it uses the same KubernetesJobRunner but doesn't have any of the relevant fields that ManifestEvaluator tries to evaluate. The root cause of this is that the context doesn't have a Source, so inherits the default of Source.Text; this causes us to try to look up the manifest text, which is null. Ideally we'd have the V1 run job stage set a different value (maybe Source.None because we don't even really have a manifest here) or change the default. But given the impending deprecation of the V1 provider (and that it's a bit risky to change the default) let's just work around the issue by short-circuiting manifest evaluation if the source is Text but there is no text. Also, the prior commit broke some tests as we're now running manifestEvaluator.evaluate more than before; fix these tests.
- Loading branch information
Showing
2 changed files
with
53 additions
and
19 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