You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The artifact validation error messages are pretty unhelpful, just
saying things like "artifact X gets consumed before it gets produced"
(or similar), without actually referencing the stages/actions involved.
This becomes problematic if the pipeline got generated for you by
automation and indirection, because you can't simply grep your codebase
for the offending artifact name.
Make the messages more explicit and clear so it's a lot more obvious
what's going on (and hopefully getting a fighting chance to figure out
what's wrong).
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
ret.push(`Both Actions '${producers[name].actionName}' and '${action.actionName}' are producting Artifact '${name}'. Every artifact can only be produced once.`);
Copy file name to clipboardexpand all lines: packages/@aws-cdk/aws-codepipeline/test/test.artifacts.ts
+56-3
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ export = {
46
46
test.equal(errors.length,1);
47
47
consterror=errors[0];
48
48
test.same(error.source,pipeline);
49
-
test.equal(error.message,"Action 'Build' has an unnamed input Artifact that's not used as an output");
49
+
test.equal(error.message,"Action 'Build' is using an unnamed input Artifact, which is not being produced in this pipeline");
50
50
51
51
test.done();
52
52
},
@@ -82,7 +82,7 @@ export = {
82
82
test.equal(errors.length,1);
83
83
consterror=errors[0];
84
84
test.same(error.source,pipeline);
85
-
test.equal(error.message,"Artifact 'named' was used as input before being used as output");
85
+
test.equal(error.message,"Action 'Build' is using input Artifact 'named', which is not being produced in this pipeline");
86
86
87
87
test.done();
88
88
},
@@ -119,7 +119,7 @@ export = {
119
119
test.equal(errors.length,1);
120
120
consterror=errors[0];
121
121
test.same(error.source,pipeline);
122
-
test.equal(error.message,"Artifact 'Artifact_Source_Source' has been used as an output more than once");
122
+
test.equal(error.message,"Both Actions 'Source' and 'Build' are producting Artifact 'Artifact_Source_Source'. Every artifact can only be produced once.");
123
123
124
124
test.done();
125
125
},
@@ -173,6 +173,59 @@ export = {
173
173
test.done();
174
174
},
175
175
176
+
'violation of runOrder constraints is detected and reported'(test: Test){
test.equal(error.message,"Stage 2 Action 2 ('Build'/'build2') is consuming input Artifact 'buildOutput1' before it is being produced at Stage 2 Action 3 ('Build'/'build1')");
225
+
226
+
test.done();
227
+
},
228
+
176
229
'without a name, sanitize the auto stage-action derived name'(test: Test){
0 commit comments