Skip to content

ci: validate matrix patches before release (scylla-3.x)#898

Draft
nikagra wants to merge 1 commit into
scylladb:scylla-3.xfrom
nikagra:ci/validate-matrix-patches
Draft

ci: validate matrix patches before release (scylla-3.x)#898
nikagra wants to merge 1 commit into
scylladb:scylla-3.xfrom
nikagra:ci/validate-matrix-patches

Conversation

@nikagra
Copy link
Copy Markdown

@nikagra nikagra commented May 21, 2026

Closes scylladb/scylla-java-driver-matrix#145

What

Adds a "Validate matrix patches" step to the release workflow, inserted between Prepare release (which creates the tag locally via mvn release:prepare) and Perform release (which publishes to Maven Central).

The step clones scylla-java-driver-matrix at the specified branch and runs --patch-only mode against the newly created local tag. If patches fail to apply, the release workflow aborts before anything is published or pushed.

Why

Today, a broken or missing matrix patch is only discovered after the tag is on GitHub and the artifact is on Maven Central — too late for a clean abort. This change makes patch compatibility a hard gate before publication.

Changes

.github/workflows/release.yml:

  • Add matrix-branch input (type: string, default: master) — allows pointing to a non-merged matrix branch if patches need updating before the matrix PR merges
  • Add "Validate matrix patches" step after "Prepare release":
    1. Extracts the release tag from release.properties (scm.tag=X.Y.Z.W)
    2. Clones scylladb/scylla-java-driver-matrix at the specified branch
    3. Runs python3 main.py . --versions {tag} --driver-type scylla --patch-only
    4. Fails the workflow if patches don't apply

Release flow with this change

1. mvn release:prepare          → creates tag locally (e.g., 3.11.5.16)
2. Validate matrix patches      → clone matrix, run --patch-only
   ├── patches apply cleanly    → continue
   └── 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

Testing

Use dry-run: true — the "Validate matrix patches" step has no if condition so it runs in both normal and dry-run mode. This allows testing the validation without publishing or pushing anything.

Dependency

Requires scylladb/scylla-java-driver-matrix#146 (--patch-only mode) to be merged into matrix master before this workflow runs in production. During the interim, the matrix-branch input can point to the feature branch.

Add a 'Validate matrix patches' step between 'Prepare release' and
'Perform release' in the release workflow. After mvn release:prepare
creates the tag locally (but before anything is published to Maven
Central or pushed to GitHub), clone scylla-java-driver-matrix and run
--patch-only mode to verify all scylla driver patches apply cleanly
against the about-to-be-released source.

If patches fail the release workflow aborts immediately, giving the
releaser a clear signal to update the matrix patches first.

Also adds a matrix-branch input (default: master) so releasers can
point to a non-merged matrix branch during validation if needed.

Closes: scylladb/scylla-java-driver-matrix#145
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