-
Notifications
You must be signed in to change notification settings - Fork 811
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(preconfigured): Allow PreconfiguredJobStage parameters to map to one-dimensional array property values #3830
Conversation
...main/groovy/com/netflix/spinnaker/orca/clouddriver/pipeline/job/PreconfiguredJobStage.groovy
Outdated
Show resolved
Hide resolved
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.
Thank you, @jaydee864! Apologies this took me a while to review.
All looks good minor comment about the exception.
Co-authored-by: Mark Vulfson <markvu@live.com>
@marchello2000 @cfieber @srekapalli Are there any further changes needed from my side on this PR? |
This is a great candidate for backporting @Mergifyio backport release-1.19.x release-1.20.x release-1.21.x edit the fix is for 1.21 so the 1.19 and 1.20 backports will fail 🤣 |
…one-dimensional array property values (#3830) * fix(preconfigured): Update setNestedValue to handle one-dimensional array objects * fix(preconfigured): Handle case where array property is missing from root object * refactor(preconfigured): Use Groovy regex syntax * refactor(preconfigured): Update exception message to be more meaningful Co-authored-by: Mark Vulfson <markvu@live.com> Co-authored-by: Mark Vulfson <markvu@live.com> (cherry picked from commit 3fa29ca)
Command
|
…one-dimensional array property values (bp #3830) (#3846) * fix(preconfigured): Update setNestedValue to handle one-dimensional array objects * fix(preconfigured): Handle case where array property is missing from root object * refactor(preconfigured): Use Groovy regex syntax * refactor(preconfigured): Update exception message to be more meaningful Co-authored-by: Mark Vulfson <markvu@live.com> Co-authored-by: Mark Vulfson <markvu@live.com> (cherry picked from commit 3fa29ca) Co-authored-by: Joe DeStefano <jld864@gmail.com>
…one-dimensional array property values (spinnaker#3830) * fix(preconfigured): Update setNestedValue to handle one-dimensional array objects * fix(preconfigured): Handle case where array property is missing from root object * refactor(preconfigured): Use Groovy regex syntax * refactor(preconfigured): Update exception message to be more meaningful Co-authored-by: Mark Vulfson <markvu@live.com> Co-authored-by: Mark Vulfson <markvu@live.com>
Addresses spinnaker/spinnaker#5889 by checking for property nodes which end in array notation and extracting them from the parent node as a List, then returning the Object at the desired index.
Notably, this PR does not support 2+ dimensional arrays (eg. "foo[0][1]"). I struggled to come up with a clean and viable solution for handling that scenario, but I'm also not entirely sure it's needed for the object models that Orca is currently working with.