Skip to content

[CMPT-5391] feat(pipelines): add dr pipeline run subcommands - #541

Merged
sunny2get merged 14 commits into
datarobot-oss:mainfrom
sunny2get:cmpt-5391/pipelines-runs
Jun 2, 2026
Merged

[CMPT-5391] feat(pipelines): add dr pipeline run subcommands#541
sunny2get merged 14 commits into
datarobot-oss:mainfrom
sunny2get:cmpt-5391/pipelines-runs

Conversation

@sunny2get

@sunny2get sunny2get commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds dr pipeline run create/list/get/status/cancel — trigger, inspect, and cancel pipeline executions
  • Wire-level API uses dispatches/dispatch_id; --output-format json remaps these to run_id/covalent_run_id
  • Introduces cmd/pipeline/run/runutil/ shared error-handling helpers and internal/pipeline/run.go
  • Uses scopeflag.Flags (shared `--pipeline`/`--scope`/`--version`) from the base infrastructure
  • --pipeline flag is marked required via cmd.MarkFlagRequired on all subcommands that accept it

Stacked on: `cmpt-5391/pipelines-crud` (merged as PR #532) — diff shows only the delta above main.

Test plan

  • `go build ./...`
  • `go test ./cmd/pipeline/run/... ./internal/pipeline/...`
  • `task lint`
  • `dr pipeline run --help` — shows create/list/get/status/cancel
  • `dr pipeline run create --pipeline --input --help`

🤖 Generated with Claude Code

sunny2get and others added 9 commits June 1, 2026 12:03
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds the run subcommand group for triggering and inspecting pipeline
executions (create/list/get/status/cancel).

- internal/pipelines/run.go: CreateRun, ListRuns, GetRun, RunStatus,
  CancelRun — API client for the /dispatches endpoints
- cmd/pipelines/run/: run create/list/get/status/cancel + runutil output
- docs: run section in pipelines.md, run endpoints in pipelines-reference.md

Wire-level endpoints still use "dispatches"; CLI output uses run_id /
covalent_run_id per the vocabulary migration in the codebase.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Apply sunny/pipelines versions of run subcommand files and update
all import paths to use internal/pipeline (singular) after rename.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n, limit defaults, version prefix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 9d6597f to fa1e5bf Compare June 1, 2026 16:03
@sunny2get
sunny2get requested a review from Copilot June 1, 2026 16:08
@sunny2get

Copy link
Copy Markdown
Contributor Author

bugbot run

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🔐 Fork smoke tests started by maintainer

⏳ Security scans passed. Running smoke tests...

Commit: fa1e5bf27683ae000c933d97670a7e889e20177c
View run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new dr pipeline run command group to trigger and inspect pipeline executions (“dispatches” on the wire) and extends docs to cover the new subcommands and API mapping.

Changes:

  • Introduces internal/pipeline run client + rendering helpers (JSON remapping to run_id / covalent_run_id).
  • Adds dr pipeline run create/list/get/status/cancel cobra commands with unit tests.
  • Updates command documentation to include the new run group and endpoint reference.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
internal/pipeline/run.go Adds client wrappers for run/dispatch endpoints (create/list/get/status/cancel).
internal/pipeline/run_test.go Unit tests for run client URL routing, query params, and error propagation.
internal/pipeline/run_output.go Adds human/JSON rendering for runs and run status (CLI vocabulary mapping).
docs/commands/README.md Updates command tree + overview list to include pipeline run subcommands.
docs/commands/pipelines-reference.md Adds run endpoints mapping section and quick lookup entries.
docs/commands/pipeline.md Documents run subcommands and updates error-handling table.
cmd/pipeline/run/status/cmd.go Implements dr pipeline run status command and 404 suppression.
cmd/pipeline/run/status/cmd_test.go Tests for output validation, missing pipeline, and 404 suppression helper.
cmd/pipeline/run/list/cmd.go Implements dr pipeline run list command with pagination flags.
cmd/pipeline/run/list/cmd_test.go Tests flag presence, missing pipeline, invalid scope combo, invalid output.
cmd/pipeline/run/get/cmd.go Implements dr pipeline run get command and 404 suppression.
cmd/pipeline/run/get/cmd_test.go Tests output validation, missing pipeline, positional arg requirement, 404 suppression helper.
cmd/pipeline/run/create/cmd.go Implements dr pipeline run create command with required --input.
cmd/pipeline/run/create/cmd_test.go Tests required flags, invalid output, invalid scope/version combination, flag presence.
cmd/pipeline/run/cmd.go Registers the run command group and subcommands.
cmd/pipeline/run/cmd_test.go Ensures all run verbs are registered.
cmd/pipeline/run/cancel/cmd.go Implements dr pipeline run cancel command.
cmd/pipeline/run/cancel/cmd_test.go Tests missing pipeline, invalid scope combo, positional arg requirement, command name.
cmd/pipeline/cmd.go Wires run into the top-level dr pipeline command group.
cmd/pipeline/cmd_test.go Updates expectations to include run as a subcommand.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmd/pipeline/run/get/cmd.go
Comment thread cmd/pipeline/run/status/cmd.go
Comment thread cmd/pipeline/run/cancel/cmd.go
Comment thread cmd/pipeline/run/cancel/cmd.go
Comment thread docs/commands/pipeline.md Outdated
Comment thread docs/commands/pipelines-reference.md Outdated
Comment thread internal/pipeline/run_output.go Outdated
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

All smoke tests passed! (Fork PR)

✅ Security Scan: success
✅ Linux: success
✅ Windows: success

View run details

Comment thread cmd/pipeline/run/cancel/cmd.go
Comment thread cmd/pipeline/run/get/cmd.go Outdated
sunny2get and others added 3 commits June 1, 2026 12:19
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…cancel, 404 suppression in cancel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e duplicate handlers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sunny2get

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f8c0d08. Configure here.

Comment thread internal/pipeline/run.go
…ch API camelCase convention

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

🔐 Fork smoke tests started by maintainer

⏳ Security scans passed. Running smoke tests...

Commit: 2cb09363188a9bdb8af1ca8af60f3e12357a140a
View run

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

Comment thread docs/commands/pipelines-reference.md Outdated
Comment thread docs/commands/pipelines-reference.md Outdated
Comment thread internal/pipeline/run_output.go
@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

All smoke tests passed! (Fork PR)

✅ Security Scan: success
✅ Linux: success
✅ Windows: success

View run details

…h_id in lookup table, locked URLs for status/cancel

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@victorborshak victorborshak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sunny2get
sunny2get merged commit 031c538 into datarobot-oss:main Jun 2, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants