Skip to content

fix: enable schedule commands against OSS Conductor#86

Merged
v1r3n merged 1 commit into
mainfrom
fix/scheduler-oss-support
May 21, 2026
Merged

fix: enable schedule commands against OSS Conductor#86
v1r3n merged 1 commit into
mainfrom
fix/scheduler-oss-support

Conversation

@v1r3n

@v1r3n v1r3n commented May 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The schedule subcommands all bailed out with "Not supported in OSS Conductor" if --server-type wasn't Enterprise. But conductor-oss/conductor ships a scheduler/ module (upstreamed by Orkes) mounted at /api/scheduler/* — exactly the paths the conductor-go SDK already calls. The guards were stale and locked OSS users out of a feature that works fine against the default OSS server.
  • Removes the 7 OSS guards, fixes a duplicate-detection bug that hit every OSS schedule create, fixes schedule search, and improves 404 messaging when the scheduler module isn't loaded.

What changed

cmd/scheduler.go:

  • Drop isEnterpriseServer() early-returns from list / get / create / update / delete / pause / resume / search.
  • Add parseSchedulerAPIError: on a 404 from a scheduler endpoint, return a clear hint that the scheduler module may not be enabled, plus a curl verification command.
  • Bug fix — duplicate detection on OSS. OSS Conductor returns 200 OK with an empty body when a schedule doesn't exist (Orkes returns 404). The SDK's GetSchedule unmarshals that into a zero WorkflowSchedule{} and does not error, so the pre-save existence check thought every name already existed. Now also requires existing.Name != "" to treat the schedule as present. Handles both servers uniformly.
  • Bug fix — schedule search. It required a positional arg, then iterated args issuing the same query each time. Now runs once with --workflow / --status / --count flags. The --workflow flag was being read by the handler but never registered — now declared on searchSchedulerCmd.
  • Cleanup: removed an empty if update {} block; surface non-404 errors from the pre-save GetSchedule instead of silently treating them as "doesn't exist".

CLAUDE.md, README.md:

  • Replace the "Schedule commands are only available with Orkes Conductor (Enterprise)" callouts with a note that schedule commands work against both, provided the OSS server includes the scheduler module (the default jar started by conductor server start does).

Test plan

  • go build ./... clean
  • go test ./cmd/... passes
  • Verified end-to-end against a local OSS server (conductor server start):
    • schedule create -n hello -c "0 0 * ? * *" -w hello_world → succeeds (was failing as "already exists" before the duplicate-detection fix)
    • schedule list → shows the new schedule
    • schedule get hello → returns full JSON
    • schedule update -n hello -c "0 0 12 ? * *" -w hello_world → updates cron
    • schedule update -n nope ... → "no such schedule by name nope"
    • second schedule create -n hello ... → correctly errors as duplicate
    • schedule delete hello -y → "deleted successfully"; subsequent schedule list is empty
  • E2E bats suite (test/e2e/schedule.bats) — not run in this PR; needs CI with a live Conductor server
  • Smoke against an Orkes Conductor (Enterprise) instance to confirm no regression on the 404 path

🤖 Generated with Claude Code

The scheduler module was upstreamed by Orkes into conductor-oss/conductor
and is mounted at /api/scheduler/* — the same paths the conductor-go SDK
already calls. The CLI's hardcoded "Not supported in OSS Conductor" guards
on every schedule subcommand were stale and blocked OSS users from features
that work fine against the default OSS server.

Changes:
- Drop isEnterpriseServer() guards on list/get/create/update/delete/pause/
  resume/search. Schedule commands now hit the server for both OSS and Orkes.
- Add parseSchedulerAPIError: when a scheduler call returns 404 (e.g. a
  custom OSS build without the scheduler module), surface a clear hint plus
  a curl verification command rather than a raw 404.
- Fix duplicate-detection on create against OSS: OSS returns 200 with an
  empty body when a schedule does not exist (Orkes returns 404). The SDK
  unmarshals into a zero WorkflowSchedule and does not error, so the
  existence check treated every name as "already exists". Check for an
  empty Name on the returned schedule to handle both servers uniformly.
- Fix `schedule search`: it required a positional arg and then issued the
  same query per-arg. Now runs once with --workflow/--status/--count, and
  the --workflow flag is finally declared (it was being read but never
  registered).
- Remove an empty `if update {}` block; surface non-404 errors from the
  pre-save existence check instead of silently treating them as
  "doesn't exist".

Verified end-to-end against a local OSS Conductor server:
create -> list -> get -> update -> duplicate-create errors -> delete.

Docs (CLAUDE.md, README.md) updated to reflect that schedule commands now
work against both OSS and Orkes Conductor.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@v1r3n v1r3n merged commit c386a0e into main May 21, 2026
3 checks passed
@v1r3n v1r3n deleted the fix/scheduler-oss-support branch May 21, 2026 08:01
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.

3 participants