Skip to content

Commit

Permalink
feat: add overridable default input artifacts argoproj#2026
Browse files Browse the repository at this point in the history
Signed-off-by: Isitha Subasinghe <[email protected]>
  • Loading branch information
isubasinghe committed Jan 25, 2022
1 parent 95cd467 commit 9f43718
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions workflow/common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,10 @@ func ProcessArgs(tmpl *wfv1.Template, args wfv1.ArgumentsProvider, globalParams,
// Performs substitutions of input artifacts
artifacts := newTmpl.Inputs.Artifacts
for i, inArt := range artifacts {
// if artifact has hard-wired location, we prefer that
if inArt.HasLocationOrKey() {
continue
}

argArt := args.GetArtifactByName(inArt.Name)
if !inArt.Optional {

if !inArt.Optional && !inArt.HasLocationOrKey() {
// artifact must be supplied
if argArt == nil {
return nil, errors.Errorf(errors.CodeBadRequest, "inputs.artifacts.%s was not supplied", inArt.Name)
Expand Down

0 comments on commit 9f43718

Please sign in to comment.