argo-workflows icon indicating copy to clipboard operation
argo-workflows copied to clipboard

Use GoTemplate

Open speedfl opened this issue 3 years ago • 3 comments

Summary

In ArgoCd I implemented usage of GoTemplate for ApplicationSet. Purpose is to do the same in workflow

https://github.com/argoproj/argo-cd/pull/10026

Use Cases

It will be useful in all complex case needing advanced templating features.

Work done with expressions is going in this direction.

Here is an example: examples/expression-reusing-verbose-snippets.yaml


Message from the maintainers:

Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.

speedfl avatar Sep 06 '22 19:09 speedfl

Hey I would like to work on this issue please assign it to me.

callmetushar123 avatar Sep 08 '22 13:09 callmetushar123

I don't think this is the right direction. Templating in Argo Workflows is hard to use because (a) we use a mixture of technologies and (b) the evaluation point is non-deterministic.

Adding a new technology to the mix will not help.

alexec avatar Sep 09 '22 14:09 alexec

Adendmum, to fix both (a) and (b) we need to converge on one techonlogy, which is expr and, wherever we might need to evaluate something, allow the user to define the expression and add it. Example is this:

https://github.com/argoproj/argo-workflows/blob/3a3f1599718453ca79800cfc28f6631ee780911b/pkg/apis/workflow/v1alpha1/workflow_types.go#L452

alexec avatar Sep 09 '22 15:09 alexec