Seanium commented on code in PR #3102:
URL: https://github.com/apache/hugegraph/pull/3102#discussion_r3631246456
##########
.github/workflows/docker-build-ci.yml:
##########
@@ -50,3 +61,43 @@ jobs:
HC=$(docker inspect --format='{{json .Config.Healthcheck}}'
"$IMAGE_ID")
echo "Healthcheck: $HC"
[[ "$HC" != "null" ]] || { echo "ERROR: HEALTHCHECK missing in ${{
matrix.dockerfile }}"; exit 1; }
+
+ server-runtime-smoke:
+ runs-on: ubuntu-24.04
+ timeout-minutes: 45
+ strategy:
+ fail-fast: false
+ matrix:
+ arch: [amd64, arm64, riscv64]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up QEMU
+ if: matrix.arch != 'amd64'
+ uses: docker/setup-qemu-action@v3
Review Comment:
Fixed in `5972a6f5`. The workflow no longer uses the forbidden setup
actions: emulation is registered from a fixed `tonistiigi/binfmt` OCI digest,
and Buildx is created with the runner CLI and cleaned up afterward. Apache
Docker Build CI run `29900112688` passed the full matrix on the previous head.
The same six jobs also passed on the current head in org run `29927481339`,
including amd64, arm64, and riscv64. The new Apache run `29927475936` is
awaiting maintainer approval.
##########
.github/workflows/docker-build-ci.yml:
##########
@@ -50,3 +61,43 @@ jobs:
HC=$(docker inspect --format='{{json .Config.Healthcheck}}'
"$IMAGE_ID")
echo "Healthcheck: $HC"
[[ "$HC" != "null" ]] || { echo "ERROR: HEALTHCHECK missing in ${{
matrix.dockerfile }}"; exit 1; }
+
+ server-runtime-smoke:
+ runs-on: ubuntu-24.04
+ timeout-minutes: 45
+ strategy:
+ fail-fast: false
+ matrix:
+ arch: [amd64, arm64, riscv64]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set up QEMU
+ if: matrix.arch != 'amd64'
+ uses: docker/setup-qemu-action@v3
+ with:
+ platforms: ${{ matrix.arch }}
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Build HugeGraph Server for linux/${{ matrix.arch }}
Review Comment:
Fixed in `5972a6f5`. The riscv64 job now copies clean tracked source into
the final RISC-V image, asserts `uname -m=riscv64`, installs and verifies
`/usr/bin/protoc` plus `/usr/bin/grpc_java_plugin`, then runs a clean 14-module
build with `-P riscv64-protobuf-tools -Drocksdb-only` and checks the
RocksDB-only distribution boundary. This native gate passed in Apache run
`29900112688` on the previous head and in org current-head run `29927481339`.
##########
hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/TaskCoreTest.java:
##########
@@ -112,6 +114,29 @@ private static void waitUntilTaskRunning(TaskScheduler
scheduler) {
Assert.fail("Timed out waiting for task to start running");
}
+ private static void waitUntilTaskProgress(TaskScheduler scheduler, Id id,
+ int expectedProgress,
+ long timeoutSeconds) {
+ long deadline = System.nanoTime() +
+ TimeUnit.SECONDS.toNanos(timeoutSeconds);
+ do {
+ HugeTask<Object> task = scheduler.task(id);
+ if (task.progress() >= expectedProgress) {
Review Comment:
Fixed in `5972a6f5`. `waitUntilTaskProgress()` now rejects `completed()`
before accepting the threshold and returns the same observed task instance. The
Gremlin job sets a 1-second minimum save interval and sleeps 1 second per
progress step, so intermediate progress is persisted and leaves a deterministic
cancellation window. The focused three-method native RISC-V run passed, and the
current-head Linux RocksDB/memory plus both macOS test jobs passed.
##########
hugegraph-server/hugegraph-dist/src/assembly/travis/run-rocksdb-jni-smoke-test.sh:
##########
@@ -0,0 +1,119 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+set -euo pipefail
+
+if [[ $# -ne 1 ]]; then
+ echo "USAGE: $0 SERVER_DIR" >&2
+ exit 1
+fi
+
+TRAVIS_DIR=$(cd "$(dirname "$0")" && pwd)
+SERVER_DIR=$(cd "$1" && pwd)
+EXPECTED_ARCH=${EXPECTED_ARCH:-}
+EXPECTED_JAVA_MAJOR=${EXPECTED_JAVA_MAJOR:-11}
+ACTUAL_ARCH=$(uname -m)
+
+if [[ -n "$EXPECTED_ARCH" && "$ACTUAL_ARCH" != "$EXPECTED_ARCH" ]]; then
+ echo "Expected architecture $EXPECTED_ARCH, got $ACTUAL_ARCH" >&2
+ exit 1
+fi
+
+JAVA_VERSION=$(java -version 2>&1 | awk -F '"' '/version/ {print $2; exit}')
Review Comment:
Fixed in `5972a6f5`. The smoke helper resolves one executable up front,
prefers `$JAVA_HOME/bin/java`, verifies it is executable, and reuses it for
version, properties, and the RocksDB process. On the native RISC-V host, bare
`java` remained Bianbu JDK 21 while `JAVA_HOME` selected Dragonwell 11; the
helper reported and tested Dragonwell 11 successfully. Current-head RISC-V
runtime/native CI also passed in org run `29927481339`.
##########
hugegraph-server/hugegraph-dist/src/assembly/travis/run-server-e2e-smoke-test.sh:
##########
@@ -0,0 +1,183 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+set -euo pipefail
+
+if [[ $# -ne 3 || ( "$2" != "create" && "$2" != "verify" ) ]]; then
+ echo "USAGE: $0 SERVER_URL create|verify RUN_ID" >&2
+ exit 1
+fi
+
+SERVER_URL=${1%/}
+MODE=$2
+RUN_ID=$3
+
+if [[ ! "$RUN_ID" =~ ^[a-zA-Z0-9_]+$ ]]; then
+ echo "RUN_ID must contain only letters, numbers, and underscores" >&2
+ exit 1
+fi
+
+GRAPH_PATH=/graphspaces/DEFAULT/graphs/hugegraph
+WORK_DIR=$(mktemp -d "${TMPDIR:-/tmp}/hugegraph-server-smoke.XXXXXX")
+RESPONSE_FILE="$WORK_DIR/response.json"
+PROPERTY_KEY="riscv_smoke_name_$RUN_ID"
+VERTEX_LABEL="riscv_smoke_node_$RUN_ID"
+EDGE_LABEL="riscv_smoke_link_$RUN_ID"
+VERTEX_ONE="riscv-smoke-v1-$RUN_ID"
+VERTEX_TWO="riscv-smoke-v2-$RUN_ID"
+
+cleanup() {
+ rm -rf "$WORK_DIR"
+}
+trap cleanup EXIT
+
+for command in curl jq; do
+ if ! command -v "$command" >/dev/null 2>&1; then
+ echo "Required command is unavailable: $command" >&2
+ exit 1
+ fi
+done
+
+if [[ -n "${HUGEGRAPH_USERNAME:-}" || -n "${HUGEGRAPH_PASSWORD:-}" ]]; then
+ if [[ -z "${HUGEGRAPH_USERNAME:-}" || -z "${HUGEGRAPH_PASSWORD:-}" ]]; then
+ echo "Set both HUGEGRAPH_USERNAME and HUGEGRAPH_PASSWORD" >&2
+ exit 1
+ fi
+fi
+
+curl_request() {
+ if [[ -n "${HUGEGRAPH_USERNAME:-}" ]]; then
+ curl --compressed --user "$HUGEGRAPH_USERNAME:$HUGEGRAPH_PASSWORD" "$@"
+ else
+ curl --compressed "$@"
+ fi
+}
+
+wait_for_server() {
+ local attempt
+ for attempt in $(seq 1 240); do
+ if curl_request --silent --show-error --fail \
Review Comment:
Fixed in `5972a6f5`. Readiness probes now use a 3-second connect timeout,
5-second total timeout, and a 240-second absolute deadline. Normal requests use
the same connect bound with a 60-second total timeout. The outer Docker
readiness probe has equivalent per-request and absolute bounds. Current-head
amd64, arm64, and riscv64 runtime smoke jobs all passed in org run
`29927481339`.
##########
hugegraph-server/hugegraph-dist/src/assembly/travis/run-api-test.sh:
##########
@@ -58,18 +58,60 @@ function download_to_dir() {
cd "$REPO_ROOT"
-VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
+ROCKSDB_ONLY=false
+
+if [[ "$BACKEND" == "rocksdb" &&
+ "$(uname -s)" == "Linux" &&
+ "$(uname -m)" == "riscv64" ]]; then
+ . "$TRAVIS_DIR/../static/bin/util.sh"
+ configure_riscv64_libatomic
+ ROCKSDB_ONLY=true
+fi
+
+if [[ "$ROCKSDB_ONLY" == "true" ]]; then
+ VERSION=$(mvn help:evaluate -Dexpression=project.version -q \
+ -DforceStdout -Drocksdb-only)
+else
+ VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
+fi
SERVER_DIR=hugegraph-server/apache-hugegraph-server-$VERSION/
CONF=$SERVER_DIR/conf/graphs/hugegraph.properties
REST_SERVER_CONF=$SERVER_DIR/conf/rest-server.properties
GREMLIN_SERVER_CONF=$SERVER_DIR/conf/gremlin-server.yaml
JACOCO_PORT=36320
+SERVER_START_ATTEMPTED=false
+
+function cleanup() {
+ local status=$?
+ trap - EXIT
+
+ if [[ "$SERVER_START_ATTEMPTED" == "true" ]]; then
+ if ! "$TRAVIS_DIR"/stop-server.sh "$SERVER_DIR"; then
Review Comment:
Fixed in `3e6f4d8d`. `stop-hugegraph.sh` now exits 1 when
`kill_process_and_wait` fails and removes the PID file only after a successful
shutdown, so `stop-server.sh` and the EXIT cleanup receive the real status. A
real timeout check with a SIGTERM-ignoring process returned 1 and retained the
PID file; the normal path returned 0, stopped the process, and removed the PID
file. On the current head, Linux RocksDB/memory API jobs, both macOS jobs, and
the full runtime matrix have passed in org CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]