Skip to content

added tag retention tasks list subcommand#954

Open
NishchayRajput wants to merge 1 commit into
goharbor:mainfrom
NishchayRajput:feat/tag-retention-task-list
Open

added tag retention tasks list subcommand#954
NishchayRajput wants to merge 1 commit into
goharbor:mainfrom
NishchayRajput:feat/tag-retention-task-list

Conversation

@NishchayRajput
Copy link
Copy Markdown
Contributor

Description

Briefly describe what this pull request does and why the change is needed.
This PR adds the harbor tag retention tasks list subcommand to display retention execution tasks for a specific retention policy execution.

It enables users to view and inspect individual tasks from a retention policy execution, showing details such as task ID, repository, status, retention metrics, and timing information.

Type of Change

Please select the relevant type.

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • Chore / maintenance

Changes

  • Added harbor tag retention tasks command group under harbor tag retention.
  • Added harbor tag retention tasks list [PROJECT_NAME] with:
    • Interactive mode (prompts for project and execution selection if not provided)
    • Flag-based mode with explicit project ID/name and execution ID
    • Table-based output with task details (ID, Execution ID, Repository, Status, Retained, Total, Code, Revision, Start Time, End Time)
    • JSON output format support via --output-format json
  • Added retention API helpers:
    • ListRetentionExecutions() - fetch retention executions for a policy
    • ListRetentionTasks() - fetch tasks for a specific execution
  • Added UI/View components:
    • RetentionExecutionList() - interactive selection view for executions
    • RetentionTaskList() - task details table view
  • Added prompt helpers:
    • GetRetentionExecutionIDFromUser() - interactive execution selection

Signed-off-by: Nishchay Rajput <nishchayr@iitbhilai.ac.in>
@NishchayRajput NishchayRajput force-pushed the feat/tag-retention-task-list branch from cba1786 to a8299ba Compare May 27, 2026 21:01
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

❌ Patch coverage is 0% with 213 lines in your changes missing coverage. Please review.
✅ Project coverage is 8.50%. Comparing base (60ad0bd) to head (a8299ba).
⚠️ Report is 181 commits behind head on main.

Files with missing lines Patch % Lines
pkg/views/retention/tasks/view.go 0.00% 65 Missing ⚠️
pkg/views/retention/executions/view.go 0.00% 59 Missing ⚠️
cmd/harbor/root/tag/retention/tasks/list.go 0.00% 44 Missing ⚠️
pkg/api/retention_execution_handler.go 0.00% 16 Missing ⚠️
pkg/prompt/prompt.go 0.00% 13 Missing ⚠️
cmd/harbor/root/tag/retention/tasks/cmd.go 0.00% 9 Missing ⚠️
cmd/harbor/root/tag/retention/cmd.go 0.00% 5 Missing ⚠️
cmd/harbor/root/tag/retention/tasks.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main    #954      +/-   ##
=========================================
- Coverage   10.99%   8.50%   -2.49%     
=========================================
  Files         173     320     +147     
  Lines        8671   15953    +7282     
=========================================
+ Hits          953    1357     +404     
- Misses       7612   14470    +6858     
- Partials      106     126      +20     

☔ 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.

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