Skip to content

Conversation

@vg006
Copy link
Contributor

@vg006 vg006 commented Jan 27, 2026

Overview

Fixes #657

This PR aims to implement the purge command as proposed and discussed in the issue.

Commands supported

# Get details of a specific purge job
> harbor schedule purge status <purge_id>

# Stop the purge audit log execution specified by ID
> harbor schedule purge stop <purge_id>

# Get purge job logs
> harbor schedule purge logs <purge_id>

# Get purge jobs' schedule
> harbor schedule purge list

# Get purge jobs results
> harbor schedule purge history

# Create a purge job schedule
> harbor schedule purge create (--cron / -e) <cron_expression>

# Update purge's schedule
> harbor schedule purge update (--cron / -e) <cron_expression>

Signed-off-by: vg006 <devvg006@gmail.com>
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 3.29670% with 88 lines in your changes missing coverage. Please review.
✅ Project coverage is 7.14%. Comparing base (60ad0bd) to head (7573b0e).
⚠️ Report is 82 commits behind head on main.

Files with missing lines Patch % Lines
cmd/harbor/root/schedule/purge/history.go 0.00% 20 Missing ⚠️
cmd/harbor/root/schedule/purge/cmd.go 0.00% 15 Missing ⚠️
cmd/harbor/root/schedule/purge/logs.go 0.00% 11 Missing ⚠️
cmd/harbor/root/schedule/purge/status.go 0.00% 11 Missing ⚠️
cmd/harbor/root/schedule/purge/stop.go 0.00% 11 Missing ⚠️
cmd/harbor/root/schedule/purge/create.go 0.00% 7 Missing ⚠️
cmd/harbor/root/schedule/purge/update.go 0.00% 7 Missing ⚠️
cmd/harbor/root/schedule/purge/list.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #658      +/-   ##
=========================================
- Coverage   10.99%   7.14%   -3.85%     
=========================================
  Files         173     268      +95     
  Lines        8671   12938    +4267     
=========================================
- Hits          953     925      -28     
- Misses       7612   11905    +4293     
- Partials      106     108       +2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: vg006 <devvg006@gmail.com>
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.

Proposal: Implementation of purge command

1 participant