Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions .github/workflows/test-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ on:
required: false
default: ""
type: string
maven-engine:
description: "Timestamped snapshot (A.B.C-YYYYMMDD.HHMMSS-N) Maven resolves for the A.B.C-SNAPSHOT engine, so the build cannot move with later deploys; empty = the engine itself (floating); a .devN release always uses the pinned one"
required: false
default: ""
type: string
release:
description: "The release legs: all four platforms and Python 3.11 to 3.14 (otherwise the small main/nightly legs)"
required: false
Expand All @@ -86,6 +91,11 @@ on:
required: false
default: ""
type: string
maven-engine:
description: "Timestamped snapshot (A.B.C-YYYYMMDD.HHMMSS-N) Maven resolves for the A.B.C-SNAPSHOT engine, so the build cannot move with later deploys; empty = the engine itself (floating); a .devN release always uses the pinned one"
required: false
default: ""
type: string
legs:
description: "full = all four platforms, Python 3.12 and 3.14; pull-request = linux-x86_64 and Python 3.12 only (what a pull request runs)"
required: false
Expand Down Expand Up @@ -132,6 +142,7 @@ jobs:
run: ${{ steps.plan.outputs.run }}
version: ${{ steps.ver.outputs.version }}
engine: ${{ steps.ver.outputs.engine }}
maven-engine: ${{ steps.ver.outputs.maven-engine }}
final: ${{ steps.ver.outputs.final }}
build: ${{ steps.plan.outputs.build }}
test: ${{ steps.plan.outputs.test }}
Expand All @@ -148,6 +159,7 @@ jobs:
env:
INPUT_VERSION: ${{ inputs.version }}
INPUT_ENGINE: ${{ inputs.engine }}
INPUT_MAVEN_ENGINE: ${{ inputs.maven-engine }}
INPUT_RELEASE: ${{ inputs.release }}
run: |
set -euo pipefail
Expand All @@ -158,6 +170,7 @@ jobs:
if [[ "$version" == *.dev* ]]; then
final=false
pin_engine=""
pin_snapshot=""
if [ "${INPUT_RELEASE:-}" = true ]; then
# a .devN RELEASE links the pinned snapshot, the one arcadedb-jvm embeds (scripts/dev_engine_pin.json), and nothing else
pin_env="$(python3 -I scripts/dev_engine_pin.py shell-env "$version")"
Expand All @@ -166,6 +179,9 @@ jobs:
[ -z "$INPUT_ENGINE" ] || [ "$INPUT_ENGINE" = "$pin_engine" ] || { echo "::error::A dev release links the pinned engine $pin_engine, not $INPUT_ENGINE" >&2; exit 1; }
python3 -I scripts/dev_engine_pin.py check --tag "$version"
engine="$pin_engine"
# Maven resolves the pinned TIMESTAMPED snapshot, not the floating A.B.C-SNAPSHOT: upstream deploys a new snapshot most days
pin_snapshot="$(printf '%s\n' "$pin_env" | sed -n 's/^SNAPSHOT=//p')"
[ -n "$pin_snapshot" ] || { echo "::error::no snapshot in the pin" >&2; exit 1; }
else
engine="${INPUT_ENGINE:-$DEV_ENGINE}"
fi
Expand All @@ -175,6 +191,15 @@ jobs:
# a final or post wheel links exactly the engine release it is named after
[ "$engine" = "$base" ] || { echo "::error::Version $version links engine $base, not $engine" >&2; exit 1; }
fi
# the version Maven resolves: the timestamped snapshot of a dev release (the pin), or of a manual run that names one, else the engine
maven_engine="${pin_snapshot:-}"
if [ -n "${INPUT_MAVEN_ENGINE:-}" ]; then
[[ "$engine" == *-SNAPSHOT ]] || { echo "::error::maven-engine needs a SNAPSHOT engine, not $engine" >&2; exit 1; }
[[ "$INPUT_MAVEN_ENGINE" =~ ^${engine%-SNAPSHOT}-[0-9]{8}\.[0-9]{6}-[0-9]+$ ]] || { echo "::error::maven-engine '$INPUT_MAVEN_ENGINE' is not a timestamped snapshot of $engine" >&2; exit 1; }
[ -z "$maven_engine" ] || [ "$maven_engine" = "$INPUT_MAVEN_ENGINE" ] || { echo "::error::A dev release links the pinned snapshot $maven_engine, not $INPUT_MAVEN_ENGINE" >&2; exit 1; }
maven_engine="$INPUT_MAVEN_ENGINE"
fi
maven_engine="${maven_engine:-$engine}"
# A SNAPSHOT engine is for a devN version only: a final or post version is refused above (it links exactly its release). A release run
# (release-native.yml passes `release: true`) links a snapshot only for a .devN tag, and only the pinned one (scripts/dev_engine_pin.json,
# proven above); any other snapshot, and every snapshot of a final or post release, is refused. tests/test_dev_engine_pin.py runs this step.
Expand All @@ -183,8 +208,8 @@ jobs:
[ "$final" = false ] || { echo "::error::A SNAPSHOT engine is for a devN version only" >&2; exit 1; }
[ "${INPUT_RELEASE:-}" != true ] || [ "$engine" = "${pin_engine:-}" ] || { echo "::error::A release never links a SNAPSHOT engine ($engine) except the pinned one of a .devN tag" >&2; exit 1; }
fi
{ echo "version=$version"; echo "engine=$engine"; echo "final=$final"; } >> "$GITHUB_OUTPUT"
echo "wheel version $version, engine $engine, final=$final"
{ echo "version=$version"; echo "engine=$engine"; echo "maven-engine=$maven_engine"; echo "final=$final"; } >> "$GITHUB_OUTPUT"
echo "wheel version $version, engine $engine (Maven resolves $maven_engine), final=$final"

- name: Choose the legs
id: plan
Expand Down Expand Up @@ -331,7 +356,7 @@ jobs:
- name: Build the native image in manylinux_2_28
if: ${{ matrix.kind == 'linux' }}
env:
ENGINE: ${{ needs.plan.outputs.engine }}
ENGINE: ${{ needs.plan.outputs.maven-engine }}
MANYLINUX_IMAGE: ${{ matrix.container }}
XMX: ${{ matrix.xmx }}
NI_EXTRA: ${{ matrix.ni_extra }}
Expand Down Expand Up @@ -365,7 +390,7 @@ jobs:
- name: Build the native image on the runner
if: ${{ matrix.kind != 'linux' }}
env:
ARCADEDB_ENGINE_VERSION: ${{ needs.plan.outputs.engine }}
ARCADEDB_ENGINE_VERSION: ${{ needs.plan.outputs.maven-engine }}
MARCH: compatibility
XMX: ${{ matrix.xmx }}
NI_EXTRA: ${{ matrix.ni_extra }}
Expand All @@ -392,6 +417,7 @@ jobs:
env:
VERSION: ${{ needs.plan.outputs.version }}
ENGINE: ${{ needs.plan.outputs.engine }}
MAVEN_ENGINE: ${{ needs.plan.outputs.maven-engine }}
RELEASE: ${{ inputs.release }}
run: |
set -euo pipefail
Expand All @@ -414,6 +440,12 @@ jobs:
extra+=(--engine-pin)
fi
fi
if [[ "$MAVEN_ENGINE" != "$ENGINE" ]]; then
# the arcadedb jars of the native-image classpath (build.log), read from the Maven repository, are the pinned jars byte for byte: a
# floating SNAPSHOT or a sibling module that Maven resolved on its own differs here (the file names cannot tell: Maven names a
# resolved snapshot jar with its base version)
uv run --no-project --python 3.12 python -I scripts/dev_engine_pin.py verify-build-log "$T/lib/build.log" "$m2"
fi
uv run --no-project --python 3.12 python native/wheel/build_wheel.py --lib-dir "$T/lib" --version "$VERSION" --engine "$ENGINE" \
--graalvm-home "$GRAALVM_HOME_P5" --m2-repo "$m2" \
--notices-out "$T/record/THIRD_PARTY_NOTICES.generated.md" --modules-out "$T/record/jdk-modules.txt" --out "$T/wheel" ${extra[@]+"${extra[@]}"}
Expand Down
6 changes: 4 additions & 2 deletions docs/modules/ROOT/pages/how-to/facets.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -554,16 +554,18 @@ facets = rs.facets
tree = facets["t"]
print(len(rows), tree["type"], tree["source"], sorted(tree))
print("Media.tags" in tree["reason"])
print(counts(facets["n"]))
print(facets["n"]["type"], facets["n"]["source"] in ("index", "scan"))
----

[source,text]
----
6 hierarchy unavailable ['reason', 'source', 'type']
True
{'t0/t1': 6}
terms True
----

The block checks that the other facet is answered (`type`, and a `source` of `index` or `scan`), not its counts. A count is read together with its `source` and with `meta` (`exact`, `patched`, `lag_ms`), as the table of the result describes.

== Parameters

The bounds of `RANGES` and `HISTOGRAM`, the values of `INCLUDE`, the cursor of `AFTER` and the condition of `FILTER` take parameters, named (`:lo`) or positional (`?`), through `db.query` and `db.command`. `TOP` and `PRECISION` take an integer literal, not a parameter.
Expand Down
10 changes: 10 additions & 0 deletions native/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@

<dependencyManagement>
<dependencies>
<!-- every arcadedb module at arcadedb.version, whoever pulls it in: engine and server pom list their sibling modules at their own
(floating) -SNAPSHOT version, which would mix builds with a timestamped arcadedb.version (a .devN release, scripts/dev_engine_pin.json) -->
<dependency><groupId>com.arcadedb</groupId><artifactId>arcadedb-bolt</artifactId><version>${arcadedb.version}</version></dependency>
<dependency><groupId>com.arcadedb</groupId><artifactId>arcadedb-console</artifactId><version>${arcadedb.version}</version></dependency>
<dependency><groupId>com.arcadedb</groupId><artifactId>arcadedb-graphql</artifactId><version>${arcadedb.version}</version></dependency>
<dependency><groupId>com.arcadedb</groupId><artifactId>arcadedb-grpc</artifactId><version>${arcadedb.version}</version></dependency>
<dependency><groupId>com.arcadedb</groupId><artifactId>arcadedb-integration</artifactId><version>${arcadedb.version}</version></dependency>
<dependency><groupId>com.arcadedb</groupId><artifactId>arcadedb-mcp</artifactId><version>${arcadedb.version}</version></dependency>
<dependency><groupId>com.arcadedb</groupId><artifactId>arcadedb-postgresw</artifactId><version>${arcadedb.version}</version></dependency>
<dependency><groupId>com.arcadedb</groupId><artifactId>arcadedb-redisw</artifactId><version>${arcadedb.version}</version></dependency>
<!-- phase 3: jvector 4.0.2 carries the Highway (FFM) provider and libjvector-*.so; the engine pins 4.0.1 -->
<dependency><groupId>io.github.jbellis</groupId><artifactId>jvector</artifactId><version>4.0.2</version></dependency>
<!-- the versions the wheel ships (the Docker image lib/), not what the parent pom resolves -->
Expand Down
5 changes: 5 additions & 0 deletions scripts/dev_engine_pin.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@
"arcadedb-network": "b23403fbdd585395717796d9943f20a12473cba3df1bf082e7ceb83e6de6a082",
"arcadedb-server": "0c1430856817df018135c30c1df9fc730a3a401a378309553f1ba4c5f8bb25ef",
"arcadedb-studio": "351a767ede7affd7921b2c4b820a6eba63ef0326c3737ed329c82474f3baecc1"
},
"native_extra_jars": {
"arcadedb-bolt": "f9c93b60abae0164f8921116c2a94dbfaba5a8c72c5ad525f77903d75c9419ac",
"arcadedb-postgresw": "397a3afc51e647da7eea6701dcf549ae0cffe0dd6f7d6cc3fc4cc8346ec4f4dd",
"arcadedb-redisw": "17b9fbbac032a40903f994b10515f1c00305e7d6ec5128a52066fd3b287d112d"
}
}
Loading
Loading