Skip to content

Fix the failing CI integration tests#810

Merged
lewisjared merged 6 commits into
mainfrom
fix/ci-integration-test-cases
Jul 11, 2026
Merged

Fix the failing CI integration tests#810
lewisjared merged 6 commits into
mainfrom
fix/ci-integration-test-cases

Conversation

@lewisjared

@lewisjared lewisjared commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Description

The nightly CI Integration Tests workflow has been red for several unrelated reasons (run 29109525132).

  • Fixes ref test-cases fetch aborting the whole loop when the solver finds no matching datasets for one case (ilamb amoc-RAPID raises InvalidDiagnosticException). Later diagnostics were left without paths sidecars, which cascaded into DatasetResolutionError across all the test-cases jobs. The workflow no longer masks a non-zero exit from the fetch step.
  • Reworks the global-sst-bias example diagnostic to accumulate its global means in float64. The float32 reduction differs by ~1e-6 between platforms, so baselines minted on macOS never matched Linux CI. Diagnostic.version bumps to 2 and the baselines were re-minted, the series values move at the 6th decimal place.
  • Loosens the regression comparison's default rtol from 1e-6 to 1e-5 so platform floating-point noise cannot trip the gate. Committed bundles keep 7 significant figures, which is now two digits finer than the tolerance.
  • Gives the pmp test-cases job 120 minutes because its 21 slow cases cannot finish in 60. The timeout was also eating the failure tracebacks, so the per-test pmp failures stay undiagnosed until the next nightly.
  • Runs the CI ESMValTool dask cluster as a single 8 GiB worker so climate-drivers-for-fire stops killing 4 GiB workers.

Checklist

Please confirm that this pull request has done the following:

  • Tests added
  • Documentation added (where applicable)
  • Changelog item added to changelog/

Summary by CodeRabbit

  • Bug Fixes

    • Test-case fetching now continues when an individual case has no matching datasets or encounters a diagnostic error, reporting all failures together.
    • Regression comparisons are less likely to fail due to minor cross-platform floating-point differences.
    • Global SST bias calculations now use higher precision for more consistent results across platforms.
  • CI Improvements

    • Added extended processing time for PMP test cases.
    • Improved failure detection for incomplete test-case fetches.
    • Reduced memory pressure during automated processing.

InvalidDiagnosticException from the solver was not caught by the
per-case handler, so one unsolvable case (ilamb amoc-RAPID) aborted
the whole fetch loop and left later diagnostics without catalogs
and paths sidecars.
The float32 weighted mean differs by ~1e-6 relative between
platforms, so baselines minted on macOS never matched Linux CI.
Bumps the diagnostic version to 2 and re-mints the baselines.
Platform-level floating-point noise sits around 1e-6 relative,
right at the old tolerance. Committed bundles keep 7 significant
figures, now two digits finer than the tolerance.
- Fail populate-cache when the fetch crashes instead of masking it
- Give the pmp test-cases job 120 minutes
- Run the ESMValTool dask cluster as one 8 GiB worker so
  climate-drivers-for-fire stops killing 4 GiB workers
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@lewisjared, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 40a293ca-a93c-47ec-94bd-0192950dc800

📥 Commits

Reviewing files that changed from the base of the PR and between 5806b5a and 77cc12f.

📒 Files selected for processing (3)
  • packages/climate-ref-core/tests/unit/regression/test_compare.py
  • packages/climate-ref-example/tests/test-data/global-sst-bias/cmip7/manifest.json
  • packages/climate-ref-example/tests/test-data/global-sst-bias/default/manifest.json
📝 Walkthrough

Walkthrough

The changes adjust CI resource and timeout settings, make test-case fetching continue after per-case failures, relax regression comparison tolerance, and regenerate global SST diagnostic outputs after switching its reduction to float64.

Changes

CI and regression updates

Layer / File(s) Summary
CI execution and timeout controls
.github/actions/setup/esmvaltool-config/config.yml, .github/workflows/ci-integration.yaml
Dask now uses one 8GiB worker, cache prefetch failures fail the job, and the PMP test-case matrix entry receives a 120-minute timeout.
Per-test-case fetch continuation
packages/climate-ref/src/climate_ref/cli/test_cases/discovery.py, packages/climate-ref/tests/unit/cli/test_test_cases.py
Fetch processing records dataset-resolution and invalid-diagnostic failures, continues with later cases, and reports failed cases after processing.
Regression tolerance contract
packages/climate-ref-core/src/climate_ref_core/regression/*, packages/climate-ref-core/tests/unit/regression/*, docs/background/regression-baselines.md, changelog/810.fix.md
The default relative tolerance changes to 1e-5, with matching documentation and test expectation updates.
Float64 SST diagnostic and baselines
packages/climate-ref-example/src/climate_ref_example/surface_temperature.py, packages/climate-ref-example/tests/test-data/global-sst-bias/*
The global SST weighted mean uses float64, the diagnostic version becomes 2, and associated regression values and manifest hashes are refreshed.

Sequence Diagram(s)

sequenceDiagram
  participant FetchCommand as ref test-cases fetch
  participant CatalogBuilding as catalog building
  participant WarningLogging as warning logging
  FetchCommand->>CatalogBuilding: process each test case
  CatalogBuilding-->>FetchCommand: return success or per-case exception
  FetchCommand->>WarningLogging: log individual failures
  FetchCommand->>WarningLogging: log aggregated failed_cases warning
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: fixing failing CI integration tests.
Description check ✅ Passed The description includes the required sections and checklist items, and all template confirmations are completed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-integration-test-cases

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 88b62141-f713-401d-9c83-014c20e1047e

📥 Commits

Reviewing files that changed from the base of the PR and between bbbe70d and 5806b5a.

📒 Files selected for processing (16)
  • .github/actions/setup/esmvaltool-config/config.yml
  • .github/workflows/ci-integration.yaml
  • changelog/810.fix.md
  • docs/background/regression-baselines.md
  • packages/climate-ref-core/src/climate_ref_core/regression/_quantise.py
  • packages/climate-ref-core/src/climate_ref_core/regression/compare.py
  • packages/climate-ref-core/tests/unit/regression/test_compare.py
  • packages/climate-ref-core/tests/unit/regression/test_quantise.py
  • packages/climate-ref-example/src/climate_ref_example/surface_temperature.py
  • packages/climate-ref-example/tests/test-data/global-sst-bias/cmip7/manifest.json
  • packages/climate-ref-example/tests/test-data/global-sst-bias/cmip7/regression/diagnostic.json
  • packages/climate-ref-example/tests/test-data/global-sst-bias/cmip7/regression/series.json
  • packages/climate-ref-example/tests/test-data/global-sst-bias/default/manifest.json
  • packages/climate-ref-example/tests/test-data/global-sst-bias/default/regression/series.json
  • packages/climate-ref/src/climate_ref/cli/test_cases/discovery.py
  • packages/climate-ref/tests/unit/cli/test_test_cases.py

Comment thread packages/climate-ref-core/tests/unit/regression/test_compare.py Outdated
The coupling gate requires a test_case_version bump to authorise a
committed bundle change. The diagnostic version bump alone does not.
Re-authored via mint --from-replay --bump-version, no blobs changed.
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
core 92.43% <100.00%> (+<0.01%) ⬆️
providers 86.99% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...-core/src/climate_ref_core/regression/_quantise.py 100.00% <ø> (ø)
...ef-core/src/climate_ref_core/regression/compare.py 97.36% <100.00%> (ø)
...ple/src/climate_ref_example/surface_temperature.py 100.00% <100.00%> (ø)
...te-ref/src/climate_ref/cli/test_cases/discovery.py 87.77% <100.00%> (+0.13%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

A 5e-7 difference also passed under the old 1e-6 default.
Use 5e-6, which sits between the old and new tolerance,
so the test proves the new contract.
@lewisjared lewisjared merged commit 72d085d into main Jul 11, 2026
28 checks passed
@lewisjared lewisjared deleted the fix/ci-integration-test-cases branch July 11, 2026 12:17
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.

1 participant