-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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(podGC): add Workflow-level DeleteDelayDuration
#11325
Conversation
7424dc9
to
d40fc45
Compare
- previously, this could only be set globally for the entire controller - now, users can configure this per Workflow as needed / wanted - and can override the global setting as desired - in particular, this matches how `strategy` etc can already be set per Workflow - so users have a single place to configure all options of `podGC` - in the future (I assume after some deprecation window), the global setting could be removed - `workflowDefaults` can achieve the same thing now Signed-off-by: Anton Gilgur <[email protected]>
Signed-off-by: Anton Gilgur <[email protected]>
this one feels the most potentially problematic, so just split it into its own commit - though it's still generated, so still impacted by the other commits of this PR Signed-off-by: Anton Gilgur <[email protected]>
- no more words or sentences joined together with no spaces in between at least - but also reduced spaces and increased spaces here and there as a side-effect Signed-off-by: Anton Gilgur <[email protected]>
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.
@juliev0 Could you help review this?
Not sure how codegen is failing, I actually haven't been able to reproduce that locally, even after making sure my deps were updated and re-running several times. Can manually fix that, but odd that my local install is not producing the same output |
I wonder if it could be running a different version of Go from what you are? looks like this is using 1.20: https://github.com/argoproj/argo-workflows/blob/master/.github/workflows/ci-build.yaml#L205 |
@agilgur5 Looks good. Once you get the CI all passing, let me know and I can approve. |
So I'm using the dev container on my current machine, which is also using Go vscode ➜ ~/go/src/github.com/argoproj/argo-workflows (feat-workflow-podgc-delay) $ go version
go version go1.20.5 linux/amd64 Strange. Might try rebuilding the dev container from scratch 🤷 |
- for some reason, I needed a fresh build of the devcontainer to get this to reproduce on my local machine - works now 🤷 Signed-off-by: Anton Gilgur <[email protected]>
1152f7d
to
e249623
Compare
Signed-off-by: Anton Gilgur <[email protected]> Signed-off-by: Tim Collins <[email protected]>
Motivation
previously, this could only be set globally for the entire controller
now, users can configure this per Workflow as needed / wanted
strategy
etc can already be set per WorkflowpodGC
in the future (I assume after some deprecation window), the global setting could be removed
workflowDefaults
can achieve the same thing nowResolves #9894
metav1.Duration
was more consistent with the global and simplified the logic as wellModifications
DeleteDelayDuration
to Workflow-levelpodGC
workflow_types.go
, then add logic to use this inpod_cleanup.go
Verification
So
pod_cleanup_test.go
actually has no unit test for the wholequeuePodsForCleanup()
function, so I couldn't just add a unit there. That function could require some mocking to properly test, so I didn't introduce a whole new test suite for that at this point.Notes to Reviewers
Main issue I have is with the codegen for
fields.md
, where it explainsmetav1.Duration
a bit misleadingly 😕Related, durations seem a bit inconsistently typed in the codebase and spec. Some are ints, some are strings, and others are Durations.