Skip to content

feat: adding jobservice dashboard feature to cli#776

Draft
NishchayRajput wants to merge 1 commit intogoharbor:mainfrom
NishchayRajput:feat/jobservice-dashboard
Draft

feat: adding jobservice dashboard feature to cli#776
NishchayRajput wants to merge 1 commit intogoharbor:mainfrom
NishchayRajput:feat/jobservice-dashboard

Conversation

@NishchayRajput
Copy link
Copy Markdown

Description

This feature introduces a new Harbor CLI Job Service command group that brings core Job Service Dashboard capabilities into CLI workflows for system administrators.

New top-level command:

  • harbor jobservice

High-level goals delivered in this iteration:

  1. Expose Job Service monitoring and control operations from CLI.
  2. Support queue lifecycle operations with both interactive and non-interactive UX.
  3. Add safer action targeting (state-aware pause/resume selection).
  4. Support batch queue operations (multi-select and multi-type input).

Type of Change

1) Root command integration

  • Added jobservice into main CLI command tree under System commands.
  • Users now discover this feature directly from harbor --help.

2) Worker pools and workers visibility

  • harbor jobservice pools list
    • Lists available worker pools.
  • harbor jobservice workers list [POOL_ID]
    • Lists workers for a selected pool.
    • Defaults to all pools when POOL_ID is not provided.

3) Queue monitoring and control

  • harbor jobservice queues list
    • Lists queue type, pending count, latency, and paused state.
  • harbor jobservice queues stop
  • harbor jobservice queues pause
  • harbor jobservice queues resume

4) Interactive queue selection improvements

Interactive queue action mode is enabled when --type is not provided.

Enhancements added:

  • Multi-select picker for queue actions.
  • State-aware filtering:
    • resume only shows currently paused queues.
    • pause only shows currently unpaused queues.
    • stop shows all queue types.
  • Clear empty-state messages:
    • no paused queues available to resume
    • all queues are already paused

5) Schedules support

  • harbor jobservice schedules list --page --page-size
    • Supports pagination and displays X-Total-Count context.
  • harbor jobservice schedules status
    • Shows global scheduler paused/running state.
  • harbor jobservice schedules pause-all
  • harbor jobservice schedules resume-all
    • Implemented via queue action on scheduler type.

6) Job log retrieval

  • harbor jobservice jobs log --job-id
    • Fetches and prints plain-text log content for a specific job.

7) API integration layer

Implemented Job Service API wrappers in CLI API layer:

  • get worker pools

  • get workers by pool

  • list job queues

  • action pending jobs (stop/pause/resume)

  • get job log

  • list schedules

  • get scheduler paused status

  • Bug fix

  • New feature

  • Refactor

  • Documentation update

  • Chore / maintenance

Changes

Core command wiring:

  • cmd/harbor/root/cmd.go
  • cmd/harbor/root/jobservice/cmd.go

Jobservice commands:

  • cmd/harbor/root/jobservice/pools/list.go
  • cmd/harbor/root/jobservice/workers/workers.go
  • cmd/harbor/root/jobservice/workers/list.go
  • cmd/harbor/root/jobservice/queues/list.go
  • cmd/harbor/root/jobservice/schedules/list.go
  • cmd/harbor/root/jobservice/jobs/log.go

API layer:

  • pkg/api/jobservice_handler.go

Views:

  • pkg/views/jobservice/pools/view.go
  • pkg/views/jobservice/workers/view.go
  • pkg/views/jobservice/queues/view.go
  • pkg/views/jobservice/schedules/view.go

Signed-off-by: Nishchay Rajput <nishchayr@iitbhilai.ac.in>
@NishchayRajput NishchayRajput mentioned this pull request Mar 28, 2026
5 tasks
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.

[feature]: Implementing Jobservice Dashboard in CLI

1 participant