-
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(expressions): fetch labels from actually deployed manfiest #4508
fix(expressions): fetch labels from actually deployed manfiest #4508
Conversation
3b0bb9f
to
94b1790
Compare
// deployment | ||
// this is safe as we assert above that we're only using successful deploy stages, so this key | ||
// should always exist | ||
List<Map> manifests = (List<Map>) stage.get().getContext().get("outputs.manifests"); |
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.
Is this safe timing-wise? Like, could this run when manifests exists, but output.manifests doesn't?
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.
I'm reasonably confident outputs.manifests
should always exist once a deploy stage is succeeded - and this expression only considers stages in a succeeded state.
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.
Aaah, I see it a few lines up.
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.
Seems like this is worth a release note so people know to be on the lookout for a change in behavior...even if we don't expect one.
@Mergifyio update |
✅ Branch has been successfully updated |
Release preview for spinnaker/orca#4508
We have a use case where we want to make a stage conditional based on the value of the sequence label. This label isn't present in the
manifests
field of the context, because it's only applied during deployment by Clouddriver.The
outputs.manfiests
field contains the full Kubernetes manifests that were deployed by Clouddriver, including labels added by Spinnaker during deployment. This should be a backwards compatible change, as the labels in themanifests
field are obviously also included in theoutputs.manfiests
field.I would have preferred to make this change optional using a default function argument of false, but it seems the
FunctionParameter
class has no concept of a default value.