justinmclean commented on code in PR #5610:
URL: https://github.com/apache/gravitino/pull/5610#discussion_r1870584746


##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/Command.java:
##########
@@ -73,11 +109,22 @@ protected GravitinoClient buildClient(String metalake) 
throws NoSuchMetalakeExce
    * @return A configured {@link GravitinoAdminClient} instance.
    */
   protected GravitinoAdminClient buildAdminClient() {
+    Builder<GravitinoAdminClient> client = GravitinoAdminClient.builder(url);
+
     if (ignoreVersions) {
-      return 
GravitinoAdminClient.builder(url).withVersionCheckDisabled().build();
-    } else {
-      return GravitinoAdminClient.builder(url).build();
+      client = client.withVersionCheckDisabled();
     }
+    if (authentication != null) {
+      if (authentication.equals("simple")) {
+        if (userName != null && !userName.isEmpty()) {
+          client = client.withSimpleAuth(userName);
+        } else {
+          client = client.withSimpleAuth();
+        }
+      }

Review Comment:
   However, it would be possible be incorrect in the config file or enviroment 
variable, I'll add some output just in case.



-- 
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]

Reply via email to