Skip to content

schedule pause/resume broken on OSS Conductor: SDK sends GET where server requires PUT (405) #101

Description

@ambiorix2099

Summary

conductor schedule pause and conductor schedule resume are completely broken against OSS
Conductor
. Both fail with HTTP 405 because the SDK issues a GET to endpoints that only accept
PUT.

This is the code path enabled by #86 ("enable schedule commands against OSS Conductor"). It is
invisible to CI because CI runs CONDUCTOR_SERVER_TYPE=Enterprise against a remote Orkes server,
which tolerates GET on these endpoints.

Found while regression-testing CLI branch cleanup/remove-skill-command (#100) against server
3.32.0-rc.23 on a local OSS instance.

Reproduction

$ conductor schedule create -n probe_sched -c '0 0 * ? * *' -w hello_world
$ conductor schedule pause probe_sched
Error: Failed to pause schedule 'probe_sched': Request method 'GET' is not supported (status: 405)

$ conductor schedule resume probe_sched
Error: Failed to resume schedule 'probe_sched': Request method 'GET' is not supported (status: 405)

The endpoints work fine — with the correct verb:

$ curl -s -o /dev/null -w '%{http_code}\n' -X PUT \
    http://localhost:8080/api/scheduler/schedules/probe_sched/pause
200
$ conductor schedule get probe_sched | grep paused
   "paused": true,

Method probe

Against /api/scheduler/schedules/<name>/pause and /resume on 3.32.0-rc.23 OSS:

Method Status Meaning
GET 405 method not allowed — this is what the CLI sends
PUT 404 method accepted; 404 only because the probe name didn't exist
POST 405 method not allowed

PUT returning 404 rather than 405 is the tell: the route exists and accepts PUT only.

Root cause

github.com/conductor-sdk/conductor-go v1.8.0 (pinned in go.mod:7),
sdk/client/api_scheduler_resource.go:

// line 184-193 — PauseSchedule
path := fmt.Sprintf("/scheduler/schedules/%s/pause", name)
resp, err := a.Get(ctx, path, nil, &result)     // ← line 188, should be a.Put

// line 251-255 — ResumeSchedule
path := fmt.Sprintf("/scheduler/schedules/%s/resume", name)
resp, err := a.Get(ctx, path, nil, &result)     // ← line 255, should be a.Put

cmd/scheduler.go is not itself at fault — pauseSchedule (line 242) and resumeSchedule
(line 257) correctly delegate to SchedulerClient.PauseSchedule/ResumeSchedule.

APIClient already exposes both verbs (Get at sdk/client/api_client.go:443, Put at :463),
so the upstream fix is a two-line change.

Impact

  • schedule pause and schedule resume are unusable on OSS Conductor — no workaround available to
    users beyond calling the REST API directly.
  • Silent in CI, so this can regress again undetected.
  • Users on Orkes/Enterprise are unaffected.

Fix options

A. Upstream (correct fix). Change a.Geta.Put at api_scheduler_resource.go:188 and
:255 in conductor-sdk/conductor-go, release, then bump go.mod here. Cleanest, but gated on an
SDK release cycle.

B. In-repo workaround (unblocks a near-term release). Call APIClient.Put directly from
cmd/scheduler.go, bypassing SchedulerClient.PauseSchedule/ResumeSchedule for these two
operations. Ships without waiting on the SDK; should be reverted once A lands.

Recommend B for the imminent release with a TODO referencing this issue, and A in parallel.

Test coverage

test/e2e/schedule.bats already covers this — tests 15 ("Pause schedule") and
16 ("Resume schedule") both fail against OSS. They pass in CI only because of the Enterprise
target. Local run against rc.23: 19/22 passing, these two failing (the third failure is
bash: timeout: command not found, a macOS-only gap, unrelated).

Once fixed, these tests should be tagged so they run in an OSS venue as well as Enterprise —
otherwise the gap reopens.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions