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(pipelineRef): add resolvedExpectedArtifacts from pipelineTrigger to PipelineRefTrigger #4816

Merged
merged 4 commits into from
Dec 12, 2024

Conversation

edgarulg
Copy link
Contributor

Spel expressions with the function #triggerResolvedArtifact are throwing an evaluation error when pipelineRef feature is enabled in Orca. See: spinnaker/spinnaker#6993

The error happens because when we transform a PipelineTrigger into a PipelineRefTrigger we are not populating the resolvedExpectedArtifacts. As the resolvedExpectedArtifacts is empty the Spel function #triggerResolvedArtifact is not able to collect the artifact we want.

This small code change fix the issue.

@edgarulg
Copy link
Contributor Author

this fix needs to be backported to 1.36.x and 1.35.x

@jasonmcintosh
Copy link
Member

Tests please.

@edgarulg
Copy link
Contributor Author

sure, let me add test around it

@edgarulg
Copy link
Contributor Author

@jasonmcintosh I added tests and PR is ready for review

Copy link
Member

@jasonmcintosh jasonmcintosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the tests are a TOUCH more complicated than they need to be but work well for waht this is. Looks like this should fix dealing with the resolved expected artifacts...

@jasonmcintosh
Copy link
Member

NOT sure we won't hit more cases but... kinda hoping we can keep this as small as possible...

@jasonmcintosh jasonmcintosh added the ready to merge Approved and ready for merge label Dec 12, 2024
@mergify mergify bot added the auto merged Merged automatically by a bot label Dec 12, 2024
@mergify mergify bot merged commit 3c65fe0 into spinnaker:master Dec 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants