-
Notifications
You must be signed in to change notification settings - Fork 61
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean histories for successful and failed jobs separately #462
Conversation
e3670ac
to
c6daaf4
Compare
f6eb673
to
b75fa12
Compare
Required on arm machines with emulation capabilities (M1) to override arch.
87a1666
to
23d3aef
Compare
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 first review and I'm not through yet. Overall good, but I don't see much changes in the documentation. Could you double check whether the new variables and behaviour is updated in the docs?
Thanks for the review 馃槉 The documentation is auto generated here: |
Not everything is automated :) |
a6a51ec
to
4615457
Compare
I ran the integration tests locally and get some error output here. It doesn't fail the tests (exit code 0) but I'm not sure if that's something as expected: === CONT Test_Check/TestJobCleanup
check_integration_test.go:105: 2 deleted Checks found
=== RUN Test_Check/TestReconciliation
envsuite_test.go:147: creating namespace 'x7vs977v'
envsuite_test.go:154: creating resource 'x7vs977v/check-integration-test0'
=== CONT Test_Check
logger.go:130: 2021-07-26T18:53:20.936+0200 DEBUG adding job to the queue {"check": "x7vs977v/check-integration-test0"}
logger.go:130: 2021-07-26T18:53:20.948+0200 DEBUG adding job to the queue {"check": "x7vs977v/check-integration-test0"}
=== CONT Test_Check/TestReconciliation
check_integration_test.go:169: 1 Jobs found
=== CONT Test_Check
logger.go:130: 2021-07-26T18:53:22.349+0200 ERROR could not patch status conditions {"check": "x7vs977v/check-integration-test0", "error": "Patch \"http://127.0.0.1:36099/apis/backup.appuio.ch/v1alpha1/namespaces/x7vs977v/checks/check-integration-test0/status\": dial tcp 127.0.0.1:36099: connect: connection refused"}
logger.go:130: 2021-07-26T18:53:22.349+0200 ERROR cannot create job {"check": "x7vs977v/check-integration-test0", "repository": "s3:/", "error": "Post \"http://127.0.0.1:36099/apis/batch/v1/namespaces/x7vs977v/jobs\": dial tcp 127.0.0.1:36099: connect: connection refused"}
--- PASS: Test_Check (14.69s)
--- PASS: Test_Check/TestJobCleanup (7.17s)
--- PASS: Test_Check/TestReconciliation (1.03s) |
Please have another look at the documentation
Basically, a |
Thanks 馃槉 I'm still working on the documentation馃憤 |
I have the same issues on master. Did not yet take a look at the root cause. |
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.
Looking good now. I left some remarks. Those are general thoughts and I do not see a need for a change.
c3a93cc
to
535540e
Compare
Summary
This PR allows cleaning histories for successful and failed jobs separately.
It introduces two new fields to the job CRDs
.spec.successfulJobsHistoryLimit
and.spec.failedJobsHistoryLimit
. Those fields override the now deprecated.spec.KeepJobs
.It fixes a bug where most job cleanups would result in always cleaning up the last object, due to the misuse of a pointer in a for range loop:
https://github.com/vshn/k8up/blob/df7435b28e9292ef88c582bce9aa64bb69185168/executor/check.go#L115-L117
Fixes #322.
Checklist
bug
,enhancement
,documentation
,change
,breaking
,as they show up in the changelog