Align the v1.21 CI configuration with v2.1 and v2.5, and pin all GitHub Actions - #2129
Conversation
9e140fa to
255603c
Compare
255603c to
0142091
Compare
0142091 to
27b883b
Compare
Bring the GitHub Actions workflows and the Evergreen configuration of the v1.21 branch in line with v2.1. The two branches had drifted apart, so every merge-up pull request conflicted on the CI files. Changes: - adopt the GitHub Actions and Evergreen layout of v2.1, including the drivers-evergreen-tools submodule - pin every GitHub Action to the commit of its latest release - port the v2.5 additions that apply to this branch: Codecov test result upload, PECL package test on RHEL 8, Alpine PECL test, SBOM check, static PHP and out-of-source build jobs - keep the OCSP tasks excluded from pull request checks Left out, because they do not apply to this branch: - PHP 8.5, since the branch still calls IS_INTERNED, which PHP 8.5 removed - the system libraries job, which needs a libmongoc built with tracing, and the trace output breaks the whole test suite on this branch - the v2.5 release workflow, the 32-bit Windows builds and the libmongoc 2.x build tasks
8d27a84 to
adabb0d
Compare
The job is kept in the branch so that its definition reaches v2.1 and v2.5 through the merge-up, but it is skipped on v1.21 and v2.1. Those branches build libmongoc 1.x, whose trace output the driver does not capture, and those traces would break every test in the job. Also brings over the parts of CONTRIBUTING.md that do not depend on the libmongoc version: the Alpine PECL section, the specification links pointing to Markdown files, the `git submodule` typos and a note about the system library job. The libmongoc 2.x instructions and the arginfo rewrite are left out, as they do not match this branch.
…cription' Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
kevinAlbs
left a comment
There was a problem hiding this comment.
- drop the MongoDB 4.0 tasks
Can tests for MongoDB 4.0 be restored? Though a breaking backport may be low risk, I expect dropping server 4.0 support in a patch release of v1.21 would be not-OK.
v1.21 still supports MongoDB 4.0: the test suite branches on that version in tests/utils/skipif.php, and the tasks passed on every recent mainline run. The v2.1 configuration dropped them in PHPC-2555, as part of DRIVERS-3034 marking server 4.0 as end of life for the drivers, so adopting that configuration removed the coverage as a side effect. Put the version back in the generator, restore the "!.4.0" exclusions of the debian and rhel90 variants so 4.0 keeps running only on the rhel80 variants as before, and restore the two storage engine tasks. Verified with a trial patch on the four rhel80 variants: 32 tasks, all green.
The "failCommand" fail point is not available on MongoDB 4.0, where a sharded cluster answers "failCommand not found". Keep the restricted fail point on newer servers, where it removes the race with the monitoring connection's "hello", and use "maxTimeAlwaysTimeOut" on the older ones.
Restored, and checking first turned up why the tasks were not passing. The removal was a side effect of adopting the v2.1 configuration, not a decision about v1.21. v2.1 dropped MongoDB 4.0 in PHPC-2555, as part of DRIVERS-3034 marking server 4.0 as end of life for the drivers. v1.21 still supports it, Two commits:
I ran a trial patch before committing. The first one had those 32 tasks with exactly one failure on each of the four variants, always the same task, The The second trial patch was 32 tasks, all green. For the record, the 4.0 tasks were green on the mainline runs before this pull request, 96 out of 96 over three versions and the four rhel80 variants. The only failure I found was a crash of the |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Unresolved moderate issues affect Evergreen scope, SBOM triggers, action pinning, failure reporting, branch gating, and timeout handling.
Review effort: Lite
Findings: None



Brings the GitHub Actions workflows and the Evergreen configuration of v1.21 in line with v2.1, pins every action to its latest release commit, and ports the v2.5 additions that apply here. It also fixes a flaky test in
tests/standalone.What changed
.githuband.evergreenlayout of v2.1, including thetests/drivers-evergreen-toolssubmoduledependabot.yml: drop thetarget-branchandgroupskeys added by PHPC-2774: Pin all GitHub Actions to exact release tags #2121, and point the git submodule updates at the repository root, because Dependabot reads the root.gitmodulesfailMaxTimeMS()from arming an unfiltered fail point, whose single slot the monitoring connection'shellocan consume on a replica set, with a fall back to the old fail point before MongoDB 4.2Kept out
The
test-system-libsjob is added so its definition reaches v2.1 and v2.5 through the merge-up, but it does not run here: v1.21 and v2.1 build libmongoc 1.x, whose trace output the driver does not capture. An exclusion list is used rather than>= 'v2.5', because GitHub compares strings lexicographically.Also left out: PHP 8.5 (removed
IS_INTERNED), the v2.5 release workflow, the 32-bit Windows builds, the libmongoc 2.x tasks and the correspondingCONTRIBUTING.mdparts.The MongoDB 4.0 tasks are the one thing that is deliberately not taken from v2.1. v2.1 dropped 4.0 in PHPC-2555, with DRIVERS-3034 marking server 4.0 as end of life for the drivers. v1.21 still supports it, so this branch keeps testing it, on the rhel80 variants as before.
Notes
.github/dependabot.yml. Taking this branch's version also fixes v2.1, which points thegitsubmoduleupdate at/tests/drivers-evergreen-tools, a path Dependabot cannot see.CODECOV_TOKENsecret.When merging up to v2.1 and v2.5
This branch deviates from v2.1 in three places on purpose. Each one has to be resolved by hand.
'4.0'in.evergreen/config/generate-config.php, the!.4.0exclusions of the debian and rhel90 variant templates, or the two storage engine tasks of.evergreen/config/test-tasks.yml. v2.1 and v2.5 do not support server 4.0, so carrying them over would schedule tasks that cannot pass.failMaxTimeMS()intests/utils/tools.php. Keep our change, but delete theversion_compare(..., '4.2', '<')fallback so that only thefailCommandbranch remains. That fallback exists only because v1.21 still tests MongoDB 4.0. The same simplification applies on v2.5 and v2.x.scripts/generate-purls.shheader. Our wording names only the check-sbom workflow, its only consumer on v1.21. v2.5 and v2.x also use that script fromupdate-sbom.sh, so keep their wording and discard ours.Two fixes from this branch are worth keeping on the way up: the added
scripts/generate-purls.shpath in.github/workflows/check-sbom.yml, and the wording fix inCONTRIBUTING.md. Both defects are present on v2.5 and v2.x as well.