dimas-b commented on code in PR #3340:
URL: https://github.com/apache/polaris/pull/3340#discussion_r2670211438
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ProductionReadinessChecks.java:
##########
@@ -75,6 +76,10 @@ public void warnOnFailedChecks(
@Observes Startup event,
Instance<ProductionReadinessCheck> checks,
ReadinessConfiguration config) {
+ // Skip production readiness checks in CLI mode - they're only relevant
for server deployments
+ if (ConfigUtils.isProfileActive("cli")) {
Review Comment:
This is probably ok in the interest of progress, but in general I hope we
could leverage profile-specific config like
`polaris.production.readiness.checks.enabled=true` (or `false` for CLI). WDYT?
##########
runtime/distribution/bin/admin:
##########
@@ -21,12 +21,16 @@ set -euo pipefail
# Get the directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-cd "$SCRIPT_DIR/../admin"
+cd "$SCRIPT_DIR/../server"
# Get the Java command
JAVA_CMD="${JAVA_HOME:+${JAVA_HOME%/}/bin/java}"
JAVA_CMD="${JAVA_CMD:-$(command -v java)}"
[ -x "$JAVA_CMD" ] || { echo "Java not found – set JAVA_HOME or add java to
PATH." >&2; exit 1; }
-# Launch Quarkus
-exec "$JAVA_CMD" ${POLARIS_JAVA_OPTS:-} -jar quarkus-run.jar "$@"
+# Show the usage when no argument is provided
+if [ "$#" -eq 0 ]; then
+ set -- -h
Review Comment:
nit: `--help`?
##########
runtime/service/src/main/java/org/apache/polaris/service/config/ServiceProducers.java:
##########
@@ -274,6 +275,9 @@ public void maybeBootstrap(
MetaStoreManagerFactory factory,
PersistenceConfiguration config,
RealmContextConfiguration realmContextConfiguration) {
+ if (ConfigUtils.isProfileActive("cli")) {
Review Comment:
Same here: I'd prefer to use explicit config flags (set differently in each
profile) vs. checking the name of the profile, please.
##########
runtime/distribution/bin/admin:
##########
@@ -21,12 +21,16 @@ set -euo pipefail
# Get the directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-cd "$SCRIPT_DIR/../admin"
+cd "$SCRIPT_DIR/../server"
Review Comment:
for follow-up: with a single binary package, we may want to rename /
restructure the binary dist for clarity.
##########
runtime/defaults/src/main/resources/application-cli.properties:
##########
@@ -0,0 +1,42 @@
+#
+# 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.
+#
+
+# ---- CLI Profile Configuration ----
+# This file is automatically loaded when running with -Dquarkus.profile=cli
+# It contains configuration specific to the Polaris Admin CLI commands
+#
+# WARNING: Only RUNTIME configuration properties are allowed in this profile
file!
+# Build-time properties (those marked as "fixed at build-time" in Quarkus
docs) MUST be
+# defined in the base application.properties file. Profile-specific files like
this one
+# can only override runtime configuration values.
+#
+# Setting build-time properties here will have NO EFFECT since the profile is
activated
+# after the application has already been built. Build-time properties are
baked into the
+# application during the build phase and cannot be changed at runtime.
+#
+# See: https://quarkus.io/guides/config-reference#build-time-configuration
+
+# Application identity
+quarkus.application.name=Apache Polaris Admin Tool (incubating)
+quarkus.banner.enabled=false
+
+# Logging configuration - suppress verbose output for CLI
+quarkus.log.level=WARN
Review Comment:
Should we suppress CONSOLE log instead but keep default levels informative
in case a user enabled FILE logging?
--
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]