Skip to content

fix(ci): sql scripts deploy check and release schema check (2.2.x) - #3953

Merged
kthoms merged 2 commits into
release/2.2.xfrom
fix/sql-scripts-deploy-check-2.2.x
Oct 23, 2026
Merged

kthoms merged 2 commits into
release/2.2.xfrom
fix/sql-scripts-deploy-check-2.2.x

Conversation

@kthoms

@kthoms kthoms commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Same change as on main, for release/2.2.x. 2.2.x takes no schema changes, so with this fix the 2.2.x patch releases keep skipping the sql scripts deploy.

prepare-deploy.sh decides whether the release deploys operaton-sql-scripts to Maven Central. It diffed the db directory against the newest v* tag reachable from HEAD. For 2.2.0 that was v2.2.0-RC1. Milestone and RC releases never deploy sql scripts, and RC1 already contained the 7.24 → 7.25 scripts, so the release log said No database changes detected since last release tag v2.2.0-RC1. and operaton-sql-scripts 7.25.0 (schema bump from #3225) was not deployed. The scripts are only available as the GitHub release asset, and we leave it at that.

Change: compare against the highest final vX.Y.Z tag below the version being released, taken from all tags. Only final tags count, because pre-release tags never deploy sql scripts. All tags rather than only reachable ones, because X.Y.0 is tagged on release/X.Y.x and main cannot reach it.

Tag selection with the current tags:

Releasing Compared against
2.2.1 v2.2.0
2.3.0 / 2.3.0-M1 v2.2.0
2.1.7 v2.1.6
2.2.0 (rerun) v2.1.6 → would have deployed 7.25.0

Ran the script locally: on main (2.3.0-SNAPSHOT) it picks v2.2.0; on release/2.2.x (2.2.1-SNAPSHOT) it picks v2.2.0. Both find no db changes and create .skip-deploy.

Database schema check in the release skill

New .devenv/scripts/release/check-db-schema.py (read-only, GitHub API only, so it works in shallow clones). It compares a branch with the previous final release (same tag rule as above) and reports:

  • the schema version (operaton.dbscheme.current.version) before and after
  • the changed files in the engine db directory
  • version-only (upgrade scripts only insert an ACT_GE_SCHEMA_LOG row) or structural
  • the commits that touched the db directory, with their PRs and closed issues

The operaton-release skill uses it:

  • PREPARE: a schema change in a patch release is a 🔴 blocker (release branches take no schema updates). For a .0 the release notes Database Schema section must state the change and link the PRs/issues from the report. For a final .0 with a new schema, operaton-sql-scripts:<schema> must not be on Maven Central yet.
  • PERFORM: the prepare-deploy.sh log line must match the schema check. Schema artifacts are never re-deployed by hand without an explicit decision.

Output for 2.2.0 (--branch v2.2.0 --version 2.2.0): schema 7.24.0 at v2.1.6 → 7.25.0, 15 files, version-only, introduced by 1789c09 / PR #3225. --branch release/2.2.x --version 2.2.1 and --branch main --version 2.3.0: no change.

Related to #3274 (manual DB schema steps in the release process), schema bump in #3225.

🤖 Generated with Claude Code

prepare-deploy.sh decided whether to deploy operaton-sql-scripts by
diffing the db directory against the newest v* tag reachable from HEAD.
That tag was a milestone or RC tag (v2.2.0-RC1), whose sql scripts are
never deployed, so the schema 7.25 change counted as already released
and operaton-sql-scripts 7.25.0 was not deployed with 2.2.0.

Compare against the highest final vX.Y.Z tag below the version being
released instead. Look at all tags, not only reachable ones: X.Y.0 is
tagged on release/X.Y.x, so main and newer release branches cannot
reach it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added the scope:ci Changes to the CI, e.g. GitHub workflows label Oct 23, 2026
Add .devenv/scripts/release/check-db-schema.py. It compares a release
branch with the previous final release and reports the schema version
before and after, the changed files in the engine db directory, whether
the change is version-only or structural, and the commits with their PRs
and closed issues. It only uses the GitHub API, so it works in shallow
clones.

The operaton-release skill runs it in PREPARE: a schema change in a patch
release is a blocker, and for a minor release the release notes must
describe the change and link its PRs and issues. PERFORM checks that the
sql scripts deploy matches the schema check.

Related to #3274

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 23, 2026
@kthoms kthoms changed the title fix(ci): compare sql scripts against the previous final release (2.2.x) fix(ci): sql scripts deploy check and release schema check (2.2.x) Oct 23, 2026
@kthoms
kthoms merged commit b752a97 into release/2.2.x Oct 23, 2026
12 checks passed
@kthoms
kthoms deleted the fix/sql-scripts-deploy-check-2.2.x branch October 23, 2026 14:38
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation scope:ci Changes to the CI, e.g. GitHub workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants