Problem
When a new Java driver version is released (e.g., 3.11.5.16), the matrix may not have a matching versions/scylla/3.11.5.16/ directory, or the existing patches (resolved via floor fallback to the nearest lower version) may fail to apply against the new source code.
Today this is only discovered after the tag is published and the Jenkins matrix CI runs — at which point the release is already on Maven Central and the tag is on GitHub. The releaser then has to scramble to update patches reactively.
Proposal
Add a pre-publish validation step that checks whether matrix patches apply cleanly to the about-to-be-released source, before artifacts are published to Maven Central and before the tag is pushed to GitHub.
Changes required
This repo (scylla-java-driver-matrix):
- Add
--patch-only mode to run.py / main.py that checks out the tag, applies patches, and exits — skipping build, tests, and email
Driver repo (scylladb/java-driver):
- Add a "Validate matrix patches" step in
.github/workflows/release.yml between release-prepare (creates tag locally) and release-perform (publishes to Maven Central)
- Add
matrix-branch workflow input (default: master) so releasers can validate with a non-merged matrix branch if patches need updating
Release flow with this change
1. mvn release:prepare → creates tag locally (e.g., 3.11.5.16)
2. Validate matrix patches → clone matrix repo, run --patch-only
├── patches apply cleanly → continue to step 3
└── patches FAIL → release ABORTS (nothing published, no tag pushed)
3. mvn release:perform → publish to Maven Central
4. git push --follow-tags → push tag to GitHub
The existing dry-run mode (dry-run: true) also executes the validation step, providing a safe way to test.
Implementation details
Matrix repo: --patch-only mode
run.py:
- Add
patch_only=False parameter to Run.__init__()
- In
run(), return None after _apply_patch_files() when patch_only=True (skip mvn install, mvn integration-test)
main.py:
- Add
--patch-only CLI argument (store_true)
- Pass through to
Run() constructor
- Handle
None return from run() (no test report to process)
- Skip email sending in patch-only mode
~20 lines of changes total.
Driver repo: release workflow step
.github/workflows/release.yml:
- Add
matrix-branch input (type: string, default: master)
- Add step after "Prepare release" and before "Perform release":
- Extract tag from
release.properties (scm.tag=X.Y.Z.W)
- Clone this matrix repo at the specified branch
pip install PyYAML packaging jinja2
- Run
python3 main.py . --versions {tag} --driver-type scylla --patch-only
- Fail the workflow if patches don't apply
~25 lines of changes total.
Why only --driver-type scylla
The release is for scylladb/java-driver (the Scylla fork). DataStax patches (versions/datastax/) target datastax/java-driver which is a different repository. Only scylla driver type patches are relevant to this release workflow.
Non-goals
- Running integration tests (remains Jenkins' responsibility; if patches apply, running staging matrix jobs costs little additional effort)
- Branch-based testing without tags (separate future work)
Problem
When a new Java driver version is released (e.g.,
3.11.5.16), the matrix may not have a matchingversions/scylla/3.11.5.16/directory, or the existing patches (resolved via floor fallback to the nearest lower version) may fail to apply against the new source code.Today this is only discovered after the tag is published and the Jenkins matrix CI runs — at which point the release is already on Maven Central and the tag is on GitHub. The releaser then has to scramble to update patches reactively.
Proposal
Add a pre-publish validation step that checks whether matrix patches apply cleanly to the about-to-be-released source, before artifacts are published to Maven Central and before the tag is pushed to GitHub.
Changes required
This repo (
scylla-java-driver-matrix):--patch-onlymode torun.py/main.pythat checks out the tag, applies patches, and exits — skipping build, tests, and emailDriver repo (
scylladb/java-driver):.github/workflows/release.ymlbetweenrelease-prepare(creates tag locally) andrelease-perform(publishes to Maven Central)matrix-branchworkflow input (default:master) so releasers can validate with a non-merged matrix branch if patches need updatingRelease flow with this change
The existing dry-run mode (
dry-run: true) also executes the validation step, providing a safe way to test.Implementation details
Matrix repo:
--patch-onlymoderun.py:patch_only=Falseparameter toRun.__init__()run(), returnNoneafter_apply_patch_files()whenpatch_only=True(skipmvn install,mvn integration-test)main.py:--patch-onlyCLI argument (store_true)Run()constructorNonereturn fromrun()(no test report to process)~20 lines of changes total.
Driver repo: release workflow step
.github/workflows/release.yml:matrix-branchinput (type: string, default:master)release.properties(scm.tag=X.Y.Z.W)pip install PyYAML packaging jinja2python3 main.py . --versions {tag} --driver-type scylla --patch-only~25 lines of changes total.
Why only
--driver-type scyllaThe release is for
scylladb/java-driver(the Scylla fork). DataStax patches (versions/datastax/) targetdatastax/java-driverwhich is a different repository. Onlyscylladriver type patches are relevant to this release workflow.Non-goals