[CMPT-5391] feat(pipelines): add dr pipeline CRUD, version, and graph commands - #532
Conversation
3b4d4c4 to
6327eb4
Compare
|
bugbot run |
5322202 to
a4d9113
Compare
|
bugbot run |
|
🔐 Fork smoke tests started by maintainer ⏳ Security scans passed. Running smoke tests... Commit: |
|
✅ All smoke tests passed! (Fork PR) ✅ Security Scan: success |
|
bugbot run |
|
🔐 Fork smoke tests started by maintainer ⏳ Security scans passed. Running smoke tests... Commit: |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6393067. Configure here.
|
✅ All smoke tests passed! (Fork PR) ✅ Security Scan: success |
ajalon1
left a comment
There was a problem hiding this comment.
LGTM. Everything looks pretty consistent. Thanks for the extensive docs for each command.
Also, telemetry updates look straightforward.
Few minor nits, but nothing blocking.
a4f522a to
00e1376
Compare
|
🔐 Fork smoke tests started by maintainer ⏳ Security scans passed. Running smoke tests... Commit: |
|
✅ All smoke tests passed! (Fork PR) ✅ Security Scan: success |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces the core pipeline management subcommands: - create / list / get / update / delete / lock — full pipeline lifecycle - version list / version get — inspect pipeline versions - graph — render the pipeline/task DAG (draft or locked scope) - scopeflag package — shared --pipeline/--scope/--version flag binding Internal additions: - internal/pipelines/pipeline.go: CreatePipeline, ListPipelines, GetPipeline, UpdatePipeline, DeletePipeline, LockPipeline, multipart upload helpers - internal/pipelines/version.go: ListVersions, GetVersion, GetGraph Documentation: pipelines.md CRUD sections, initial pipelines-reference.md. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
First used by the graph command on this branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Update all cmd/pipeline subcommand files to use internal/pipeline (singular) package import and pipeline.X symbol references after the internal/pipelines → internal/pipeline 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>
…up commands Add: alias check, RunE=nil guard, full subcommand list (del/lock/version/graph), version sub-subcommand registration, and version metadata assertions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace all dr pipelines → dr pipeline and DATAROBOT_CLI_FEATURE_PIPELINES → DATAROBOT_CLI_FEATURE_PIPELINE to match the registered command name and feature gate key. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Path - Add SilenceUsage: true to create, list, and update commands (consistent with del, get, lock, graph, version get/list) - Extract duplicated resolveFilePath into cmd/pipeline/fileutil package - Move TestResolveFilePath tests to fileutil package Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
decodeHTTPError was returning fmt.Errorf when the response body had a "detail" field, so errors.As(err, &httpErr) always failed on FastAPI 404s — users saw raw "HTTP 404 Not Found: Not Found" instead of the friendly "No pipeline found with id: ..." message. Fix: always return *drapi.HTTPError (with Detail field carrying the message). errors.As continues to work for 404 suppression in del/get/graph. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers RenderCreateResponse, RenderPipeline, and RenderPipelines for both JSON and human output paths, including edge cases (empty list, no tasks, no description, no latest version, error detail). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eStdout, MarkFlagRequired for graph
- Standardize --mode flag description across create and list to "Pipeline mode: draft or locked"
- Fix list Short description: "List pipeline." -> "List pipelines."
- Replace manual --pipeline guard in graph/cmd.go with cmd.MarkFlagRequired("pipeline")
- Extract captureStdout into cmd/pipeline/internal/testutil.CaptureStdout and remove 6 duplicate definitions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
00e1376 to
051edb8
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
dr pipelineCRUD commands:create,get,list,update,del,lock,graphdr pipeline versionsubcommands:get,listtelemetry.TrackWith) to all pipeline and version commandsDATAROBOT_CLI_FEATURE_PIPELINE=truefeature gateStacked on
internal/pipeline, feature gate, root wiring)Next PRs in stack
cmpt-5391/pipelines-runs—dr pipeline runsubcommandscmpt-5391/pipelines-inputs—dr pipeline inputsubcommandscmpt-5391/pipelines-schedules—dr pipeline schedulesubcommandscmpt-5391/pipelines-environments—dr pipeline environmentsubcommandsTest plan
go build ./...passestask lintpassesgo test ./cmd/pipeline/...passesDATAROBOT_CLI_FEATURE_PIPELINE=true dr pipeline --helpshows all subcommandsDATAROBOT_CLI_FEATURE_PIPELINE=true dr pipeline version --helpshows get/list🤖 Generated with Claude Code
Note
Medium Risk
Introduces many authenticated API operations including delete and lock, but behavior is gated, well-tested, and mostly read-only or idempotent-friendly 404 handling.
Overview
This PR turns the previously empty
dr pipelinegroup into a full Pipelines API CLI (still behindDATAROBOT_CLI_FEATURE_PIPELINE), wiring create, list, get, update, delete, lock, graph, and aversionsubgroup (list / get).Commands call new
internal/pipelineclients for/api/v2/pipelines(multipart upload for create/update, JSON elsewhere), shared--output-format,fileutilpath resolution, andscopeflagdraft/locked routing for graph. Several verbs treat 404 as a dim message and exit 0;drapi.HTTPErrornow carries APIdetailtext. Docs add pipeline usage and an endpoint reference.Telemetry is attached to each new command; coverage is mostly unit tests around flags, rendering, and HTTP helpers.
Reviewed by Cursor Bugbot for commit 6393067. Configure here.