Skip to content

build: bump conductor-go to v1.10.2 and un-skip schedule pause/resume on OSS (fixes #101) - #107

Merged
ambiorix2099 merged 2 commits into
mainfrom
fix/scheduler-pause-resume-verb
Aug 7, 2026
Merged

build: bump conductor-go to v1.10.2 and un-skip schedule pause/resume on OSS (fixes #101)#107
ambiorix2099 merged 2 commits into
mainfrom
fix/scheduler-pause-resume-verb

Conversation

@ambiorix2099

@ambiorix2099 ambiorix2099 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Pull Request type

  • Bugfix
  • Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • WHOSUSING.md
  • Other (please describe):

Changes in this PR

Picks up the SDK fix for #101 and stops skipping the tests that cover it.

  • go.mod / go.sum — bump conductor-go from v1.8.0 to v1.10.2, which contains the
    PUT-with-GET-fallback for per-schedule pause/resume (fix(scheduler): PUT with GET fallback for per-schedule pause/resume go-sdk#276). Without it the
    SDK issues a GET where OSS Conductor requires PUT, and both commands return 405.
  • test/e2e/schedule.bats — remove the skip_if_oss_101 guard, so tests 15 and 16 exercise
    pause/resume in the OSS venue instead of skipping there.

Earlier revisions of this PR implemented the fallback in cmd/scheduler.go. That is gone: per
@mp-orkes the fix belongs in the SDK, so the CLI now only consumes it. No CLI source changes remain.

The tag was checked rather than assumed — v1.10.2 points at merge commit b7135168, and
putThenGet is present in the published module. The jump crosses two minor versions, so build, vet
and the unit suites were re-run.

Verified against Conductor OSS built from main: schedule.bats is 22/22 with 15 and 16 passing
rather than skipped, and the full OSS selection is 109 passed / 0 failed. CI is green here too,
including the E2E (local OSS server) job that runs those two tests.

Issue #
Fixes #101.

Alternatives considered

Implement the fallback in cmd/scheduler.go, as earlier revisions did. Rejected on @mp-orkes'
review: it belongs in the SDK, where every consumer benefits rather than this CLI alone. Keeping
both would have meant the same logic in two layers, with the CLI's copy shadowing the SDK's.

Pin a pseudo-version of the merge commit instead of a tag. Unnecessary — v1.10.2 was cut from that
commit, so a released version is available.

Leave the skip_if_oss_101 guard in place. Rejected: the two tests covering this behaviour would
stay skipped on OSS and CI would report green over the thing we just fixed.

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 79.16667% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/scheduler.go 77.27% 4 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Flag Coverage Δ
unittests 21.95% <79.16%> (+5.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
internal/settings.go 13.79% <100.00%> (+13.79%) ⬆️
cmd/scheduler.go 16.45% <77.27%> (+4.78%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mp-orkes mp-orkes left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct fix for this is in the SDK.

#101 (comment)

Comment thread cmd/scheduler.go Outdated
Comment thread cmd/scheduler.go Outdated
ambiorix2099 added a commit that referenced this pull request Aug 5, 2026
Review feedback from @kowser-orkes on #107.

Narrows the fallback trigger from any 4xx to exactly 405. 405 is the only status that
means "wrong verb"; other 4xx have distinct causes and retrying them with GET was
wrong:

  404  the schedule, or the whole scheduler module, is absent. The retry produced a
       second 404 and reported that, masking the actionable hint added in #86.
  401  auth failure. The retry simply repeated the rejection.

Confirmed against OSS Conductor: wrong verb returns 405, a missing schedule and a
missing endpoint both return 404 — so the previous range genuinely conflated them.
`conductor schedule pause does_not_exist` now surfaces the scheduler-module hint
again instead of a fallback-induced error.

Also trims the doc comment to the three lines that carry information a reader cannot
get from the code.

Tests gain 404 and 401 cases asserting no fallback is attempted, alongside the
existing 405-falls-back and 5xx-does-not cases. Re-verified end to end against
Conductor OSS built from main: pause sets "paused": true, resume clears it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ambiorix2099 added a commit to conductor-oss/go-sdk that referenced this pull request Aug 5, 2026
Follow-up to review feedback on the downstream CLI change
(conductor-oss/conductor-cli#107), applied here so the two implementations do not
diverge.

405 is the only status that means "wrong verb". The previous 4xx range also caught
statuses with unrelated causes, and retrying those with GET was wrong:

  404  the schedule, or the whole scheduler module, is absent — the retry produced a
       second 404 and reported that instead of the real cause
  401  auth failure — the retry simply repeated the rejection

Verified against OSS Conductor: a wrong verb returns 405, while a missing schedule
and a missing endpoint both return 404, so the range genuinely conflated them.

Tests gain 404 and 401 cases asserting no fallback is attempted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ambiorix2099

Copy link
Copy Markdown
Contributor Author

Both addressed in 67c8300 — thanks, the 405 point was a real correctness fix, not just tidying.

Narrowed to 405. You were right that the 4xx range was too broad. Checked what OSS actually returns:

Condition Status
Wrong verb 405
Schedule doesn't exist 404
Endpoint absent (no scheduler module) 404

So the range conflated "wrong verb" with "not found". Concretely, schedule pause does_not_exist used to retry with GET and report the retry's error; it now surfaces the scheduler-module hint added in #86:

Error: Failed to pause schedule 'does_not_exist': scheduler API returned 404.
Hint: schedules require the scheduler module on the Conductor server...

Added tests asserting 404 and 401 do not trigger a fallback, alongside the existing 405-does and 5xx-does-not cases.

Comment trimmed to three lines.

Also applied the same 405 narrowing to the SDK PR (conductor-oss/go-sdk#276) so the two implementations don't diverge — see the note below on which one we keep.


On placement: @mp-orkes asked for this to live in the SDK instead, and he's right — I've opened conductor-oss/go-sdk#276 with the same logic in PauseSchedule/ResumeSchedule. Verified that an unmodified CLI built against that branch pauses and resumes correctly against OSS, so no CLI-side change is needed once it lands.

This PR is therefore likely to be closed in favour of a go.mod bump. Holding it open pending that decision; flagging so nobody reviews it twice.

Comment thread cmd/scheduler.go Outdated
// setSchedulePaused pauses or resumes a schedule. OSS Conductor accepts only PUT on
// these endpoints, older Orkes deployments only GET, so try PUT and fall back to GET
// on 405. Any other status is returned as-is.
func setSchedulePaused(ctx context.Context, name, action string) error {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you are making these changes conductor-oss/go-sdk#276, let's go with that instead of setSchedulePaused.

@ambiorix2099

ambiorix2099 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@mp-orkes I'd like your call rather than guess.

So the fix definitely lands in the SDK, which is in this Go SDK PR #276.

The open question is whether this CLI PR should be closed or kept as a fallback.

@mp-orkes

mp-orkes commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@mp-orkes your CHANGES_REQUESTED here is still the only thing blocking this, so I'd like your call rather than guess.

The SDK fix you asked for is up and approved: conductor-oss/go-sdk#276. Your review comments there are addressed in e156e73 — including the doc comment that still said "4xx" after the code was narrowed to 405, which was a real contradiction, and the trimming.

So the fix definitely lands in the SDK. The open question is only whether this CLI PR still has a job.

Option A — close this. The SDK is the right home and #276 covers it. Once it releases (or we pin the merge commit) go.mod is bumped and the CLI needs no change at all. I verified an unmodified CLI built against that branch pauses and resumes correctly on OSS, so this is provably sufficient.

Option B — keep it as a bridge. The CLI cannot consume #276 until it is released or we pin a pseudo-version, and #101 is release-blocking. Keeping this means schedule pause/resume work on OSS from the next CLI build, independent of the SDK's timeline. The cost is the same logic in two layers, with the CLI's copy shadowing the SDK's until removed.

If B, I'd suggest the removal be tied to the go.mod bump rather than left to memory — happy to open the follow-up issue now so it isn't lost.

One thing that needs doing either way: test/e2e/schedule.bats has a skip_if_oss_101 guard that shipped with #106, skipping tests 15/16 on OSS. Whichever route we take, that guard should be deleted as part of it, otherwise the tests covering this exact behaviour stay skipped and CI reports green over nothing. Noted on #101.

@ambiorix2099 tell your agent, I want a human reply.

@mp-orkes

mp-orkes commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

@mp-orkes I'd like your call rather than guess.

So the fix definitely lands in the SDK, which is in this Go SDK PR #276.

The open question is whether this CLI PR should be closed or kept as a fallback.

We need a CLI PR to update the SDK and make the scheduler tests run in OSS, not skip.

@mp-orkes
mp-orkes marked this pull request as draft August 6, 2026 15:34
ambiorix2099 added a commit to conductor-oss/go-sdk that referenced this pull request Aug 7, 2026
…276)

* fix(scheduler): PUT with GET fallback for per-schedule pause/resume

PauseSchedule and ResumeSchedule issue a GET, but upstream OSS Conductor declares
both endpoints @PutMapping, so every call against an OSS server fails with
405 "Request method 'GET' is not supported".

A straight GET -> PUT swap is not safe, because the accepted verb varies by
deployment:

  OSS Conductor                  PUT only  (GET -> 405)
  Orkes Conductor >= 2026-07-14  PUT or GET
  Orkes Conductor <  2026-07-14  GET only  (PUT -> 405)

Orkes gained PUT in orkes-conductor 1854375f0c (2026-07-14); anything older still
needs GET. Both methods now go through putThenGet, which issues PUT and falls back to
GET only when the server refuses with a 4xx. That keeps existing callers working
against every deployment while converging on the RESTful verb, so the fallback can be
deleted once no supported server predates PUT.

The fallback is limited to 4xx on purpose: retrying a 5xx or a transport error with a
different verb would mask the real fault and report it as a method problem.

Tests model all three deployment generations plus neither-verb-accepted with stub
servers that record the verbs received, asserting that PUT is preferred and GET is
used only when PUT is refused. Also covers the 5xx no-fallback rule and that resume
targets its own endpoint.

Reported downstream as conductor-oss/conductor-cli#101.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(scheduler): narrow the GET fallback to 405

Follow-up to review feedback on the downstream CLI change
(conductor-oss/conductor-cli#107), applied here so the two implementations do not
diverge.

405 is the only status that means "wrong verb". The previous 4xx range also caught
statuses with unrelated causes, and retrying those with GET was wrong:

  404  the schedule, or the whole scheduler module, is absent — the retry produced a
       second 404 and reported that instead of the real cause
  401  auth failure — the retry simply repeated the rejection

Verified against OSS Conductor: a wrong verb returns 405, while a missing schedule
and a missing endpoint both return 404, so the range genuinely conflated them.

Tests gain 404 and 401 cases asserting no fallback is attempted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs(scheduler): correct the stale 4xx wording and trim the comments

Review feedback from @mp-orkes on #276.

The doc comment still said the fallback triggers on "4xx" after the code was narrowed
to 405 — the earlier commit updated the later paragraphs and missed the opening
sentence, so the documentation contradicted the implementation. Fixed.

Trimmed the surrounding commentary: dropped the deployment table, the @PutMapping
reference (irrelevant in Go — that it is a PUT is the only part that matters), and the
in-function comment that restated the doc comment. Same for the test file, where the
per-case notes repeated what the case names already said.

Net -27 lines of comment with no change in behaviour; tests unchanged and passing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Removes the skip_if_oss_101 guard so schedule.bats tests 15 and 16 exercise
pause/resume in the OSS venue rather than skipping there.

The guard was correct while #101 was open — the SDK sent GET where OSS requires PUT,
so both tests failed. The fix landed in the SDK
(conductor-oss/go-sdk#276), so the guard is now a skip that outlives its defect: CI
would report green over the two tests that cover exactly the behaviour we fixed.

Requires the accompanying go.mod bump to a conductor-go version containing that fix.
Verified locally with the SDK change in place: schedule.bats is 22/22 against
Conductor OSS built from main (tests 15 and 16 passing rather than skipped), and the
full OSS selection is 109 passed / 0 failed, with skips down from 12 to 10.

Without the bump these two tests fail on OSS, so this must not merge ahead of it.

Refs #101
v1.10.2 contains the PUT-with-GET-fallback for per-schedule pause/resume
(conductor-oss/go-sdk#276), which is what makes those two commands work against OSS
Conductor. Without it the SDK issues a GET where OSS requires PUT and both return 405.

The tag points at the merge commit b7135168, and the fallback is present in the module
as published — checked rather than assumed, since the jump from v1.8.0 crosses two
minor versions.

Verified against Conductor OSS built from main: schedule.bats is 22/22 with tests 15
and 16 passing rather than skipped, and the full OSS selection is 109 passed / 0 failed.
go build, go vet and the unit suites are clean.

Fixes #101
@ambiorix2099
ambiorix2099 force-pushed the fix/scheduler-pause-resume-verb branch from 67c8300 to e34d0f4 Compare August 7, 2026 17:08
@ambiorix2099 ambiorix2099 changed the title fix(scheduler): try PUT before GET for schedule pause/resume (fixes #101) build: bump conductor-go to v1.10.2 and un-skip schedule pause/resume on OSS (fixes #101) Aug 7, 2026
@ambiorix2099
ambiorix2099 marked this pull request as ready for review August 7, 2026 17:15
@ambiorix2099
ambiorix2099 requested a review from mp-orkes August 7, 2026 17:26
@ambiorix2099
ambiorix2099 merged commit 8ff5f8d into main Aug 7, 2026
4 checks passed
@ambiorix2099
ambiorix2099 deleted the fix/scheduler-pause-resume-verb branch August 7, 2026 17:29
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.

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

5 participants