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: use field-wise templating for child matrix generators (#11661) #12287
fix: use field-wise templating for child matrix generators (#11661) #12287
Conversation
…11661) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Codecov ReportBase: 47.45% // Head: 47.75% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #12287 +/- ##
==========================================
+ Coverage 47.45% 47.75% +0.29%
==========================================
Files 246 246
Lines 41883 41933 +50
==========================================
+ Hits 19877 20025 +148
+ Misses 20008 19909 -99
- Partials 1998 1999 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Laurentiu Soica <laurentiu@soica.ro>
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.
PR LGTM. Just added a nit for additional information while returning error.
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
/cherry-pick release-2.6 |
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.
LGTM!!
/cherry-pick release-2.5 |
…12287) * fix: use field-wise templating for child matrix generators (#11661) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * test shouldn't use go template Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Update applicationset/utils/utils.go Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Cherry-pick failed with |
…12287) (#12771) * fix: use field-wise templating for child matrix generators (#11661) * test shouldn't use go template * Update applicationset/utils/utils.go --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
…12287) * fix: use field-wise templating for child matrix generators (#11661) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * test shouldn't use go template Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Update applicationset/utils/utils.go Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Manually cherry-picked onto 2.5. |
…rom a git file (#12428) (#12490) * fix: use field-wise templating for child matrix generators (#11661) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * test shouldn't use go template Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * feat: extend List generator with ElementsJsonBase64 Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: proper field name and crd update Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: indentation Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: remove b64 encoding. Based on #12287 Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: generated with codegen Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: reset some of the generated files Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: elementsyaml to cover both yaml and json Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: regenerate code Signed-off-by: laurentiusoica <laurentiu@soica.ro> * Regenerate code Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: update ApplicationSet docs Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: elementsyaml to elementsYaml to be more consistent with other fields Signed-off-by: laurentiusoica <laurentiu@soica.ro> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> Signed-off-by: laurentiusoica <laurentiu@soica.ro> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
* fix: use field-wise templating for child matrix generators (#11661) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * test shouldn't use go template Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * feat: extend List generator with ElementsJsonBase64 Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: proper field name and crd update Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: indentation Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: remove b64 encoding. Based on #12287 Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: generated with codegen Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: reset some of the generated files Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: elementsyaml to cover both yaml and json Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: regenerate code Signed-off-by: laurentiusoica <laurentiu@soica.ro> * Regenerate code Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: update ApplicationSet docs Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: elementsyaml to elementsYaml to be more consistent with other fields Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: preserve field order Signed-off-by: laurentiusoica <laurentiu@soica.ro> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> Signed-off-by: laurentiusoica <laurentiu@soica.ro> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
…11661) (argoproj#12287) * fix: use field-wise templating for child matrix generators (argoproj#11661) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * test shouldn't use go template Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Update applicationset/utils/utils.go Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
…rom a git file (argoproj#12428) (argoproj#12490) * fix: use field-wise templating for child matrix generators (argoproj#11661) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * test shouldn't use go template Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * feat: extend List generator with ElementsJsonBase64 Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: proper field name and crd update Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: indentation Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: remove b64 encoding. Based on argoproj#12287 Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: generated with codegen Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: reset some of the generated files Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: elementsyaml to cover both yaml and json Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: regenerate code Signed-off-by: laurentiusoica <laurentiu@soica.ro> * Regenerate code Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: update ApplicationSet docs Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: elementsyaml to elementsYaml to be more consistent with other fields Signed-off-by: laurentiusoica <laurentiu@soica.ro> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> Signed-off-by: laurentiusoica <laurentiu@soica.ro> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
* fix: use field-wise templating for child matrix generators (argoproj#11661) Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * test shouldn't use go template Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * feat: extend List generator with ElementsJsonBase64 Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: proper field name and crd update Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: indentation Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: remove b64 encoding. Based on argoproj#12287 Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: generated with codegen Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: reset some of the generated files Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: elementsyaml to cover both yaml and json Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> * fix: regenerate code Signed-off-by: laurentiusoica <laurentiu@soica.ro> * Regenerate code Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: update ApplicationSet docs Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: elementsyaml to elementsYaml to be more consistent with other fields Signed-off-by: laurentiusoica <laurentiu@soica.ro> * fix: preserve field order Signed-off-by: laurentiusoica <laurentiu@soica.ro> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Laurentiu Soica <laurentiu@soica.ro> Signed-off-by: laurentiusoica <laurentiu@soica.ro> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Fixes #11661
go-templating over a JSON string makes no sense. There will be tons of syntax conflicts.
This change switches matrix generator templating to use the same field-wise templating strategy as is used for the
template
field.I've confirmed that the test fails with the same error message as in #11661 before this change.