VGalaxies commented on code in PR #3040: URL: https://github.com/apache/hugegraph/pull/3040#discussion_r3371305122
########## hugegraph-server/hugegraph-dist/src/assembly/travis/run-gremlin-console-smoke-test.sh: ########## @@ -0,0 +1,55 @@ +#!/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 + +SERVER_DIR=${1:?Usage: run-gremlin-console-smoke-test.sh <server-dir>} +SMOKE_MARKER="gremlin-console-smoke-ok" + +if [ ! -d "$SERVER_DIR" ]; then + echo "Server directory does not exist: $SERVER_DIR" + exit 1 +fi + +if [ ! -x "$SERVER_DIR/bin/gremlin-console.sh" ]; then + echo "Gremlin Console script is not executable: $SERVER_DIR/bin/gremlin-console.sh" + exit 1 +fi + +TMP_DIR=${TMPDIR:-/tmp} +SMOKE_SCRIPT=$(mktemp "${TMP_DIR}/hugegraph-gremlin-console-smoke.XXXXXX.groovy") Review Comment: major `hugegraph-server/hugegraph-dist/src/assembly/travis/run-gremlin-console-smoke-test.sh:34` - Non-portable `mktemp` template breaks macOS smoke test Evidence: `.github/workflows/server-ci.yml:166` runs this script on `macos-15` and `macos-15-intel`, but lines 34-35 use templates ending in `.groovy`/`.log` after `XXXXXX`. macOS `mktemp(1)` documents replacing only appended/trailing `X`s: https://keith.github.io/xcode-man-pages/mktemp.1.html Impact: The new macOS CI smoke-test step can fail before Gremlin Console is launched, making the PR introduce unreliable CI coverage. Requested fix: Use a portable trailing-`X` template, for example create a temp directory with `mktemp -d "${TMPDIR:-/tmp}/hugegraph-gremlin-console-smoke.XXXXXX"` and place `smoke.groovy` / `smoke.log` inside it, or omit the file extensions from the `mktemp` templates. -- 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]
