Repository navigation
CCOR-13193 - run integration tests against Conductor OSS, and fix two client bugs it surfaced - #156
Conversation
05bc8d5 to
c49f547
Compare
0d55ef4 to
8104cee
Compare
776ed5a to
c3e1bc9
Compare
… client bugs it surfaced
c3e1bc9 to
0ca968b
Compare
conductoross/conductor 3.34.0 moved to an Alpine base that ships busybox wget but no curl, so the curl healthcheck never passes, the container is marked unhealthy, and the hello-world service (service_healthy) never starts. This fails the "Documentation validation" smoke test. Use wget against 127.0.0.1 (busybox wget does not fall back from ::1), and set pull_policy: always so a pre-3.34.0 `latest` cached locally, which has curl but not wget, is replaced before the healthcheck runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
None of the setup-java steps set `cache:`, so every job downloaded the full Gradle dependency set from Maven Central on each run. Add `cache: gradle` to each setup-java step that runs Gradle on PR and test paths. publish-release.yml is left uncached so releases always build from freshly resolved dependencies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-e2e jobs" This reverts commit 0c61f4fbcab9a8c3b3bc4fcfa57a76f5df3ba4fe. Out of scope for this PR; the Gradle cache change will go separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The completion monitor failed a workflow's future on the first getWorkflow error, so a brief server restart or network blip failed callers whose workflows were still running. Track when each workflow's current run of failed polls started, and complete its future exceptionally only after polls have failed continuously for one minute. A successful poll resets the clock. Warn once per run of failures and log at DEBUG after that, since the 100 ms poll interval would otherwise log a WARN on every tick during an outage. Tests shorten the timeout through a package-private setter. Also correct docs that said the E2E_TEST_OSS_CONDUCTOR_VERSION org variable is set to `latest`, and that the local default tag is `latest`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mselves Four OSS-gated integration tests failed because of the tests, not the server, so they now run against both OSS and Orkes: - testUpdateByRefNameSync completed only there_is_no_worker tasks, so nothing completed the workflow's first task (x_test_worker_0) on a server without workers. Complete every SIMPLE task, as testUpdateByRefName already does. - testSearchTasks and testPaginatedSearchTasks queried workflowId, which has no column in OSS's Postgres task_index. Query workflowType instead. - SchedulerClientTests.testMethods asserted that execution search returned something, which passed on Orkes only because of the shared cluster's history. A new testSearchExecutions fires its own schedule every second and waits for search to find that schedule's executions. Tag calls move to testSchedulerTags, gated because OSS has no schedule tags endpoint. Remove TestUtil.tolerateNotFound: the 500-for-not-found it accepted was fixed in OSS v3.32.2 (conductor-oss/conductor#1571), so cleanup goes back to the plain 404 check. Link testIdempotency's gate to conductor-oss/conductor#1527, reword the workflow-tags reason, and add CONTRIBUTING guidance to check a test's Orkes-only dependencies before gating it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…them to the console On a failed run, write the conductor-server logs to tests/build/oss-conductor-server.log and print the exit code and the file's path, rather than printing the whole log. CI is unaffected: the integration-tests-oss job runs its own steps and still prints the logs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
propp-orkes
left a comment
There was a problem hiding this comment.
Thanks, the two client fixes look correct and well covered. Monitor: the per-workflow catch keeps the loop alive, and the failure window uses a monotonic clock that resets on success. Workers: shutdown() clears the runner, so restart works.
Two blocking items in the CI wiring (inline): the temporary push: trigger, and the new job runs PR code with a write-scoped token. Also inline: the JUnit report under workflow_run attaches to the wrong commit, and a metrics gap on restart.
| uses: mikepenz/action-junit-report@v6 | ||
| with: | ||
| report_paths: 'tests/build/test-results/test/TEST-*.xml' | ||
| check_name: OSS Integration Test Report |
There was a problem hiding this comment.
Under workflow_run, GITHUB_SHA is the latest commit on the default branch, not the PR head. Without commit:, this check run (and the existing one at L72) attaches to that commit, not to the PR. The action documents commit for this case: "This is useful when you run it with workflow_run."
| check_name: OSS Integration Test Report | |
| check_name: OSS Integration Test Report | |
| commit: ${{ github.event.workflow_run.head_sha || github.sha }} |
The temporary push trigger hides this, because push sets GITHUB_SHA to the branch head. It shows up the first time this runs from main.
There was a problem hiding this comment.
fixed for this PR via the switch to a normal on-pr-push wf run.
(Claude notes: The existing Orkes job's report still goes to main's HEAD. This PR no longer touches integration-tests.yml, so we've left that for a follow-up.)
| } | ||
|
|
||
| @Test | ||
| @DisabledIfEnvironmentVariable(named = "CONDUCTOR_SERVER_TYPE", matches = "oss", |
There was a problem hiding this comment.
Nit: this file has the same disabledReason 11 times, and "CONDUCTOR_SERVER_TYPE" / "oss" appear in 26 places across the suite. A shared constant, or a small meta-annotation such as @DisabledOnOss(reason = ...) wrapping @DisabledIfEnvironmentVariable, would make the gating easier to find and change.
There was a problem hiding this comment.
Agreed, done in ab244d1. @DisabledOnOss("reason") replaces all 26 uses, so the env var name and value are in one place. A composed @DisabledIfEnvironmentVariable can't pass a per-use reason through, so it's a small custom ExecutionCondition. The repeated signal-API reason in TaskClientTests is now a constant.
integration-tests.yml is triggered by workflow_run. That runs PR code with the base repo's write-scoped token, attaches JUnit check runs to main's HEAD instead of the PR, and cannot run a new job from a PR without a temporary push trigger. Restore integration-tests.yml to main and add integration-tests-oss.yml on pull_request, push to main and workflow_dispatch, the same shape as the OSS jobs in the other SDK repos. Fork PRs get a read-only token, so the report falls back to annotations and the job summary for them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…down TaskRunnerConfigurer.shutdown() detached the auto-wired MetricsCollector from the TaskClient it was given, and nothing attached it again. The configurer does not own that TaskClient. AnnotatedWorkerExecutor reuses it for the next runner, so TaskClient-level metrics stopped after shutdown() and startPolling(). Adding a worker had the same effect: startPolling() starts the new runner before it shuts the old one down. The dispatchers are TaskClient instance fields, so leaving the listener registered leaks nothing. Correct the unregisterListeners() javadoc, which described a static registry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conductor images up to 3.34.0-rc2 are Debian-based and ship curl but not wget. From 3.34.0-rc3 they are Alpine-based and ship busybox wget but not curl. The OSS integration stack checked with curl only, so it would report unhealthy once the tag moves past rc2. hello-world checked with wget only, so it failed on an older cached `latest`. Try wget, then curl, in both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 tests repeated @DisabledIfEnvironmentVariable(named =
"CONDUCTOR_SERVER_TYPE", matches = "oss", ...). Replace them with
@DisabledOnOss("<reason>"), so the variable name and value are in one
place. A composed @DisabledIfEnvironmentVariable cannot pass a per-use
reason through, so DisabledOnOssCondition evaluates it.
Every reason is kept as it was. The signal/sync reason that TaskClientTests
repeated 9 times is now one constant.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The default applies to fork PRs and plain local runs of run-integration-oss.sh. 3.34.0 is the current release and is close to the 3.34.0-rc2 that CI runs through the E2E_TEST_OSS_CONDUCTOR_VERSION org variable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rgThat) taskClientMetricsSurviveRunnerReplacement failed in CI with a ClassCastException. When the async TaskAckFailure had not arrived yet, Mockito's failure reporting ran the typed argThat lambda against the collector's other consume() calls, such as PollStarted. timeout() only retries on assertion errors, so the cast error ended the test. Record TaskAckFailure task ids in a queue from a stub on that overload alone, and wait on the queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f6ca46c moved testSearchTasks and testPaginatedSearchTasks to a workflowType query, because OSS's Postgres task_index has no workflow_id column. On the shared Orkes cluster that query covers every past run of the workflow, and the server timed out on it. Keep the workflowId query on Orkes. Add TestUtil.isOssServer(), which @DisabledOnOss now uses too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
propp-orkes
left a comment
There was a problem hiding this comment.
Thank you for addressing those! This looks very solid now.
What changed
integration-tests-oss.yml, runs the integration suite against a disposable Conductor OSS stack.pull_request, onpushtomain, and onworkflow_dispatch.E2E_TEST_OSS_CONDUCTOR_VERSIONorg variable sets the image tag. Today it is3.34.0-rc2.workflow_dispatchinput can override the tag.scripts/docker-compose-oss.yaml.scripts/run-integration-oss.shruns the same suite locally. CONTRIBUTING.md shows how.@DisabledOnOss("<reason>"). They skip whenCONDUCTOR_SERVER_TYPE=oss.The OSS suite found these client bugs. This PR fixes them:
AnnotatedWorkerExecutor.startPolling()is now idempotent. A second call with no new workers does nothing.initWorkers()made this double call itself.AnnotatedWorkerExecutor.shutdown()now clears the task runner. A laterstartPolling()starts polling again.TaskRunnerConfigurer.shutdown()no longer removes the metrics listeners from theTaskClient.TaskClientmetrics stopped after a restart or after a new worker was added.WorkflowExecutorcompletion monitor now continues after a failed poll.getWorkflowcall stopped completion tracking for all workflows.Compose healthchecks:
scripts/docker-compose-oss.yamland the hello-world example check health withwget, thencurl.3.34.0-rc2have onlycurl. Later images have onlywget.latest.Why
How to test
Integration Tests (OSS)check runs on this PR. TheOSS Integration Test Reportcheck shows the results.scripts/run-integration-oss.sh./gradlew :conductor-client:test --tests '*AnnotatedWorkerTests' --tests '*WorkflowExecutorMonitorTests'Notes
pull_requestworkflow.integration-tests.ymlkeeps itsmainversion.integration-tests.ymlusesworkflow_run. That trigger runs PR code with a write-scoped token.pull_request, a fork PR gets a read-only token. The test report attaches to the PR commit.@DisabledOnOssuses a customExecutionCondition. A composed@DisabledIfEnvironmentVariablecannot carry a per-test reason.