manuzhang commented on code in PR #14235: URL: https://github.com/apache/iceberg/pull/14235#discussion_r2422576112
########## open-api/rest-ckit-runner.sh: ########## @@ -0,0 +1,621 @@ +#!/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. +# + +# Apache Iceberg REST Compatibility Kit Test Runner +# Production-ready script for running REST catalog compatibility tests + +set -euo pipefail # Exit on error, undefined vars, pipe failures +IFS=$'\n\t' # Secure Internal Field Separator + +# Script configuration +readonly SCRIPT_NAME="$(basename "$0")" +readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +readonly LOG_FILE="${SCRIPT_DIR}/rest-ckit-runner.log" + +# Cache configuration +readonly ICEBERG_CACHE_DIR="${HOME}/.iceberg" +readonly CACHE_DIR="${ICEBERG_CACHE_DIR}/cache" +readonly CACHE_MAVEN_DIR="${ICEBERG_CACHE_DIR}/maven" + +# Default versions - can be overridden via environment variables +readonly JUNIT_VER="${JUNIT_VER:-1.13.4}" +readonly ICEBERG_VERSION="${ICEBERG_VERSION:-1.10.0}" +readonly MAVEN_WRAPPER_VERSION="${MAVEN_WRAPPER_VERSION:-3.3.4}" + +# Runtime configuration +VERBOSE=false +CLEANUP_ON_EXIT=true +JAVA_OPTS="${JAVA_OPTS:-}" +WORK_DIR="${SCRIPT_DIR}" +CLEAR_CACHE=false + +# Color codes for output +readonly RED='\033[0;31m' +readonly GREEN='\033[0;32m' +readonly YELLOW='\033[1;33m' +readonly BLUE='\033[0;34m' +readonly NC='\033[0m' # No Color + +# Logging functions +log() { + local level="$1" Review Comment: nit: we use two-space indent. -- 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]
