Skip to content

[NO-MERGE][CMPT-5391] feat(pipelines): add dr pipelines input subcommand group - #4

Closed
sunny2get wants to merge 20 commits into
cmpt-5391/pipelines-runsfrom
cmpt-5391/pipelines-inputs
Closed

[NO-MERGE][CMPT-5391] feat(pipelines): add dr pipelines input subcommand group#4
sunny2get wants to merge 20 commits into
cmpt-5391/pipelines-runsfrom
cmpt-5391/pipelines-inputs

Conversation

@sunny2get

Copy link
Copy Markdown
Owner

NO-MERGE — Requirements are still evolving. This PR is open for early review only.
Stack: PR 1 (base)PR 2 (crud)PR 3 (runs)PR 4 (this) → PR 5 → PR 6

Summary

  • Adds dr pipelines input create/list/get/update/delete — manage JSON payloads used by pipeline runs
  • Inputs exist in draft and locked scopes (controlled via --scope/--version)
  • The CLI wraps the payload file in {"payload": …} before sending to the API
  • Introduces cmd/pipelines/input/inpututil/ rendering helpers and internal/pipelines/input.go

Stacked on: cmpt-5391/pipelines-runs — diff here shows only the delta.

Test plan

  • go build ./...
  • go test ./cmd/pipelines/input/... ./internal/pipelines/...
  • dr pipelines input --help — shows create/list/get/update/delete
  • dr pipelines input create --pipeline <id> --help

🤖 Generated with Claude Code

@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 3b67874 to 8635c06 Compare May 25, 2026 17:17
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 3ee2586 to acb594c Compare May 25, 2026 17:17
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 8635c06 to 3717d1b Compare May 25, 2026 17:40
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from acb594c to 81a9af4 Compare May 25, 2026 17:40
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 3717d1b to d5887ee Compare May 25, 2026 17:45
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 81a9af4 to 81c5e2f Compare May 25, 2026 17:45
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from d5887ee to 4221070 Compare May 25, 2026 18:01
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 81c5e2f to 30b4457 Compare May 25, 2026 18:04
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 4221070 to 1d58306 Compare May 25, 2026 18:50
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 30b4457 to e6f95b1 Compare May 25, 2026 18:51
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 1d58306 to c764828 Compare May 25, 2026 20:33
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from e6f95b1 to 1cbe1f0 Compare May 25, 2026 20:33
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from c764828 to e8ffcc9 Compare May 27, 2026 15:57
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 1cbe1f0 to d02bc3c Compare May 27, 2026 15:57
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from e8ffcc9 to 06be780 Compare May 27, 2026 16:19
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from d02bc3c to b0004a8 Compare May 27, 2026 16:19
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 06be780 to 3c836b4 Compare May 27, 2026 16:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from b0004a8 to db0a2cc Compare May 27, 2026 16:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 3c836b4 to a540260 Compare May 27, 2026 16:35
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from db0a2cc to f895bef Compare May 27, 2026 16:35
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from a540260 to ade0a73 Compare May 28, 2026 14:37
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from f895bef to 44e76ff Compare May 28, 2026 14:37
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from ade0a73 to 18a5d09 Compare May 28, 2026 14:40
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 44e76ff to 7b6caf0 Compare May 28, 2026 14:40
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 18a5d09 to 8514908 Compare May 28, 2026 14:46
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 7b6caf0 to eda298a Compare May 28, 2026 14:46
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 8514908 to 5dfeca0 Compare May 28, 2026 15:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from eda298a to 0c11ebd Compare May 28, 2026 15:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from ca7a585 to 5cc306a Compare June 1, 2026 15:00
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-runs branch from 9d6597f to fa1e5bf Compare June 1, 2026 16:03
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch 6 times, most recently from 35653a5 to 1c336c6 Compare June 1, 2026 17:53
cdevent and others added 15 commits June 2, 2026 11:24
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ot-oss#541)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Adds the input subcommand group for managing JSON payloads used by runs
(create/list/get/update/delete).

- internal/pipelines/input.go: CreateInput, ListInputs, GetInput,
  UpdateInput, DeleteInput — API client for the /inputs endpoints
- cmd/pipelines/input/: input create/list/get/update/delete + inpututil
- docs: input section in pipelines.md, input endpoints in pipelines-reference.md

Inputs exist in draft (mutable) and locked (tied to a version) scopes.
The payload file is wrapped in {"payload": …} before sending to the API.

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 input 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>
…putJSON wrapper, package name

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 1c336c6 to cba8234 Compare June 2, 2026 20:34
sunny2get and others added 5 commits June 2, 2026 16:55
…t, delete dead inpututil package

- Add cmd.MarkFlagRequired("pipeline") to input create and input get,
  consistent with del/list/update and all run commands
- Delete cmd/pipeline/input/inpututil/ entirely — all four files
  (payload.go, render.go, and their tests) were dead code; production
  commands import the equivalent functions from internal/pipeline
- Update TestCmd_RejectsMissingPipeline assertions from "--pipeline" to
  "pipeline" to match Cobra's required-flag error format

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ayload DTO, doc fixes

- Add internal/pipeline/input_output_test.go: JSON key remapping (input_id,
  scope/version/pipeline_id), RFC3339 timestamps, empty-list human message,
  table render — mirrors run_output_test.go pattern
- Change inputJSON.Payload from json.RawMessage to map[string]any; remove the
  json.Marshal + ignored-error step in toInputJSON (Payload is already a
  map[string]any from the API decode)
- Fix comment typo: "dr pipelines create" → "dr pipeline create" in
  internal/pipeline/input_payload.go
- Add locked URL variant to input get and input delete rows in
  docs/commands/pipelines-reference.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…d tests

- Replace Version string (with placeholder) in inputJSON with VersionID *int,omitempty
  so draft inputs omit the field entirely and locked inputs emit a numeric value
- Update input_output_test.go assertions for the new pointer field
- Add input_payload_test.go covering ResolvePayload/resolvePayloadFilePath:
  positional arg, --from-file, both-provided, neither-provided, file-not-found,
  invalid JSON, and non-object JSON

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sunny2get sunny2get closed this Jun 15, 2026
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.

5 participants