-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
feat(appset): Add stringTemplate field to spec #11183
Conversation
Hey, @speedfl I hope you are doing well, I am struggling with having a good unit test to run for the |
@mrmm are you sure you want to create the method Concerning your tests as you are passing the
You can add a test on yaml templating error https://github.com/argoproj/argo-cd/blob/master/applicationset/utils/utils_test.go#L60 Something like template := "hello: {{ .one }}"
tests = append(tests, struct {
name string
fieldVal string
template *string
params map[string]interface{}
expectedVal string
}{
name: "test",
fieldVal: "",
template: &template,
expectedVal: "hello: world",
params: map[string]interface{}{
"one": "world",
"three": "four",
},
}) |
Hello @speedfl, thanks for the prompt reply,
Yes totally, I have just tried to use the work of @rishabh625 (as it was his idea) but using
Thanks for the pointer on how to test, here is my try https://github.com/mrmm/argo-cd/blob/437a9a82fc40e857ec4373297d7a521684bbdc87/applicationset/utils/utils_test.go#L19 (Please let me know if you don't have the time to check this I will gladly stop pinging here 🙏 )
Edit: found my unmarshal mistake in 437a9a8 |
93d3002
to
437a9a8
Compare
Codecov ReportBase: 47.00% // Head: 46.95% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #11183 +/- ##
==========================================
- Coverage 47.00% 46.95% -0.06%
==========================================
Files 243 243
Lines 40443 40455 +12
==========================================
- Hits 19012 18995 -17
- Misses 19520 19546 +26
- Partials 1911 1914 +3
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. |
dbe55d9
to
6566e23
Compare
6566e23
to
1c18276
Compare
Hey @crenshaw-dev (really sorry for the multiple pings) is this feature still relevant to work on or not? |
@mrmm I encountered a situation that may benefit from this feature. This is described in: argoproj/applicationset#609. I would be very grateful if you can take this scenario into consideration when developing this feature (if you did not do that already). From your experience is there any existing feature that might help with my use-case? I have been going over lots of argocd docs and tickets and ended up here. |
@mrmm this feature is definitely still relevant, I just haven't had a chance to dig into the code yet. Hopefully for 2.7? |
@crenshaw-dev Thanks for the reply, and sorry again for the multiple pings. I just wanted confirmation from a main contributor before dedicating more time to it 🙏 (Thanks for the confirmation). I will work on this by the end of the week and the next week, hopefully, will have some tests implemented and refined a little bit of the code. |
@mrmm sounds great! The main thing I'd want to see in this PR (besides working code, tests, the usual :-D) is documentation clarifying when it makes sense to use Specifically, |
Hey there! I have also this use case where this PR would help: #11589 |
ae040d7
to
d8553d1
Compare
…rgoproj#11239) (argoproj#11724) * fix: Unbreak operation termination Signed-off-by: jannfis <[email protected]> * Revert change to Dockerfile Signed-off-by: jannfis <[email protected]> Signed-off-by: jannfis <[email protected]> Signed-off-by: Ronittos <[email protected]>
* fix: support relative links in OCI tags query response Pagination for OCI tags retrieval is not supported when the Link header URI is relative. According to https://docs.docker.com/registry/spec/api/#pagination and the therein referenced RFC https://www.rfc-editor.org/rfc/rfc5988#section-5 relative links should be resolved to the initial request URL Signed-off-by: detvdl <[email protected]> * chore: clean up unused prints & assert errors Signed-off-by: detvdl <[email protected]> * fix: stop double-escaping repoURL Signed-off-by: detvdl <[email protected]> * chore: CodeQL CWE-117 log sanitizing Signed-off-by: detvdl <[email protected]> * chore: remove unnecessary error Signed-off-by: detvdl <[email protected]> Signed-off-by: detvdl <[email protected]> Signed-off-by: Ronittos <[email protected]>
Signed-off-by: Ronittos <[email protected]>
…plate Signed-off-by: Ronittos <[email protected]>
Signed-off-by: Ronittos <[email protected]>
Signed-off-by: Ronittos <[email protected]>
Signed-off-by: Ronittos <[email protected]>
Signed-off-by: Ronittos <[email protected]>
d8553d1
to
21bbdcc
Compare
I'm personally not going to be able to prioritize this for 2.7. If you'd like to advocate for the PR, I'd recommend dropping into one of the contributor meetings. https://github.com/argoproj/argoproj#contributing Sorry I can't help you out this release cycle, I know you've put a lot of work into it! |
@mrmm you did a great job I hope you will find time to continue working on this PR to finally deliver the feature |
This would work nicely with image updater annotations. Currently we have to hardcode all the annotation keys, which deprives us the flexibility of image lists and update strategies |
I think this will be superceded with #14893? |
For everyone watching this PR, due to personal circumstances I was not able to finish up this feature so sorry 🙏. |
@mrmm thank you for all your effort on this! We'll get some version of it merged sooner or later. 🙂 |
Closes: #11213
This will introduce a new field
stringTemplate
that will allow a less restrictive templating of the Application to be generated as the current design is limited by field.Related discussions:
This work was started in #9873
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: