Copilot commented on code in PR #151:
URL:
https://github.com/apache/gravitino-playground/pull/151#discussion_r2638511983
##########
init/gravitino/init.sh:
##########
@@ -27,6 +27,29 @@ cp
/root/gravitino/catalogs/jdbc-mysql/libs/mysql-connector-java-8.0.27.jar /roo
cp /tmp/gravitino/gravitino.conf /root/gravitino/conf
+# If auth is enabled, remove the PassThroughAuthorizer configuration
+if [ "${GRAVITINO_AUTH_ENABLE}" == "true" ]; then
+ echo "Auth is enabled, removing PassThroughAuthorizer configuration..."
+ sed -i '/gravitino.authorization.impl =
org.apache.gravitino.server.authorization.PassThroughAuthorizer/d'
/root/gravitino/conf/gravitino.conf
+fi
+
+# Ensure jq is installed; install quietly if missing
+if ! command -v jq >/dev/null 2>&1; then
+ apt-get update -qq && apt-get install -y -qq jq || { echo "Failed to install
jq" >&2; exit 1; }
+fi
+
+# Ensure host command is installed; install quietly if missing
+if ! command -v host >/dev/null 2>&1; then
+ apt-get update -qq && apt-get install -y -qq host || { echo "Failed to
install host package" >&2; exit 1; }
Review Comment:
The package name "host" is incorrect for installing the host command. On
Debian/Ubuntu systems (which the gravitino container appears to use based on
apt-get), the host command is provided by the "bind9-host" or "dnsutils"
package, not a package called "host". This installation command will likely
fail. Consider changing to "bind9-host" or "dnsutils".
```suggestion
apt-get update -qq && apt-get install -y -qq dnsutils || { echo "Failed to
install host command dependencies" >&2; exit 1; }
```
--
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]