Skip to content
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): Parent and child pipeline artifact resolution (backport #4575) #4582

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 31, 2023

This is an automatic backport of pull request #4575 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

This fix allows us to revert #4397
since that makes retrieving bound artifacts actually more strict for
most use cases. So this commit addresses the root cause that that PR was
trying to implement.

When a parent pipeline triggers a child pipeline, the child pipeline
should be able to resolve incoming artifacts properly. Right now that
does not happen because `expectedArtifactIds` is needed in the trigger
section, otherwise no resolution will occur.

This change fixes the parent payload to include `expectedArtifactIds` by
viewing the child pipeline's top level expected artifacts and finding
the intersection between expected artifacts and artifacts to be sent.
With that intersection we can grab the expected artifact ids and
properly set the the necessary field to allow for child pipelines to
ingest the artifact.

Signed-off-by: benjamin-j-powell <bjp@apple.com>
Co-authored-by: Benevolent Benjamin Powell <benjamin_j_powell@apple.com>
(cherry picked from commit 2e3c5f0)
@link108 link108 merged commit 6ad5cd0 into release-1.31.x Nov 6, 2023
2 checks passed
@mergify mergify bot deleted the mergify/bp/release-1.31.x/pr-4575 branch November 6, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants