-
Notifications
You must be signed in to change notification settings - Fork 743
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: Support dataTemplate and contextTemplate for Trigger Parameters #543
feat: Support dataTemplate and contextTemplate for Trigger Parameters #543
Conversation
…te if evaluates to empty string or <no value>
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.
Thanks for the PR. This feature is awesome!! Just a couple of suggestions,
- You may need to run
make codegen
and commit updated files for deep copy and api docs. - Can you also add an example sensor YAML file under
examples/sensors
folder that demonstrates the templating functionality?
I feel like an idiot, but I'm still struggling with this. On my mac it gives the error I showed above once it's done allegedly running deep copy funcs (that dont produce any changes). Tried on Linux, and it ran all the way through, but again didn't actually generate any deep-copy code, and for the html/md files it just converted every kind to it's full path...e.g. -<code>context</code></br> <em> Argo Events common.EventContext </em>
+<code>event</code></br> <em>
+github.com/argoproj/argo-events/pkg/apis/common.Event </em> This is beginning to make me doubt my sanity.
I will add an example if not tonight, then sometime in the morning. |
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.
Changes look good to me. I'll fix the make codegen
part.
I'd be very curious what the issue was in case I want to contribute more in the future 😄 |
As you have introduced string fields within an existing struct, the deep-copy script won't update anything. But, |
Also, can you resolve the conflicts? Thanks. |
…argoproj#543) * add dataTemplate and contextTemplate options to trigger parameters * fix comment in api doc, add some test cases, return error from template if evaluates to empty string or <no value> * add example Co-authored-by: Vaibhav <[email protected]>
This PR relates to the issue I opened: #541
One thing I am definitely open to maybe doing is maybe a number on
ResolveParamValue
. With the two additions it feels like it's getting a bit unruly.I can add some coverage as well. So consider this just a WIP to get feedback on the approach.
As a side note, I am having trouble running
make codegen
But that doesn't seem right...