-
Notifications
You must be signed in to change notification settings - Fork 113
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
Support automatic buildrun cleanup #1027
Support automatic buildrun cleanup #1027
Conversation
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.
@raghavbhatnagar96 @Pravalika very nice. @SaschaSchwarze0 and myself pair on this review, pls take a look.
93bfeb2
to
0d88e9d
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.
Two small things.
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.
And just a few glitches on the integration tests.
0d88e9d
to
5509d78
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.
Thank you @raghavbhatnagar96 and @PravallikaDindukurthi.
I think you should already start to work on unit tests for the predicate function parts that you already extracted into separate code. We can then add them to this PR or add them in a separate one depending on how fast reviews happen.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SaschaSchwarze0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
API looks OK to me, as do doc.
I minor code debug logging item. I at least won't gate merge on it.
I'll defer tagging until both @otaviof and @adambkaplan take a peek.
5509d78
to
6be25f9
Compare
6be25f9
to
69520c8
Compare
69520c8
to
20fb06f
Compare
Thanks @raghavbhatnagar96 for addressing all things. Looking for an |
…nagement. Two controllers have been added - buildrun_ttl_cleanup controller and build_limit_cleanup controller. - buildrun_ttl_cleanup controller watches buildruns that are created or updated. - build_limit_cleanup controller watches builds that are created or updated and watches buildruns that are updated. Build specifications were extended by adding a retention parameter that has 4 optional fields - ttlAfterFailed: buildrun is deleted if the mentioned duration of time has passed and the buildrun has failed. - ttlAfterSucceeded: buildrun is deleted if the mentioned duration of time has passed and the buildrun has succeeded. - failedLimit: If this limit is exceeded, the oldest failed buildruns are deleted till the limit is satisfied. - succeededLimit: If this limit is exceeded, the oldest successful buildruns are deleted till the limit is satisfied. Tests have been added to ensure that these controllers are working as intended. Signed-off-by: Pravallika Dindukurthi <dindukurthi.pravallika@gmail.com>
Signed-off-by: Raghav Bhatnagar <raghavbhatnagar96@gmail.com> Signed-off-by: Pravallika Dindukurthi <dindukurthi.pravallika@gmail.com>
20fb06f
to
9dd60e3
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.
/lgtm
Based on Ship #28
Core Ship Proposals:
Commit Summary:
ttlAfterFailed
: buildrun is deleted if the mentioned duration of time has passed and the buildrun has failed.ttlAfterSucceeded
: buildrun is deleted if the mentioned duration of time has passed and the buildrun has succeeded.failedLimit
: If this limit is exceeded, the oldest failed buildruns are deleted till the limit is satisfied.succeededLimit
: If this limit is exceeded, the oldest successful buildruns are deleted till the limit is satisfied.ttlAfterFailed
: buildrun is deleted if the mentioned duration of time has passed and the buildrun has failed.ttlAfterSucceeded
: buildrun is deleted if the mentioned duration of time has passed and the buildrun has succeeded.Signed-off-by: Pravallika Dindukurthi dindukurthi.pravallika@gmail.com
Changes
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes