Skip to content

ci: align the 3.x version-check grammar with 4.x (DRIVER-1070) - #1066

Draft
nikagra wants to merge 1 commit into
scylladb:scylla-3.xfrom
nikagra:fix/DRIVER-1070-align-version-grammar
Draft

ci: align the 3.x version-check grammar with 4.x (DRIVER-1070)#1066
nikagra wants to merge 1 commit into
scylladb:scylla-3.xfrom
nikagra:fix/DRIVER-1070-align-version-grammar

Conversation

@nikagra

@nikagra nikagra commented Sep 8, 2026

Copy link
Copy Markdown

#1044 landed the shared version grammar on 3.x. Review of the 4.x twin #1049 then tightened that same grammar after #1044 had merged, and #1049 has now merged, so 3.x is the lagging line — and the drift is not cosmetic. Scored against the tightened grammar, the pattern on scylla-3.x today gets 60 of 77 cases wrong in both directions.

  • A pre-release label must carry its own number. CCM strips a trailing -x86_64/-aarch64 before parsing (ccmlib/utils/version.py), so 6.2.0-dev-aarch64 passes the current 3.x check and then reaches CCM as the moving selector 6.2.0-dev.
  • Dated build ids such as 2024.2.3-0.20250108.931ce203dcf5 are now accepted; the current pattern rejects them outright even though CCM recognises the form, so a real dated build fails the build.
  • A bare label stays exact when a dated build id follows it, so 5.4.0~dev-0.20230801.37b548f46365 keeps working.
  • Two deliberate tightenings: dot-separated discriminators (6.2.0-rc.1) are rejected, and a trailing suffix may no longer end in a separator (6.2.0-rc0-, 6.2.0-rc0.x86_64.).
  • The three error messages name the dated-build form.

Verified: SERVER_VERSION_RE expands byte-identically on both lines, and the grammar block and all three messages are byte-identical to merged 4.x. 77-case corpus plus tail-boundary probes; every accepted string put through ccmlib itself — of 41, 39 parse to an exact version, 2 fail loudly, none becomes a moving selector; each intended case shown to flip against the pre-patch file; resolve-*-version and download-scylla exercised end to end against a stubbed get-version (10 cases). No integration suite runs locally, so the real ccm create path rests on CI. CI is unaffected either way — 3.x lanes pass only aliases.

Twin of #1049 (4.x), merged as f2890a9, which carries the identical grammar.

Refs: #1049

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Validation must account for CCM’s global architecture-token removal.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Aligns the 3.x server-version validation grammar with 4.x.

Changes:

  • Accepts dated build identifiers.
  • Tightens prerelease and separator validation.
  • Updates validation error messages.
File summaries
File Review
Makefile Updates version validation, but permits architecture tokens that CCM can normalize into moving selectors.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Makefile
# grammar decides all of them.
SERVER_VERSION_RE = ^[0-9]+\.[0-9]+\.[0-9]+$$|^[0-9]+\.[0-9]+(\.[0-9]+)?[-~.][A-Za-z][A-Za-z._~-]*[0-9][A-Za-z0-9._~-]*$$
_VERSION_NUM = [0-9]+\.[0-9]+(\.[0-9]+)?
_VERSION_LABEL = [A-Za-z]+[0-9][A-Za-z0-9]*
scylladb#1044 merged the shared grammar on 3.x, then review of the 4.x twin scylladb#1049
tightened it, leaving the two release lines checking different things.

A pre-release label must carry its own number: CCM strips a trailing -x86_64,
so 6.2.0-dev-aarch64 would reach it as the moving 6.2.0-dev. A bare label is
exact only before a dated build id such as 2024.2.3-0.20250108.931ce203dcf5.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018vGi2zZJxw51iagdPmVa4t
@nikagra
nikagra force-pushed the fix/DRIVER-1070-align-version-grammar branch from 3f838df to 5182e3a Compare September 9, 2026 11:23
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.

2 participants