Skip to content

fix(#8): read the engine version by its shape; classifier jars under their own version - #14

Merged
robfrank merged 1 commit into
mainfrom
fix/8-engine-jar-regex-classifiers
Oct 23, 2026
Merged

robfrank merged 1 commit into
mainfrom
fix/8-engine-jar-regex-classifiers

Conversation

@robfrank

Copy link
Copy Markdown
Contributor

Closes #8

ENGINE_JAR_PATTERN = r"^arcadedb-engine-(.+)\.jar$" treated everything after arcadedb-engine- as the version. So arcadedb-engine-26.11.1-SNAPSHOT-tests.jar read as version 26.11.1-SNAPSHOT-tests, and a valid jar set failed with "Engine jars of more than one version".

The version is now matched by its shape: X.Y.Z, optionally followed by -RCn and/or -SNAPSHOT. Whatever comes after it is a Maven classifier. A classifier jar counts under its own version and isn't skipped, because it carries engine classes and ships on the classpath (jvm.py adds every *.jar). As a result:

  • a classifier jar of the same version is fine;
  • a classifier jar of another version still fails the check;
  • a classifier jar with no plain engine jar beside it is reported as "no engine jar".

Test plan

  • tests/test_extract_version_classifiers.py (24 cases). RED: 16 failed on main before the first fix.
    • Each of tests/sources/javadoc/shaded/all, for SNAPSHOT, release and RC, reads as the plain version.
    • Open-ended classifiers work too: jar-with-dependencies, native, test-sources.
    • A classifier jar of another version raises, naming both versions.
    • A -sources jar alone raises "no engine jar".
    • Two real versions still raise.
  • The existing tests/test_extract_version.py passes unchanged.
  • The real jar set from arcadedata/arcadedb:latest still reads 26.11.1-SNAPSHOT.
  • Full suite on darwin/arm64: 1083 passed.

Coverage

Invariant: every engine jar in the set, with or without a classifier, is counted under its real version, and the set must have exactly one version plus a plain engine jar.

Callers, found with git grep -nE 'arcadedb-engine|extract_version': build.sh, build-native.sh, Dockerfile.build, write_version.py and both workflows' download-jars all go through extract_raw_version_from_jars. No other code parses engine jar names. build.sh:444 builds the exact name arcadedb-integration-{version}.jar. tests/test_server_packaging.py:91 matches arcadedb-studio* in the bundled jars; the image ships no studio classifier jar.

Known gaps: A version with a qualifier other than -RCn/-SNAPSHOT (say -beta1) would now read as the bare version plus a classifier. ArcadeDB doesn't publish such versions today.

Adversarial pass

The first version of this fix skipped classifier jars.

  1. A classifier jar of another version passed silently and still shipped. Real. Fixed: classifier jars now count under their own version, with a test for it.
  2. The list of classifiers was closed (-jar-with-dependencies, -native brought the bug back). Real. Fixed: the version is now matched by shape, so any suffix is a classifier, with tests.
  3. The comment implied the engine already ships a classifier jar. Fixed: the comment now only describes the naming.

Review cycles

This repository has no Claude review workflow, so no bot review was waited for. Final state: no-reviewer.

🤖 Generated with Claude Code

…their own version

arcadedb-engine-(.+).jar read arcadedb-engine-26.11.1-SNAPSHOT-tests.jar as
version 26.11.1-SNAPSHOT-tests and failed a valid jar set with "more than
one version". The version is now matched by shape and any suffix is a
classifier, counted under its own version: a classifier jar of another
version (which ships on the classpath) still fails, and a classifier jar
alone is no engine jar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@robfrank
robfrank merged commit 00ef0d7 into main Oct 23, 2026
46 checks passed
@robfrank
robfrank deleted the fix/8-engine-jar-regex-classifiers branch October 23, 2026 07:39
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.

extract_version: engine-jar regex also matches -tests/-sources classifier jars

1 participant