Repository navigation
[ci] Phase 0: fix the broken CI (hangs, macOS runner, Sonar, integration test) - #2647
Closed
DiegoTavares wants to merge 7 commits into
Closed
DiegoTavares wants to merge 7 commits into
DiegoTavares wants to merge 7 commits into
Conversation
The SonarCloud workflow failed on every master push (53 of 53 runs) because the scanner no longer accepts Java 17, and nobody acted on the results. Remove the workflow, sonar-project.properties, the coverage script it was the only user of, and the org.sonarqube plugin and config in cuebot/build.gradle. Co-Authored-By: Claude <noreply@anthropic.com>
GitHub no longer serves the macos-14 label ("The configuration
'macos-14-arm64-us-default' is not supported"), so every master packaging
run since 10 Nov was cancelled at the macOS jobs and the S3 upload in
create_other_artifacts was skipped. Use macos-15 in packaging and release;
x86_64-apple-darwin keeps cross-compiling from the arm64 runner.
Co-Authored-By: Claude <noreply@anthropic.com>
monitor_server_output only checked its deadline after reader.lines() yielded a line, so a silent dummy-cuebot blocked the test forever. That hung windows-tests until the 60-minute job timeout on 54 of 55 sampled runs and the Linux build job on 27% of runs. - Read child stdout and stderr on background threads and wait on a channel with recv_timeout, so the deadline holds without output. The server is killed and reaped on timeout. - Drain openrqd's output the same way. It logs at debug level to a pipe nobody read, which can fill and stall rqd. - Add a test that feeds the monitor a silent child. - Run Rust tests with cargo nextest. A test is killed after 90s, and the integration binary runs in a single-threaded group since nextest gives each test its own process and the in-process mutex no longer serializes them. - Pre-build the release dummy-cuebot outside the per-test timeout, and drop the job timeouts to 15 minutes (Linux) and 20 minutes (Windows). Co-Authored-By: Claude <noreply@anthropic.com>
run_integration_test.sh built opencue/cuebot and opencue/rqd, then docker compose up built its own copies because those services had build: and no image:. On a layer cache miss the second build ate the 5-minute wait and the job failed with "Timed out waiting for Docker compose". - Name the flyway, cuebot and rqd images in docker-compose.yml so compose reuses the images the script builds, and start it with --no-build. - Build the flyway image in the script alongside the others. - Print the build log whenever an image build fails (it was only printed for RQD), and the tail of the compose log when the wait times out. Co-Authored-By: Claude <noreply@anthropic.com>
The nightly Maestro run was red on 66% of nights, mostly COMPLETIONSTORM failing its peak tick threshold (65% of nights) and SOLOFILL (14%). Those thresholds measure the shared runner as much as the scheduler, so a red nightly stopped carrying information. Run both with continue-on-error and record every scenario's numbers (peak tick, post-op queue, lost reports, fill ratio, throughput) as a JSON artifact kept for 90 days, so the thresholds can be reset from the observed distribution before they gate again. Logs are archived for a report-only failure too. Co-Authored-By: Claude <noreply@anthropic.com>
- Declare opencue_cuegui_path as an output of the Testing pipeline's build
job. It was never declared, so CueGUI tests ran pip install "[test]" and
the install matrix silently skipped the cuegui wheel. That wheel requires
Python > 3.7, so the 3.7 install leg leaves it out.
- run_gui_test.sh: run with set -eo pipefail and decide on pytest's exit
code, recorded inside the xvfb session so an xvfb-run crash on exit still
cannot fail a passing run. Grepping for "N failed" let collection errors
pass.
- Write the commit SHA into build_metadata.json with ${GITHUB_SHA}.
$(BUILD_SOURCEVERSION) is Azure syntax and produced an empty commit.
- Drop the lint job's "Set package vars" step, which exported into a shell
that exited immediately.
- Move checkout@v3, configure-aws-credentials@v1, login-action@v2 and the
composite action's upload-artifact@v4 to current majors (v7, v6, v4, v7).
Co-Authored-By: Claude <noreply@anthropic.com>
Two jobs ran to GitHub's 6-hour limit stuck in apt-get, and neither had a timeout. Superseded PR pushes kept running to the end because the Testing and Rust workflows had no concurrency group. - Give every job a timeout-minutes of roughly three times its median duration over recent successful runs, at least 10 minutes for jobs that pull containers or build images, and at most 30 minutes. Manual Maestro sim runs keep a longer ceiling because they can pick the full-farm scenarios. - Cancel in-progress Testing and Rust runs when a pull request gets a new push. Master pushes are grouped by commit, so every commit still runs. - Install protoc for the REST gateway tests with a pinned setup-protoc instead of apt-get. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Collaborator
Author
|
Superseded by #2648, which carries the same changes from a fork branch. |
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.
Related Issues
None filed. This PR is PR 1 of 5 in a stacked CI overhaul (Phase 0: fix what is broken). The later phases (a single
pr.ymlwith change detection,master.yml, release as promotion, faster scripts and Dockerfiles) build on this branch.Summarize your change.
An analysis of the last 1,000 workflow runs (16 Sep to 19 Nov) found the CI slow and red mainly because of a few broken things. This PR fixes them against the current workflows, without restructuring anything. One commit per item.
F1: rqd integration tests no longer hang
0 of 267 Rust pipeline runs finished green.
windows-testshung inrqd_integration_testson 54 of 55 sampled runs and burned the 60-minute timeout. The Linuxbuildjob hung the same way on 27% of runs.monitor_server_outputonly checked its deadline afterreader.lines()returned a line, so a silent dummy-cuebot blocked forever. Child stdout/stderr are now read on threads and the monitor waits withrecv_timeout. The server is killed and reaped on timeout.test_monitor_times_out_on_silent_server.cargo nextest.rust/.config/nextest.tomlkills a test after 90 s and runs the integration binary in a one-thread group. nextest gives each test its own process, so the in-process mutex no longer serializes them. The releasedummy-cuebotis built before the tests so its compile doesn't count against a test's timeout. The workspace has no doctests, so nothing is lost by moving offcargo test.F2: macOS packaging runner
Since 10 Nov every master packaging run was cancelled with "The configuration 'macos-14-arm64-us-default' is not supported".
create_other_artifactswas skipped, so nothing reached S3. Both Apple targets move tomacos-15in packaging and release. x86_64 still cross-compiles from the arm64 runner.F3: SonarCloud removed
It failed 53 of 53 runs ("Java 17 is not supported"), and nobody acted on it. This removes
sonar-cloud-pipeline.yml,sonar-project.properties,ci/python_coverage_report.sh(its only user), and theorg.sonarqubeplugin andsonarqube {}block incuebot/build.gradle. JaCoCo stays. There was no README badge. The only remaining mentions of Sonar are in past release notes and TSC meeting minutes, left as historical record.F4: integration test builds once and fails loudly
About 24% of integration test jobs failed, half of them on the 5-minute compose wait. The script built
opencue/cuebotandopencue/rqd, thendocker compose upbuilt its own copies because those services hadbuild:and noimage:.docker-compose.yml:image: opencue/flyway,opencue/cuebot,opencue/rqd, andbuild:stays. For sandbox users,docker compose upstill builds a missing image. After a code change, rebuild withdocker compose buildorup --build, as before.ci/run_integration_test.shbuilds all three images (flyway is new), starts compose with--no-build, prints any failed build's log (it used to print only RQD's), and prints the last 100 compose log lines on timeout. The 5-minute clock already started after the builds; now nothing rebuilds inside it.F5: bounded jobs, superseded runs cancelled
timeout-minuteson every job: roughly 3x the median of recent successful runs, at least 10 min for jobs that pull containers or build images, and at most 30 min. The exception is manual Maestro runs (workflow_dispatch), which can pick the full-farm scenarios, so they keep 60. Two jobs had previously run to the 6-hour limit while stuck inapt-get.concurrencywithcancel-in-progress, keyed by PR number. Master pushes are keyed by SHA, so every master commit still runs.arduino/setup-protoc(21.12, the version Ubuntu 24.04 ships). The otherapt-get install protobuf-compilersteps also install X11 and other libraries, so they stay.F6: COMPLETIONSTORM and SOLOFILL are report-only
The nightly passed on only 34% of nights. COMPLETIONSTORM failed 65% of nights on a peak tick time that measures the shared runner as much as the scheduler, and SOLOFILL failed 14%. Their scenario step now has
continue-on-error, the step summary says the result is report-only, and logs are archived when they fail. Every scenario now uploads amaestro-sim-metrics-<scenario>JSON artifact (verdict, peak avgTick, final post-op queue, lost reports, fill ratio, throughput, runner CPUs), kept for 90 days. Once about 30 runs are in, the thresholds get set from that data andcontinue-on-errorcomes off.F7: small defects
opencue_cuegui_pathwas never declared as an output of the Testing pipeline's build job, so CueGUI tests ranpip install "[test]"and the install matrix skipped the cuegui wheel. It is declared now. The wheel requires Python > 3.7, so the 3.7 install leg leaves it out until 3.7 is dropped in a later phase.ci/run_gui_test.shusesset -eo pipefailand passes or fails on pytest's exit code, recorded inside the xvfb session, so an xvfb-run crash on exit still can't fail a passing run. Before, it grepped for "N failed", so collection errors passed.build_metadata.jsonused$(BUILD_SOURCEVERSION)(Azure syntax, empty). It now uses${GITHUB_SHA}.checkout@v3to v7,configure-aws-credentials@v1to v6,login-action@v2to v4, and the composite action'supload-artifact@v4to v7. actionlint flagged v1 and v2 as too old to run.Verification
cargo nextest runon the workspace, 221/221 passed on macOS. The silent-server test returns in 2 s. A deliberately stalled test was killed and named by nextest at 90 s../gradlew help/tasksevaluate cleanly without the sonar plugin.actionlint(without shellcheck) goes from 14 findings on master to 3. The 3 that remain predate this PR: the composite action has nodescription.bash -nand shellcheck pass on the touched scripts (only pre-existing warnings remain). Therun_gui_test.shpass/fail logic was checked with stubbed xvfb-run and pytest.Known failure (fix ready, not pushed yet)
"Run Python Unit Tests" (CY2023/CY2024) fails on this head. With
set -e,run_gui_test.shnow stops atpip: command not found(the containers have no barepip). On master the same error was ignored, a collection error followed, and the grep still reported a pass. The fix ("${py}" -m pip), plus mocking the Cuebot stub in two CueGUI test classes that tried to reach a real cuebot, is committed but couldn't be pushed. A wildcard branch-protection rule requires the EasyCLA status on every update to an existing upstream branch. Locally, all 335 CueGUI tests pass with those commits.Manual follow-ups
SONAR_TOKENrepository secret, and archive or delete the SonarCloud projectsAcademySoftwareFoundation_OpenCueandAcademySoftwareFoundation_OpenCue_Cuebotif they are no longer wanted.aws s3 ls s3://<bucket>/opencue/<build id>/shows the full set (jar, RPM, schema, seed SQL, wheels, openrqd binaries, build_metadata.json) before the next release is tagged. If needed, re-run packaging on master's head.maestro-sim-metrics-*artifacts, update the workflow header (it still assumes 2 vCPUs), and removecontinue-on-error.LLM usage disclosure
Claude (Claude Code) analysed the workflow history, implemented these changes and ran the local checks listed above, at the direction of Diego Tavares.
🤖 Generated with Claude Code