-
Notifications
You must be signed in to change notification settings - Fork 807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(artifacts): consider requiredArtifactIds in expected artifacts when trigger is pipeline type #4489
Conversation
@@ -93,7 +98,7 @@ class DependentPipelineStarter implements ApplicationContextAware { | |||
parameters : [:], | |||
strategy : suppliedParameters.strategy == true, | |||
correlationId : "${parentPipeline.id}_${parentPipelineStageId}_${pipelineConfig.id}_${parentPipeline.startTime}".toString(), | |||
expectedArtifactIds : expectedArtifactIds | |||
expectedArtifactIds : expectedArtifactIds.toSet().toList() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only to avoid duplications between trigger and stages
orca-front50/src/main/groovy/com/netflix/spinnaker/orca/front50/DependentPipelineStarter.groovy
Show resolved
Hide resolved
It would also help to connect the dots to show if this ever worked in previous versions of spinnaker, what PR broke it, and ideally why. |
…en trigger is pipeline type
4d000b1
to
21743b4
Compare
Absolutely, I tested it out in |
Great. Those PRs look like they went in to 1.30, so I assume it's been broken since then. Any idea about 1.29? |
Also, cc: @jervi since you made those PRs. |
I tested it out in orca |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall these changes looks good to me. This is an issue present in 1.30 & 1.31 only. I left my approve but I want @dbyron-sf or @xibz to have last word on approve these changes.
I also added @jervi as reviewer because these seems to be related with his PRs.
Also I'm seeing the build failing so would be good to rerun it because seems to be a false-positive error in the tests. |
@nemesisOsorio I'm still hoping for a bit more in the description I think. Something like
but with the important missing bits filled in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for overlooking this artifact flow when creating the aforementioned PR's 😬
But I think this is a good fix @nemesisOsorio.
@nemesisOsorio Thank you for the changes and updates! This looks a lot better :).
@jervi No worries! It happens. Im trying to think of any major features I've written that contained 0 bugs. Yep, can't think of one haha. |
@Mergifyio backport release-1.30.x release-1.31.x |
✅ Backports have been created
|
…en if you have 2 or more of the same type (#4579) * refactor(artifacts): partially reverting #4397 * refactor(artifacts): reverted #4489 * refactor(artifacts): reverted #4526 * test(artifacts): added test when parent pipeline does not provide expected artifacts * test(artifacts): resolve artifacts for default and prior artifacts --------- Co-authored-by: Cameron Motevasselani <cmotevasselani@gmail.com>
…en if you have 2 or more of the same type (#4579) * refactor(artifacts): partially reverting #4397 * refactor(artifacts): reverted #4489 * refactor(artifacts): reverted #4526 * test(artifacts): added test when parent pipeline does not provide expected artifacts * test(artifacts): resolve artifacts for default and prior artifacts --------- Co-authored-by: Cameron Motevasselani <cmotevasselani@gmail.com> (cherry picked from commit 645059d) # Conflicts: # orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ArtifactUtilsSpec.groovy
…en if you have 2 or more of the same type (#4579) * refactor(artifacts): partially reverting #4397 * refactor(artifacts): reverted #4489 * refactor(artifacts): reverted #4526 * test(artifacts): added test when parent pipeline does not provide expected artifacts * test(artifacts): resolve artifacts for default and prior artifacts --------- Co-authored-by: Cameron Motevasselani <cmotevasselani@gmail.com> (cherry picked from commit 645059d) # Conflicts: # orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ArtifactUtilsSpec.groovy
…en if you have 2 or more of the same type (#4579) * refactor(artifacts): partially reverting #4397 * refactor(artifacts): reverted #4489 * refactor(artifacts): reverted #4526 * test(artifacts): added test when parent pipeline does not provide expected artifacts * test(artifacts): resolve artifacts for default and prior artifacts --------- Co-authored-by: Cameron Motevasselani <cmotevasselani@gmail.com> (cherry picked from commit 645059d) # Conflicts: # orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ArtifactUtilsSpec.groovy
…en if you have 2 or more of the same type (backport #4579) (#4587) * fix(artifacts): Automated triggers with artifact constraints are broken if you have 2 or more of the same type (#4579) * refactor(artifacts): partially reverting #4397 * refactor(artifacts): reverted #4489 * refactor(artifacts): reverted #4526 * test(artifacts): added test when parent pipeline does not provide expected artifacts * test(artifacts): resolve artifacts for default and prior artifacts --------- Co-authored-by: Cameron Motevasselani <cmotevasselani@gmail.com> (cherry picked from commit 645059d) # Conflicts: # orca-core/src/test/groovy/com/netflix/spinnaker/orca/pipeline/util/ArtifactUtilsSpec.groovy * fix(artifacts): resolving git conflicts from #4579 for release-1.31.x (#4590) --------- Co-authored-by: Nemesis Osorio <nemesis211_6@hotmail.com>
…en trigger is pipeline type (spinnaker#4489) (spinnaker#4490) (cherry picked from commit 45de5bc) Co-authored-by: Nemesis Osorio <nemesis211_6@hotmail.com>
fixes spinnaker/spinnaker#6850
Expected artifacts can be used in automated triggers and stages,
as in the following example:
if we trigger the previous pipeline with a pipeline stage like the next image
you will get the following error even if the parent pipeline provides the artifact
in the example, I'm using a
Find Artifacts From Resource (Manifest)
stageand producing a docker image as an artifact, I believe this is a similar case for building
the docker image using Jenkins like is mentioned in spinnaker/spinnaker#6850
Before the following PRs (i.e. in spinnaker < 1.30)
Deploy (Manifest)
stage was working#4322
#4397
#4404
the intent of this PR is to restore the previous behavior
Here are the pipelines
pr-pipelines.zip