{"record":{"id":"65786f541c938c7e","repo":"argoproj/argo-workflows","slug":"unable-to-resolve-references-w","errorCode":null,"errorMessage":"unable to resolve references: %w","messagePattern":"unable to resolve references: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/controller/steps.go","lineNumber":536,"sourceCode":"\t\t\treturn argoerrors.InternalWrapError(err)\n\t\t}\n\t\t// Restore Hooks\n\t\tnewStep.Hooks = originalHooks\n\n\t\tartifacts := wfv1.Artifacts{}\n\t\t// Step 2: replace all artifact references\n\t\tfor _, art := range newStep.Arguments.Artifacts {\n\t\t\tif art.From == \"\" && art.FromExpression == \"\" {\n\t\t\t\tartifacts = append(artifacts, art)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tresolvedArt, err := scope.resolveArtifact(ctx, &art)\n\t\t\tif err != nil {\n\t\t\t\tif art.Optional {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\treturn fmt.Errorf(\"unable to resolve references: %w\", err)\n\t\t\t}\n\t\t\tif art.Optional && !resolvedArt.HasLocationOrKey() {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tresolvedArt.Name = art.Name\n\t\t\tartifacts = append(artifacts, *resolvedArt)\n\t\t}\n\t\tnewStep.Arguments.Artifacts = artifacts\n\t\tnewStepGroup[i] = newStep\n\t\treturn nil\n\t}\n\n\t// When resolveStepReferences we can use a channel parallelStepNum to control the number of concurrencies\n\tparallelStepNum := make(chan string, 500)\n\terrCh := make(chan error, len(stepGroup)) // contains the error during resolveStepReferences\n\tvar wg sync.WaitGroup\n\tfor i, step := range stepGroup {\n\t\tparallelStepNum <- step.Name","sourceCodeStart":518,"sourceCodeEnd":554,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/controller/steps.go#L518-L554","documentation":"When resolving an output artifact reference (e.g. from another step's artifacts) during expandStepGroup's parallel resolution, scope.resolveArtifact failed. If the artifact is not declared optional, the whole reference resolution fails with this wrapped error.","triggerScenarios":"A step's inputs reference an artifact (e.g. {{steps.X.outputs.artifacts.Y}} or artifacts.from expressions) whose producer step didn't produce it, was skipped, or failed — resolveArtifact returns an error and art.Optional is false.","commonSituations":"Downstream step consumes an artifact from a step that was skipped via when/continueOn; upstream step failed to generate the artifact; typo in artifact name/path.","solutions":["Mark the consuming artifact as optional: true if the producer may be skipped","Fix the upstream step so it actually produces the artifact","Verify the artifact reference names and expressions are correct"],"exampleFix":"// before\ninputs:\n  artifacts:\n    - name: out\n      from: '{{steps.build.outputs.artifacts.bin}}'\n// after\ninputs:\n  artifacts:\n    - name: out\n      from: '{{steps.build.outputs.artifacts.bin}}'\n      optional: true","handlingStrategy":"validation","validationCode":"// in template definition, declare optional artifacts whose producers may be skipped\n// inputs.artifacts[].optional: true","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Mark consumer artifacts optional when producers can be skipped/failed","Verify upstream steps emit the artifacts they promise","Gate downstream steps on upstream status with when"],"tags":["kubernetes","argo-workflows","artifacts","steps"],"backgroundTag":"artifact-reference-unresolved","analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}