refactor: Schedules delegates all scheduler HTTP to SchedulerClient#138
Closed
kowser-orkes wants to merge 1 commit into
Closed
refactor: Schedules delegates all scheduler HTTP to SchedulerClient#138kowser-orkes wants to merge 1 commit into
kowser-orkes wants to merge 1 commit into
Conversation
Schedules no longer builds raw /scheduler/* requests itself — it holds a SchedulerClient (OrkesSchedulerClient) and translates its typed responses to/from Schedule/ScheduleInfo, keeping only agent-scoped naming (prefix/unprefix), declarative reconcile, and runNow sugar (still via WorkflowClient, untouched). Exception translation (404 -> NotFound, 400+"cron" -> InvalidCron, else AgentAPIException) stays in the facade; SchedulerClient itself keeps throwing plain ConductorClientException so standard-client users see no new exception types. toSaveRequest/fromWorkflowSchedule now build/read the typed SaveScheduleRequest/WorkflowSchedule DTOs instead of raw Maps. Public API is unchanged (Example99ScheduledAgent compiles with zero changes). Test fallout is purely mechanical: the four helper-level tests that asserted on raw Map shapes now assert the same values through typed getters. Every behavioural test (prefix/unprefix, validation, runNow*, reconcile) is unmodified and still passes.
kowser-orkes
force-pushed
the
feature/single-scheduler-client
branch
from
July 20, 2026 04:43
ea261e5 to
f56504f
Compare
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
kowser-orkes
changed the base branch from
main
to
feat/file-client-transfer-adapters
July 20, 2026 05:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request type
NOTE: Please remember to run
./gradlew spotlessApplyto fix any format violations.Changes in this PR
Describe the new behavior from this PR, and why it's needed
Schedules(the agent scheduling facade) no longer builds/scheduler/*requests itself — it now delegates toSchedulerClient, translating typedWorkflowSchedule/SaveScheduleRequestDTOs instead of raw JSONSchedulerClient.pauseSchedule/resumeSchedulesendPUTfirst (OSS Conductor's verb), fallback to
GETand cache that verdict per client instance only on a405— same client now worksunmodified against OSS Conductor, Orkes Conductor (
GET-only today), and agentspan-embeddedservers
SchedulerClient.getSchedulethrows consistently on a miss on every server family (previouslyOSS's 200-empty vs Orkes' 404 diverged)
pauseSchedule(name, reason)(persisted aspausedReasonwhere supported),nextRunTime(read) and
cronSchedulesonWorkflowSchedule/SaveScheduleRequest— additive,null-omitting so unused fields don't change existing wire bodies
Schedules/Schedule/ScheduleInfois unchanged —Example99ScheduledAgentcompiles with zero changes
the
GETfor that call, so pause/resume silently no-op'd on the triggering call — fixed tofall through to
GETimmediately instead of only on the next callIssue #
Alternatives considered
Describe alternative implementation you have considered
GET-only orPUT-only) instead of PUT-first-with-cached-fallback —rejected, breaks portability across server families without per-deployment configuration
InvalidCronexception sniffing — kept as-is for now (openproduct decision, revisit before GA)