Skip to content

Comments

Replace manual disk cleanup with quick-cleanup#471

Closed
sebrandon1 wants to merge 1 commit intoopenshift:oadp-devfrom
sebrandon1:use-quick-cleanup
Closed

Replace manual disk cleanup with quick-cleanup#471
sebrandon1 wants to merge 1 commit intoopenshift:oadp-devfrom
sebrandon1:use-quick-cleanup

Conversation

@sebrandon1
Copy link
Member

@sebrandon1 sebrandon1 commented Feb 18, 2026

Summary

Replace manual disk cleanup scripts with the shared palmsoftware/quick-cleanup GitHub Action.

This consolidates the manual cleanup (swapoff, swap removal, docker system prune) into a single maintained action as a separate step before the publish step. It also provides automatic Docker storage relocation to the larger /mnt partition.

Already in use

quick-cleanup is already adopted in production workflows across multiple repos:

Related PRs

Tracking

Changes

  • Updated .github/workflows/push.yml — extracted cleanup into separate palmsoftware/quick-cleanup@v0 step

Benefits

  • Less boilerplate — replaces manual swap/prune commands
  • Docker relocation — automatically moves Docker storage to /mnt (larger partition)
  • Adaptive cleanup — adjusts intensity based on available space
  • Disk reporting — built-in before/after df -h output
  • Maintained upstream — cleanup targets updated as runner images change
  • Apache 2.0 licensed

Consolidates manual disk cleanup into a shared, maintained action that
also provides automatic Docker storage relocation to /mnt.
@openshift-ci
Copy link

openshift-ci bot commented Feb 18, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sebrandon1
Once this PR has been reviewed and has the lgtm label, please assign sseago for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

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

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

Walkthrough

GitHub Actions workflow updated in the push.yml file to refactor disk space cleanup operations. A new dedicated step using the palmsoftware/quick-cleanup action was added to run before container image publishing, and three explicit cleanup commands were removed from the "Publish container image" step.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/push.yml
Added "Free up disk space" step with palmsoftware/quick-cleanup@v0 action (runs only for vmware-tanzu/velero repo); removed sudo swapoff -a, sudo rm -f /mnt/swapfile, and docker system prune -a --force commands from the "Publish container image" step.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/push.yml:
- Around line 54-58: Update the GitHub Actions step named "Free up disk space"
to pin the action reference to the immutable commit SHA instead of the mutable
tag; replace uses: palmsoftware/quick-cleanup@v0 with uses:
palmsoftware/quick-cleanup@21be80c22ed5745594aa5ca6350089499d54db4b and keep the
original `@v0` tag as a commented note for traceability, leaving the step name and
inputs (cleanup-mode: aggressive) unchanged.

Comment on lines +54 to +58
- name: Free up disk space
if: github.repository == 'vmware-tanzu/velero'
uses: palmsoftware/quick-cleanup@v0
with:
cleanup-mode: aggressive
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Resolve the current commit behind the v0 tag
git ls-remote https://github.com/palmsoftware/quick-cleanup.git refs/tags/v0

Repository: openshift/velero

Length of output: 113


Pin palmsoftware/quick-cleanup to a commit SHA.

Using a mutable tag (@v0) weakens supply-chain integrity. Pin to the specific commit SHA (21be80c22ed5745594aa5ca6350089499d54db4b) and keep the tag as a comment for traceability.

🔒 Proposed change
-        uses: palmsoftware/quick-cleanup@v0
+        # v0
+        uses: palmsoftware/quick-cleanup@21be80c22ed5745594aa5ca6350089499d54db4b
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Free up disk space
if: github.repository == 'vmware-tanzu/velero'
uses: palmsoftware/quick-cleanup@v0
with:
cleanup-mode: aggressive
- name: Free up disk space
if: github.repository == 'vmware-tanzu/velero'
# v0
uses: palmsoftware/quick-cleanup@21be80c22ed5745594aa5ca6350089499d54db4b
with:
cleanup-mode: aggressive
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/push.yml around lines 54 - 58, Update the GitHub Actions
step named "Free up disk space" to pin the action reference to the immutable
commit SHA instead of the mutable tag; replace uses:
palmsoftware/quick-cleanup@v0 with uses:
palmsoftware/quick-cleanup@21be80c22ed5745594aa5ca6350089499d54db4b and keep the
original `@v0` tag as a commented note for traceability, leaving the step name and
inputs (cleanup-mode: aggressive) unchanged.

@sebrandon1
Copy link
Member Author

Closing — GitHub Actions is not enabled on this fork (only Dependabot dependency graph updates run here). The upstream workflows are not executed in this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant