Repository navigation
Fixes 36405: Fail the release bump when a version pattern matches nothing - #36407
shrabantipaul-collate wants to merge 4 commits into
Conversation
…thing
update_docker_tag missed the ${VAR:-image} form the MySQL quickstart
compose uses, and update_openapi_version missed -SNAPSHOT versions, so
2.1 was cut with 1.12.0-SNAPSHOT quickstart images and a 2.0.0-SNAPSHOT
OpenAPI version. Both patterns now match, every release pattern must
match, and update_all stops at the first failure instead of exiting 0.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review ✅ Approved 2 closed / 2 findings🟡 Medium risk · Making release-version substitutions mandatory and stopping make on failures could block releases when expected file patterns drift. Release bump now fails instead of exiting 0 when a version pattern matches nothing, and ✅ 2 closed✅ Bug: Stale-tag check misses SNAPSHOT lines when bumping to the release tag
✅ Quality: Cross-repo regex_sub default contract has no decision record
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #36405
make update_all RELEASE_VERSION=x.y.znow bumps every file it names, and fails instead of exiting 0 when a version pattern matches nothing.update_docker_tagalso matches theimage: ${VAR:-docker.getcollate.io/...}form the MySQL quickstart compose has used since Feature #21971: Session Management in Multiple Server Pods #26314. Before, it skipped that file.update_openapi_versionaccepts any version string, including2.0.0-SNAPSHOT. Before, it only matched a plainX.Y.Z, whichmainnever carries.regex_subtakesrequired=True, and every OSS release pattern passes it.update_docker_tagalso fails if any OpenMetadata image line keeps its old tag. Its default stays lenient because Collate's release bump imports it and expects some of its patterns to match nothing on a release branch.update_alland its three loop targets run underset -e. They used to chain steps with;, so a failure only counted if it hit the very last file, and the release workflow committed a half-bumped branch.Why: the 2.1.0 cut left the MySQL quickstart on
1.12.0-SNAPSHOTimages and the OpenAPI version on2.0.0-SNAPSHOT, and nothing reported it. The values on2.1are fixed in #36408, which also carries this commit so the 2.1.1 bump works.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
make update_all RELEASE_VERSION=9.8.7(withmvnstubbed) rewrites every version line in all 10 files it names, including the MySQL quickstart images and the OpenAPI version.pyprojectversion line, compose registry,ARG RI_VERSION) makesmake update_allexit non-zero withmatched nothing.${VAR:-image}form keeps its closing brace. A compose file with no OpenMetadata image, or one with an image line in another shape, fails the bump, including the usualX.Y.Z-SNAPSHOT→X.Y.Zcut, where the old tag starts with the new one.Unit tests
scripts/test_update_version.py(11 tests).python3 -m pytest -q scripts/test_update_version.py→ 11 passed.origin/main'supdate_version.py, all 11 fail. Againstorigin/main'sMakefile, the 4 drift tests fail..github/workflows/release-version-bump-tests.ymlruns this file on PRs that touch theMakefile, the script, its test or any file the bump rewrites. It passed on this PR: https://github.com/open-metadata/OpenMetadata/actions/runs/40651490786Backend integration tests
plan_local_java_tests.py: no Java tests impacted.Ingestion integration tests
Playwright (UI) tests
Manual testing performed
make update_allwithRELEASE_VERSION=2.2.0onmain: all 10 files bumped, versus 8 with the current script.RELEASE_VERSION=2.1.1on a2.1checkout: all 10 files bumped, versus 8 with the current script, which leaves the MySQL quickstart and the OpenAPI version behind.scripts/test_collate_update_version.py(it importsregex_sub) against thisupdate_version.py: 10 passed.UI screen recording:
Not applicable — release tooling only, no UI.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: three passes against
REVIEW.md, final at d69c602. Bot review (gitar, greptile): fixed the stale-line check, which matched:2.1.0inside:2.1.0-SNAPSHOT, and added the decision record (0941f2e). Pass 1 🔴:update_allchained steps with;, so a missed pattern still exited 0. Fixed withset -eand the 4 drift tests. Pass 3 🔴: no CI job runsscripts/test_update_version.py. Fixed with the new workflow above (61e6a42). Pass 3 nit: a partly bumped compose file still passed. Fixed by checking every image line, with a test.Decision check: adds
docs/decisions/2026-10-28-regex-sub-stays-lenient-by-default.md. Collate importsregex_suband relies on its keyword names and lenient default.I have added a test that covers the exact scenario we are fixing.
Not changed here:
docker/docker-compose-quickstart/docker-compose-rdf.ymlhas been on1.8.0-SNAPSHOTsince 1.8 becauseupdate_allnever names it. Should it be added toupdate_dockerfile_version?Related: open-metadata/openmetadata-collate#7924 fixes the Collate side of the same release cut.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issue remains from this review.Summary
The PR makes release bumps fail when expected version patterns match nothing. It also fixes snapshot OpenAPI versions and overridable Docker image lines.
Reviews (3) · Last reviewed commit: "Run the release version bump tests in CI" · Reviewed by Greptile