Skip to content

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

Closed
sunny2get wants to merge 14 commits into
cmpt-5391/pipelines-inputsfrom
cmpt-5391/pipelines-schedules
Closed

[NO-MERGE][CMPT-5391] feat(pipelines): add dr pipelines schedule subcommand group#5
sunny2get wants to merge 14 commits into
cmpt-5391/pipelines-inputsfrom
cmpt-5391/pipelines-schedules

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 (inputs)PR 5 (this) → PR 6

Summary

  • Adds dr pipelines schedule create/list/get/update/delete — manage recurring (cron) runs on locked pipeline versions
  • Schedules are locked-only; every verb requires both --pipeline and --version
  • schedule update requires at least one of --cron or --timezone
  • Introduces cmd/pipelines/schedule/scheduleutil/ rendering helpers and internal/pipelines/schedule.go

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

Test plan

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

🤖 Generated with Claude Code

@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-schedules branch from 35404a1 to 94ce21f Compare May 25, 2026 17:17
@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-schedules branch from 94ce21f to 5ea6ed1 Compare May 25, 2026 17:40
@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-schedules branch from 5ea6ed1 to 7eff4b1 Compare May 25, 2026 17:45
@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-schedules branch from 7eff4b1 to 5a694f0 Compare May 25, 2026 18:06
@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-schedules branch 2 times, most recently from 3e310d8 to e834c10 Compare May 25, 2026 20:33
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch 2 times, most recently from 1cbe1f0 to d02bc3c Compare May 27, 2026 15:57
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from e834c10 to 4e305a6 Compare May 27, 2026 15:57
@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-schedules branch from 4e305a6 to 56c366b Compare May 27, 2026 16:19
@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-schedules branch from 56c366b to 9d3527b Compare May 27, 2026 16:30
@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-schedules branch from 9d3527b to 1c8a8b8 Compare May 27, 2026 16:35
@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-schedules branch from 1c8a8b8 to 3e873ef Compare May 28, 2026 14:37
@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-schedules branch from 3e873ef to 52f6f03 Compare May 28, 2026 14:40
@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-schedules branch from 52f6f03 to 3c81e39 Compare May 28, 2026 14:46
@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-schedules branch from 3c81e39 to 0f77eb6 Compare May 28, 2026 15:30
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 0c11ebd to ac208cb Compare May 28, 2026 15:35
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from ea0c27c to c118196 Compare June 1, 2026 16:09
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 401e448 to 228a53b Compare June 1, 2026 16:15
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from c118196 to 7764148 Compare June 1, 2026 16:16
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 228a53b to 022d33d Compare June 1, 2026 16:24
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 7764148 to 19da909 Compare June 1, 2026 16:25
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 022d33d to 183bc33 Compare June 1, 2026 16:29
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 19da909 to 7e4887c Compare June 1, 2026 16:29
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 183bc33 to 35653a5 Compare June 1, 2026 17:11
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 7e4887c to f2dc161 Compare June 1, 2026 17:11
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 35653a5 to 1c336c6 Compare June 1, 2026 17:53
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from f2dc161 to f31a44b Compare June 1, 2026 17:54
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-inputs branch from 1c336c6 to cba8234 Compare June 2, 2026 20:34
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch 2 times, most recently from e6effed to 4f0e900 Compare June 3, 2026 16:16
sunny2get and others added 12 commits June 3, 2026 16:44
…obot-oss#547)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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>
…n, limit defaults, version prefix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds the schedule subcommand group for managing recurring (cron) runs on
locked pipeline versions (create/list/get/update/delete).

- internal/pipelines/schedule.go: CreateSchedule, ListSchedules,
  GetSchedule, UpdateSchedule, DeleteSchedule
- cmd/pipelines/schedule/: schedule create/list/get/update/delete + scheduleutil
- docs: schedule section in pipelines.md, schedule endpoints in
  pipelines-reference.md

Schedules are locked-only — every verb requires both --pipeline and
--version flags.

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 schedule 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>
…keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sunny2get
sunny2get force-pushed the cmpt-5391/pipelines-schedules branch from 4f0e900 to 0ac9d44 Compare June 3, 2026 20:45
sunny2get and others added 2 commits June 3, 2026 16:52
…t empty cron on update

- Add MarkFlagRequired("version") to all 5 schedule subcommands; remove manual
  "is required" RunE check for the missing-flag case (cobra now handles it)
- Add MarkFlagRequired("cron") to schedule create; remove manual empty check
- In schedule update buildUpdateBody: reject --cron="" explicitly to prevent
  patching an empty cron_expression (set-but-empty was treated as a real change)
- Rename TestCmd_RejectsZeroVersion -> TestCmd_RejectsMissingVersion and update
  assertions from "--version"/"--cron" to "version"/"cron" to match cobra error format
- Add TestBuildUpdateBody_RejectsEmptyCron

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…zone guard, drop unused pipelineID param

- create/cmd.go: align --version error message with other verbs ("is required and must be > 0")
- update/cmd.go: reject --timezone="" the same way --cron="" is rejected; rename unused
  pipelineID param to _ in buildUpdateBody signature
- update/cmd_test.go: add TestBuildUpdateBody_RejectsEmptyTimezone

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.

1 participant