Skip to content

CCOR-13193 - run integration tests against Conductor OSS, and fix two client bugs it surfaced - #156

Merged
chrishagglund-ship-it merged 14 commits into
mainfrom
e2e-against-conductor-with-local-script
Nov 24, 2026
Merged

chrishagglund-ship-it merged 14 commits into
mainfrom
e2e-against-conductor-with-local-script

Conversation

@chrishagglund-ship-it

@chrishagglund-ship-it chrishagglund-ship-it commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • A new workflow, integration-tests-oss.yml, runs the integration suite against a disposable Conductor OSS stack.
  • The workflow runs on pull_request, on push to main, and on workflow_dispatch.
  • The E2E_TEST_OSS_CONDUCTOR_VERSION org variable sets the image tag. Today it is 3.34.0-rc2.
  • A workflow_dispatch input can override the tag.
  • Fork PRs do not get org variables, so they use the default tag in scripts/docker-compose-oss.yaml.
  • scripts/run-integration-oss.sh runs the same suite locally. CONTRIBUTING.md shows how.
  • Tests for Orkes-only features have @DisabledOnOss("<reason>"). They skip when CONDUCTOR_SERVER_TYPE=oss.
  • Today 51 of 109 tests skip on 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.
  • Before, each call started a second task runner for the same task types. A task leased by the old runner could stay in progress until its response timeout.
  • initWorkers() made this double call itself.
  • AnnotatedWorkerExecutor.shutdown() now clears the task runner. A later startPolling() starts polling again.
  • TaskRunnerConfigurer.shutdown() no longer removes the metrics listeners from the TaskClient.
  • Before, TaskClient metrics stopped after a restart or after a new worker was added.
  • The WorkflowExecutor completion monitor now continues after a failed poll.
  • Before, one failed getWorkflow call stopped completion tracking for all workflows.
  • Now a workflow fails only after its polls fail continuously for one minute.

Compose healthchecks:

  • scripts/docker-compose-oss.yaml and the hello-world example check health with wget, then curl.
  • Images up to 3.34.0-rc2 have only curl. Later images have only wget.
  • The hello-world example always pulls latest.

Why

  • CCOR-13193: the integration suite ran only against Orkes. It now also runs against Conductor OSS.

How to test

  • CI: the Integration Tests (OSS) check runs on this PR. The OSS Integration Test Report check shows the results.
  • Locally, with Docker and JDK 21: scripts/run-integration-oss.sh
  • Unit tests: ./gradlew :conductor-client:test --tests '*AnnotatedWorkerTests' --tests '*WorkflowExecutorMonitorTests'

Notes

  • The OSS suite has its own pull_request workflow. integration-tests.yml keeps its main version.
  • integration-tests.yml uses workflow_run. That trigger runs PR code with a write-scoped token.
  • Under pull_request, a fork PR gets a read-only token. The test report attaches to the PR commit.
  • On fork PRs, the read-only token cannot create a check run. The report goes to annotations and the job summary.
  • @DisabledOnOss uses a custom ExecutionCondition. A composed @DisabledIfEnvironmentVariable cannot carry a per-test reason.

@chrishagglund-ship-it
chrishagglund-ship-it force-pushed the e2e-against-conductor-with-local-script branch from 05bc8d5 to c49f547 Compare August 18, 2026 15:44
@chrishagglund-ship-it
chrishagglund-ship-it marked this pull request as ready for review August 18, 2026 16:08
@chrishagglund-ship-it
chrishagglund-ship-it marked this pull request as draft August 28, 2026 17:43
@chrishagglund-ship-it chrishagglund-ship-it changed the title add test against oss on push of pr-to-main CCOR-13193 - run integration tests against Conductor OSS, and fix two client bugs it surfaced Aug 28, 2026
@chrishagglund-ship-it
chrishagglund-ship-it marked this pull request as ready for review September 3, 2026 17:41
@chrishagglund-ship-it
chrishagglund-ship-it force-pushed the e2e-against-conductor-with-local-script branch from 0d55ef4 to 8104cee Compare September 8, 2026 18:03
@chrishagglund-ship-it
chrishagglund-ship-it force-pushed the e2e-against-conductor-with-local-script branch from 776ed5a to c3e1bc9 Compare October 26, 2026 16:59
@chrishagglund-ship-it
chrishagglund-ship-it force-pushed the e2e-against-conductor-with-local-script branch from c3e1bc9 to 0ca968b Compare November 19, 2026 15:36
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 propp-orkes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread .github/workflows/integration-tests.yml Resolved
Comment thread .github/workflows/integration-tests.yml Resolved
Comment thread .github/workflows/integration-tests.yml Outdated
uses: mikepenz/action-junit-report@v6
with:
report_paths: 'tests/build/test-results/test/TEST-*.xml'
check_name: OSS Integration Test Report

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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."

Suggested change
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.

@chrishagglund-ship-it chrishagglund-ship-it Nov 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.)

Comment thread scripts/docker-compose-oss.yaml Resolved
}

@Test
@DisabledIfEnvironmentVariable(named = "CONDUCTOR_SERVER_TYPE", matches = "oss",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 propp-orkes left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for addressing those! This looks very solid now.

@chrishagglund-ship-it
chrishagglund-ship-it merged commit b8f5f06 into main Nov 24, 2026
6 checks passed
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.

2 participants