-
Notifications
You must be signed in to change notification settings - Fork 43
CCOR-13193 - adding test run against oss server in ci #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
chrishagglund-ship-it
merged 14 commits into
main
from
e2e-against-conductor-with-local-script
Sep 21, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
bb875e4
wip, adding test run against oss server in ci
chrishagglund-ship-it 9211d21
set up to test against oss in ci, fix for racey sub-wf start detection
chrishagglund-ship-it ae6ca01
oss stuff ran pretty quick, probably no need to do the 4 way split
chrishagglund-ship-it cff14f1
use is_oss flag to determine some behavior nuances instead of blanket…
chrishagglund-ship-it 3777cab
bring docs and script functionality into alignment re: up only
chrishagglund-ship-it 27c77e4
have _wait_for_blocking_task reuse the workflow the finder already fe…
chrishagglund-ship-it bc1c766
pin httpbin version
chrishagglund-ship-it cce48ff
stop clobbering task name and actually register task for our test
chrishagglund-ship-it 93f22b8
hygeine and cleanup, docs improvements
chrishagglund-ship-it d5f22b3
don't clean task def that has fixed name that could be in use in othe…
chrishagglund-ship-it 9c844c0
add error check after test run and dump server logs in that event
chrishagglund-ship-it c53870e
improve e2e test oss conductor version selection to have a fallback f…
chrishagglund-ship-it 5506b88
ci(oss): write the image tag once, pull it in CI
chrishagglund-ship-it b23a246
docs(ci): clarify the server_timeout_unreliable carve-out is sdkdev-only
chrishagglund-ship-it File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Conductor OSS stack used to run the SDK integration tests against open-source | ||
| # Conductor. Shared by scripts/run-integration-oss.sh and the | ||
| # integration-tests-oss job in .github/workflows/pull_request.yml. | ||
| # | ||
| # The Conductor server reaches httpbin over the compose network at | ||
| # http://httpbin:8081 (see e.g. tests/integration/client/orkes/test_orkes_service_registry_client.py | ||
| # and the complex_wf_signal_test*.json fixtures). | ||
| # | ||
| # The `image:` default below is the SINGLE place the Conductor OSS image tag is | ||
| # written. Everything that does not override OSS_CONDUCTOR_VERSION lands on it: | ||
| # a plain `scripts/run-integration-oss.sh` run, and the integration-tests-oss | ||
| # job on a fork PR (where GitHub withholds org variables). Overrides are the | ||
| # script's --version flag and, in CI, the E2E_TEST_OSS_CONDUCTOR_VERSION org | ||
| # variable or a workflow_dispatch input. Bump the tag here and both follow. | ||
| # | ||
| # Note that the org variable is currently set to `latest`, so a normal CI run | ||
| # still tracks whatever `latest` resolves to at run time; this default is what | ||
| # actually pins fork PRs and local runs until someone sets it to a real tag. | ||
| services: | ||
| conductor-server: | ||
| image: conductoross/conductor:${OSS_CONDUCTOR_VERSION:-3.32.3} | ||
| environment: | ||
| - CONFIG_PROP=config-postgres.properties | ||
| ports: | ||
| - "8080:8080" | ||
| healthcheck: | ||
| test: ["CMD", "curl", "-I", "-XGET", "http://localhost:8080/health"] | ||
| interval: 10s | ||
| timeout: 10s | ||
| retries: 20 | ||
| links: | ||
| - conductor-postgres:postgresdb | ||
| depends_on: | ||
| conductor-postgres: | ||
| condition: service_healthy | ||
| conductor-postgres: | ||
| image: postgres:16 | ||
| environment: | ||
| - POSTGRES_USER=conductor | ||
| - POSTGRES_PASSWORD=conductor | ||
| healthcheck: | ||
| test: timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/5432' | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 12 | ||
| httpbin: | ||
| image: ghcr.io/conductor-oss/httpbin:v1.0.1 | ||
| expose: | ||
| - "8081" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Spin up a local Conductor OSS stack and run the SDK integration suite | ||
| # against it. To reproduce the `integration-tests-oss` job in | ||
| # .github/workflows/pull_request.yml you need `-- --bucket=all`: that job runs | ||
| # the full suite, whereas this script defaults to the faster `core` bucket, | ||
| # which excludes tests/integration/test_workflow_client_intg.py -- the only | ||
| # entry point to the workflow-execution and Signal API scenarios. | ||
| # | ||
| # Orkes-Enterprise-only tests, classes, and modules (Authorization, Secrets, | ||
| # Schema, Service Registry, metadata/scheduler tags) gate themselves on | ||
| # is_oss() in tests/integration/conftest.py, which reads the | ||
| # CONDUCTOR_SERVER_TYPE this script exports below; its docstring carries the | ||
| # authoritative list of gated surface (confirmed empirically not implemented by | ||
| # plain OSS Conductor -- see the individual test files for details on each | ||
| # gap). The Signal API tests run on OSS too, using a WAIT-task-based fixture | ||
| # variant instead of the YIELD-based one used against Orkes Enterprise -- see | ||
| # _signal_test_workflow_names() in | ||
| # tests/integration/workflow/test_workflow_execution.py. | ||
| # | ||
| # The stack (Conductor OSS + Postgres + httpbin) is defined in | ||
| # scripts/docker-compose-oss.yaml and is torn down automatically on exit. That | ||
| # file's `image:` line is also where the default tag lives -- this script | ||
| # applies no default of its own, so a plain run and a fork-PR CI run land on the | ||
| # identical image. | ||
| # | ||
| # Usage: | ||
| # scripts/run-integration-oss.sh [--up-only] [--keep-up] [--version <tag>] [-- pytest args] | ||
| # Examples: | ||
| # scripts/run-integration-oss.sh -- --bucket=all # what CI runs: the full suite | ||
| # scripts/run-integration-oss.sh # faster: --bucket=core, default tag | ||
| # scripts/run-integration-oss.sh --version 3.33.0-rc1 | ||
| # scripts/run-integration-oss.sh --keep-up # leave the stack up afterwards | ||
| # scripts/run-integration-oss.sh --up-only # start the stack, skip the suite | ||
| set -euo pipefail | ||
|
|
||
| KEEP_UP=0 | ||
| UP_ONLY=0 | ||
| extra=() | ||
|
|
||
| while [[ $# -gt 0 ]]; do | ||
| case "$1" in | ||
| --keep-up) KEEP_UP=1; shift ;; | ||
| # Bring the stack up and stop there, for pointing repeated test runs at it | ||
| # by hand. Implies --keep-up: tearing down the stack we just started would | ||
| # defeat the purpose. | ||
| --up-only) UP_ONLY=1; KEEP_UP=1; shift ;; | ||
| --version) OSS_CONDUCTOR_VERSION="${2:?--version needs a tag}"; shift 2 ;; | ||
| -h|--help) | ||
| echo "Usage: $0 [--up-only] [--keep-up] [--version <tag>] [-- pytest args]" | ||
| exit 0 | ||
| ;; | ||
| --) shift; extra=("$@"); break ;; | ||
| *) echo "Unknown argument: $1" >&2; exit 1 ;; | ||
| esac | ||
| done | ||
|
|
||
| # No default is applied here on purpose. The default tag is written once, in the | ||
| # `image:` line of scripts/docker-compose-oss.yaml, so leaving OSS_CONDUCTOR_VERSION | ||
| # unset lets compose supply it -- the same path a fork PR takes in CI. Only export | ||
| # it when the caller actually asked for a specific tag, otherwise a value set but | ||
| # not exported in the caller's shell would never reach compose anyway. | ||
| if [[ -n "${OSS_CONDUCTOR_VERSION:-}" ]]; then | ||
| export OSS_CONDUCTOR_VERSION | ||
| fi | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)" | ||
| COMPOSE_FILE="${SCRIPT_DIR}/docker-compose-oss.yaml" | ||
| cd "${REPO_ROOT}" | ||
|
|
||
| compose() { docker compose -f "${COMPOSE_FILE}" "$@"; } | ||
|
|
||
| cleanup() { | ||
| local status=$? | ||
| if [[ "${status}" -ne 0 ]]; then | ||
| echo "Dumping conductor-server logs (exit ${status})..." >&2 | ||
| compose logs conductor-server || true | ||
| fi | ||
| if [[ "${KEEP_UP}" == "1" ]]; then | ||
| echo "--keep-up set: leaving the OSS stack running. Tear down with:" | ||
| echo " docker compose -f ${COMPOSE_FILE} down -v" | ||
| return | ||
| fi | ||
| echo "Tearing down Conductor OSS stack..." | ||
| compose down -v || true | ||
|
dfont-orkes marked this conversation as resolved.
|
||
| } | ||
| trap cleanup EXIT | ||
|
|
||
| # Ask compose what it resolved rather than reconstructing the tag here, so this | ||
| # stays correct whether the tag came from --version or from the compose default. | ||
| # `--images` lists every service's image and does not reliably honour a service | ||
| # filter, so select the server's by name rather than by position. | ||
| SERVER_IMAGE="$(compose config --images | grep -m1 '^conductoross/conductor:')" | ||
| echo "Using ${SERVER_IMAGE}" | ||
|
|
||
| # `docker compose up` only pulls an image when it is missing locally, so a | ||
| # previously-cached mutable tag (a re-pushed rc, or `latest` if that is what was | ||
| # asked for) would silently be reused instead of getting the current version. | ||
| # Pull unconditionally so the stack always reflects the tag we just printed. | ||
| echo "Pulling ${SERVER_IMAGE} to ensure it's current..." | ||
| compose pull conductor-server | ||
|
|
||
| echo "Starting Conductor OSS stack..." | ||
| compose up -d | ||
|
|
||
| echo "Waiting for Conductor to be healthy..." | ||
| HEALTH_TIMEOUT="${HEALTH_TIMEOUT:-180}" | ||
| deadline=$(( SECONDS + HEALTH_TIMEOUT )) | ||
| until curl -sf http://localhost:8080/health >/dev/null 2>&1; do | ||
| if (( SECONDS >= deadline )); then | ||
| echo "Error: Conductor did not become healthy within ${HEALTH_TIMEOUT}s." >&2 | ||
| exit 1 | ||
| fi | ||
| sleep 5 | ||
| done | ||
| echo "Conductor is up." | ||
|
|
||
| export CONDUCTOR_SERVER_URL="http://localhost:8080/api" | ||
| export CONDUCTOR_SERVER_TYPE="oss" | ||
|
|
||
| if [[ "${UP_ONLY}" == "1" ]]; then | ||
| echo "--up-only set: stack is up, not running the suite. Point runs at it with:" | ||
| echo " export CONDUCTOR_SERVER_URL=\"${CONDUCTOR_SERVER_URL}\"" | ||
| echo " export CONDUCTOR_SERVER_TYPE=\"${CONDUCTOR_SERVER_TYPE}\"" | ||
| echo " bash scripts/run_integration_tests.sh --bucket=all" | ||
| exit 0 | ||
| fi | ||
|
|
||
| bash scripts/run_integration_tests.sh ${extra[@]+"${extra[@]}"} | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.