Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b7ff93e
feat: require Java 17 candidate SDK
imbajin Oct 3, 2026
3170e0d
chore: align candidate prerequisite ancestry
imbajin Oct 3, 2026
b3e7da4
fix(client): isolate HTTPS test fixtures
imbajin Oct 3, 2026
1c38dee
chore: incorporate reviewed preparation fixes
imbajin Oct 3, 2026
caf0dca
docs: scope charset options to preparation builds
imbajin Oct 3, 2026
0515f01
docs: map bundled candidate license grants
imbajin Oct 3, 2026
5b3cea5
chore: retain final module prerequisite ancestry
imbajin Oct 3, 2026
942febb
fix(build): exclude binary truststores from lint
imbajin Oct 3, 2026
93f14b0
fix(dist): include complete package legal files
imbajin Oct 4, 2026
da127fb
docs: record verified Java 17 support matrix
imbajin Oct 4, 2026
1803bda
chore: inherit final module validation fixes
imbajin Oct 4, 2026
9360034
chore: inherit Hubble launcher safeguards
imbajin Oct 4, 2026
3c79673
fix: retain sdk proof and clear form errors
imbajin Oct 4, 2026
2499173
docs(spark): retain charset flags for stock sdk
imbajin Oct 4, 2026
7fa20b8
chore(ci): cancel superseded PR runs
imbajin Oct 4, 2026
5c2a9ef
chore(ci): cancel superseded labeler runs
imbajin Oct 4, 2026
de2e8d6
fix(build): verify candidate SDK packaging
imbajin Oct 4, 2026
0066fcf
chore: inherit verified preparation fixes
imbajin Oct 4, 2026
d25e8d2
chore: sync finalized Java 17 prerequisites
imbajin Oct 5, 2026
ddab150
docs: clarify Java 17 compatibility scope
imbajin Oct 5, 2026
802c1e1
fix: propagate preparation review repairs
imbajin Oct 5, 2026
5622850
chore: sync merged ASF prerequisites
imbajin Oct 5, 2026
20ba1eb
docs: inherit focused Hubble guidance
imbajin Oct 5, 2026
b3d4442
fix(hubble): fail closed on jar inspection errors
imbajin Oct 5, 2026
c4ad15f
fix(hubble): retry unavailable discovered servers
imbajin Oct 5, 2026
9c0ee33
chore: sync merged Hubble prerequisite
imbajin Oct 6, 2026
3620432
docs: mark temporary Server SDK sources
imbajin Oct 6, 2026
78b634f
chore: inherit consolidated upstream CI
imbajin Oct 6, 2026
06af79b
chore: sync upstream CI review ancestry
imbajin Oct 6, 2026
d17c217
docs(ci): clarify candidate input selection
imbajin Oct 6, 2026
31b51cc
fix(ci): align image builds with Java 17 SDK
imbajin Oct 6, 2026
e0fe694
fix(ci): validate native stack merge inputs
imbajin Oct 6, 2026
f8db70e
feat: complete Java 17 candidate SDK cutover (#783)
imbajin Oct 6, 2026
dd9cd4b
chore: reconcile merged Java 17 core history
imbajin Oct 6, 2026
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
5 changes: 4 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@

# Version-control and local development metadata
.git
.github
.github/**
!.github/scripts/
.github/scripts/**
!.github/scripts/verify_candidate_image_sdk.py
.idea
.vscode
.codex-task
Expand Down
88 changes: 88 additions & 0 deletions .github/actions/setup-candidate-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: 'Setup same-source candidate SDK'
description: 'Build a locked Java 17 server reactor outside the workspace in an isolated Maven repository'

# TODO(apache/hugegraph#3263): temporary pre-merge source; after merge use apache/hugegraph and a verified ASF SHA.
inputs:
repository:
description: 'GitHub owner/repository for the candidate SDK'
default: 'hugegraph/hugegraph'
ref:
description: 'Fetchable candidate source ref'
default: 'codex/cypher-minimal-compat'
expected-commit:
description: 'Locked full candidate source commit'
default: '4c162f539b906fa06dd83228e3691b77fa5b77d7'

outputs:
repository:
description: Resolved candidate source repository
value: ${{ steps.source.outputs.repository }}
commit_id:
description: Verified full candidate source SHA
value: ${{ steps.source.outputs.commit_id }}
fetch_ref:
description: Fetchable candidate source ref
value: ${{ steps.source.outputs.fetch_ref }}
archive:
description: 'Server distribution built from the same candidate source'
value: ${{ steps.build.outputs.archive }}
archive-sha256:
description: SHA256 of the same-source candidate distribution
value: ${{ steps.build.outputs.archive-sha256 }}
manifest:
description: SDK artifact hashes and source provenance manifest
value: ${{ steps.build.outputs.manifest }}
maven-repo:
description: Isolated Maven repository used by subsequent toolchain builds
value: ${{ steps.build.outputs.maven-repo }}

runs:
using: composite
steps:
- name: Resolve locked candidate source
id: source
uses: ./.github/actions/get-hugegraph-commit
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
expected-commit: ${{ inputs.expected-commit }}
- name: Install same-source candidate reactor
id: build
shell: bash
env:
SERVER_COMMIT: ${{ steps.source.outputs.commit_id }}
SERVER_REPOSITORY: ${{ steps.source.outputs.repository }}
SERVER_FETCH_REF: ${{ steps.source.outputs.fetch_ref }}
run: |
candidate_repo=$(mktemp -d "$RUNNER_TEMP/hugegraph-candidate-m2.XXXXXX")
server_build=$(mktemp -d "$RUNNER_TEMP/hugegraph-candidate-build.XXXXXX")
bash "$GITHUB_WORKSPACE/hugegraph-client/assembly/travis/install-candidate-sdk.sh" \
"$SERVER_COMMIT" "$server_build/hugegraph" "$candidate_repo"
archives=("$server_build"/hugegraph/hugegraph-server/apache-hugegraph-*.tar.gz)
if [[ ${#archives[@]} -ne 1 || ! -f "${archives[0]}" ]]; then
printf 'Expected one candidate server archive, found: %s\n' "${archives[*]}" >&2
exit 1
fi
manifest="$candidate_repo/candidate-sdk-manifest.json"
if [[ ! -s "$manifest" ]]; then
printf 'Candidate SDK installer did not produce a provenance manifest\n' >&2
exit 1
fi
manifest_artifact_id=$(python3 -c 'import uuid; print(uuid.uuid4().hex)')
archive_sha=$(sha256sum "${archives[0]}" | cut -d ' ' -f 1)
printf 'archive-sha256=%s\nmanifest=%s\n' "$archive_sha" \
"$manifest" >> "$GITHUB_OUTPUT"
printf 'manifest-artifact-id=%s\n' "$manifest_artifact_id" >> "$GITHUB_OUTPUT"
# Keep subprocess Maven repository isolation aligned with CLI arguments.
{
printf 'MAVEN_OPTS=%s -Dmaven.repo.local=%s\n' "${MAVEN_OPTS:-}" "$candidate_repo"
printf 'MAVEN_ARGS=%s -Dmaven.repo.local=%s\n' "${MAVEN_ARGS:-}" "$candidate_repo"
printf 'CANDIDATE_SOURCE_COMMIT=%s\n' "$SERVER_COMMIT"
} >> "$GITHUB_ENV"
printf 'archive=%s\nmaven-repo=%s\n' "${archives[0]}" "$candidate_repo" >> "$GITHUB_OUTPUT"
- name: Retain candidate SDK provenance
uses: actions/upload-artifact@v7
with:
name: candidate-sdk-manifest-${{ steps.build.outputs.manifest-artifact-id }}
path: ${{ steps.build.outputs.manifest }}
if-no-files-found: error
2 changes: 1 addition & 1 deletion .github/actions/setup-hugegraph-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ runs:
fi
if [[ "$ISOLATE_FIXTURE_REPO" == true && "$FIXTURE_MODE" != start ]]; then
fixture_repo=$(mktemp -d "$RUNNER_TEMP/hugegraph-fixture-m2.XXXXXX")
export MAVEN_ARGS="-Dmaven.repo.local=$fixture_repo"
export MAVEN_ARGS="${MAVEN_ARGS:-} -Dmaven.repo.local=$fixture_repo"
export MAVEN_OPTS="${MAVEN_OPTS:-} -Dmaven.repo.local=$fixture_repo"
fi
if [[ "$FIXTURE_MODE" != standalone && -z "$FIXTURE_ARTIFACT" ]]; then
Expand Down
27 changes: 17 additions & 10 deletions .github/actions/setup-java-env/action.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
name: 'Setup Java and Maven Environment'
description: 'Install JDK, cache Maven packages, and optionally apply staged Maven repository settings'
description: 'Install JDK, cache Maven packages, and configure Central with ASF Stage fallback'

inputs:
java-version:
description: 'Java version to install'
required: false
default: '11'
default: '17'
distribution:
description: 'JDK distribution'
required: false
default: 'zulu'
use-stage:
description: 'Whether to apply staged Maven repository settings'
required: false
default: 'true'

runs:
using: composite
Expand All @@ -24,10 +20,21 @@ runs:
java-version: ${{ inputs.java-version }}
distribution: ${{ inputs.distribution }}
cache: 'maven'
cache-dependency-path: |
**/pom.xml
.github/configs/settings.xml
overwrite-settings: false

- name: Use staged maven repo settings
if: ${{ inputs.use-stage == 'true' }}
- name: Configure Maven repositories
shell: bash
run: |
cp "$HOME/.m2/settings.xml" /tmp/settings.xml
cp .github/configs/settings.xml "$HOME/.m2/settings.xml"
set -euo pipefail
maven_version=$(mvn -version | sed $'s/\033\\[[0-9;]*m//g' | sed -n 's/^Apache Maven \([0-9.]*\).*/\1/p' | head -1)
if [[ ! "$maven_version" =~ ^([0-9]+)\.([0-9]+)\. ]] ||
(( 10#${BASH_REMATCH[1]:-0} < 3 ||
(10#${BASH_REMATCH[1]:-0} == 3 && 10#${BASH_REMATCH[2]:-0} < 9) )); then
echo 'Maven 3.9 or newer is required for shared MAVEN_ARGS settings' >&2
exit 1
fi
printf 'MAVEN_ARGS=%s --settings %s/.github/configs/settings.xml\n' \
"${MAVEN_ARGS:-}" "$GITHUB_WORKSPACE" >> "$GITHUB_ENV"
13 changes: 7 additions & 6 deletions .github/configs/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@
<repository>
<id>staged-releases</id>
<url>https://repository.apache.org/content/groups/staging/</url>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>staged-releases</id>
<url>https://repository.apache.org/content/groups/staging/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

Expand Down
50 changes: 47 additions & 3 deletions .github/scripts/ci-policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import os
from pathlib import Path
import subprocess
from urllib.parse import quote

MODULES = {
"server": ["server", "commons", "struct", "pd", "store", "hstore", "cluster", "docker", "helm", "dependency_license"],
Expand Down Expand Up @@ -232,11 +233,51 @@ def require_current_pr(plan, fetch):
return
live = fetch(f"repos/{plan['repository']}/pulls/{plan['pr']}")
if (live.get("state") != "open" or live["head"]["sha"] != plan["head"]
or live["base"]["sha"] != plan["base"]
or live["head"]["repo"]["full_name"] != plan["source"]
or live["head"]["ref"] != plan["branch"]
or live["base"]["repo"]["full_name"] != plan["repository"]):
raise StaleInputError("PR inputs changed; refresh the branch and start a new PR run")
if "stack" in plan:
# Native stacks can leave REST base.sha at an older snapshot. The actual
# branch ref, rather than that snapshot, identifies the tested base.
ref = fetch(f"repos/{plan['repository']}/git/ref/heads/{quote(plan['baseBranch'], safe='')}")
if (live.get("stack") != plan["stack"] or live["base"].get("ref") != plan["baseBranch"]
or ref.get("object", {}).get("sha") != plan["base"]
or live.get("merge_commit_sha") != plan["testedMergeSHA"]):
raise StaleInputError("PR stack or canonical base changed; start a new PR run")
elif live["base"]["sha"] != plan["base"]:
raise StaleInputError("PR base changed; start a new PR run")


def record_stack_merge(plan, event_pr, parents, fetch):
"""Accept only GitHub's native stack merge of the canonical base tree."""
try:
live = fetch(f"repos/{plan['repository']}/pulls/{plan['pr']}")
stack = live["stack"]
branch = live["base"]["ref"]
anchor = stack["base"]["sha"]
if (type(stack["id"]) is not int or stack["id"] <= 0
or type(stack["number"]) is not int or stack["number"] <= 0
or type(stack["position"]) is not int or stack["position"] <= 1
or type(stack["size"]) is not int or stack["size"] < stack["position"]
or not stack["base"]["ref"] or not anchor or not branch
or event_pr["base"]["ref"] != branch
or ("stack" in event_pr and event_pr["stack"] != stack)
or live.get("merge_commit_sha") != plan["testedMergeSHA"]
or len(parents) != 2 or parents[1] != plan["head"]):
raise StaleInputError("checkout lacks a valid native PR stack merge identity")
ref = fetch(f"repos/{plan['repository']}/git/ref/heads/{quote(branch, safe='')}")
canonical = ref["object"]["sha"]
virtual = parents[0]
if (ref["object"].get("type") != "commit" or not canonical
or git("show", "-s", "--format=%P", virtual).split() != [anchor, canonical]
or git("rev-parse", virtual + "^{tree}") != git("rev-parse", canonical + "^{tree}")
or git("merge-base", anchor, canonical) != anchor):
raise StaleInputError("stack virtual parent does not prove the current canonical base")
plan.update(base=canonical, baseBranch=branch, stack=stack)
require_current_pr(plan, fetch)
except (ValueError, KeyError, TypeError, AttributeError, subprocess.SubprocessError, OSError) as error:
raise StaleInputError("native PR stack identity could not be verified") from error


def create_plan(project, event, repository, fetch=api, external_inputs=None):
Expand All @@ -261,8 +302,9 @@ def create_plan(project, event, repository, fetch=api, external_inputs=None):
raise StaleInputError("PR event has an empty input identity")
parents = git("show", "-s", "--format=%P", plan["testedMergeSHA"]).split()
if parents != [plan["base"], plan["head"]]:
raise StaleInputError("checkout is not the event PR merge; start a new PR run")
require_current_pr(plan, fetch)
record_stack_merge(plan, pr, parents, fetch)
else:
require_current_pr(plan, fetch)
# head/base objects must exist locally; workflow fetches both before planning.
ancestor = git("merge-base", plan["base"], plan["head"])
paths = git("diff", "--no-renames", "--name-only", ancestor, plan["head"]).splitlines()
Expand Down Expand Up @@ -312,6 +354,8 @@ def gate(plan, results, fetch=None):
require_current_pr(plan, fetch or api)
report = {key: plan[key] for key in ["schema", "repository", "project", "pr", "source", "branch", "base",
"head", "testedMergeSHA", "externalInputs"]}
if "stack" in plan:
report.update(baseBranch=plan["baseBranch"], stack=plan["stack"])
report.update(runID=int(os.environ.get("GITHUB_RUN_ID", "0")),
runAttempt=int(os.environ.get("GITHUB_RUN_ATTEMPT", "1")),
executed=plan["expected"], results=results)
Expand Down
Loading
Loading