-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: add status.lastRunAt
field to WorkflowTemplates. Fixes #1915
#13310
base: main
Are you sure you want to change the base?
Conversation
1475af0
to
552cefd
Compare
The implementation of the feature doesn't do what I expected. Currently, it is only recording uses of WorkflowTemplates when invoked through the user interface or CLI, and will not record uses in many other circumstances:
I am happy, if we document it as so, that this only records I was also expecting this new value to be visible in the user interface, although I might be persuaded that that should be in a separate PR if you have a good reason. |
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.
This should be performed by the controller to catch all uses, not by the server.
Thank you for being so helpful. You were absolutely right. I will make a separate PR to add the Status field and then see how to perform this task with the controller to catch all uses. |
status.lastRunAt
field to WorkflowTemplates. Fixes #1915
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.
By itself, adding the field but not setting it isn't useful, and is possibly misleading as someone might reasonably expect it to get set.
Could you add the code to set this value from the controller to this same PR please.
Thank you for your advice, I will add the code to set this value from the controller to the same PR later. |
3d5a319
to
80c1b0d
Compare
Hi, In my first attempt, I updated the Getter in context.go to an Operator (supporting both get and update operations), using the clientSet as a parameter. However, the requeue and get workflow did not function as expected. In my second attempt, I used NewContextFromClientSet instead of NewContext, to hold both the informer getter and clientSet. Unfortunately, I was unable to retrieve clientSet in some callers of the ValidateWorkflow function. Ultimately, I implemented the feature like this. I am unsure if there is a better approach. Could you please review it again? The main updates to support recording LastRunAt are in the second commit. Thank you. |
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.
This is a hard problem to solve correctly. The main objection here is how hard this is on the kubernetes API, and how it will slow down execution.
5bc7bdc
to
aa010cf
Compare
I am away for 2 weeks, I will take a look when I can. |
Happy holidays! |
Hi,@Joibel, could you take a look at this PR? thank you. |
…ixes argoproj#1915 Signed-off-by: qingfeng777 <[email protected]>
Fixes #1915
Motivation
It would be useful to know when the last time a WorkflowTemplate was run
Modifications
Verification
run locally, submit workflow from template and check