Skip to content
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

🌱 hack: add capv-janitor for automated ci cleanup #2681

Merged

Conversation

chrischdi
Copy link
Member

What this PR does / why we need it:

Adds hack/tools/janitor, a small tool which can be run as cronjob in CI to cleanup leftover objects over time.

As of now cleanup was done manually but since running jobs in parallel, we may have more leftover objects so its more often required to cleanup things.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 1, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Feb 1, 2024
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (827178d) 64.49% compared to head (2f9794b) 64.68%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2681      +/-   ##
==========================================
+ Coverage   64.49%   64.68%   +0.19%     
==========================================
  Files         119      119              
  Lines        8640     8640              
==========================================
+ Hits         5572     5589      +17     
+ Misses       2633     2621      -12     
+ Partials      435      430       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@chrischdi chrischdi force-pushed the pr-introduce-ci-janitor branch 4 times, most recently from 261d643 to 75f922b Compare February 1, 2024 11:17
@chrischdi
Copy link
Member Author

/retest

(flake)

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2024
@sbueringer
Copy link
Member

I'll take a look next week

hack/tools/janitor/README.md Show resolved Hide resolved
hack/tools/janitor/config/cronjob/cronjob.yaml Outdated Show resolved Hide resolved
hack/tools/janitor/Dockerfile Outdated Show resolved Hide resolved
hack/tools/janitor/README.md Outdated Show resolved Hide resolved
hack/tools/janitor/README.md Outdated Show resolved Hide resolved
hack/tools/janitor/janitor.go Outdated Show resolved Hide resolved
hack/tools/janitor/janitor.go Show resolved Hide resolved
hack/tools/janitor/janitor.go Outdated Show resolved Hide resolved
hack/tools/janitor/janitor.go Show resolved Hide resolved
hack/tools/janitor/janitor.go Show resolved Hide resolved
@sbueringer
Copy link
Member

Main comment is this one: #2681 (comment)

(potentially a lot follows from that)

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 5, 2024
@chrischdi chrischdi force-pushed the pr-introduce-ci-janitor branch 3 times, most recently from 4b2c353 to dfca622 Compare February 5, 2024 14:06
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 6, 2024
@sbueringer
Copy link
Member

/lgtm
/appprove

/hold

Not sure if you want further reviews.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 6, 2024
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 6, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1231d9b9be95628c71325e35491ebf33eb726886

@sbueringer
Copy link
Member

/approve

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 6, 2024
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/hold cancel
Great work here!

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 6, 2024
@fabriziopandini
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, sbueringer

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:
  • OWNERS [fabriziopandini,sbueringer]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 0f19e91 into kubernetes-sigs:main Feb 6, 2024
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.10 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants