flyrain commented on code in PR #3259:
URL: https://github.com/apache/polaris/pull/3259#discussion_r2616596853


##########
persistence/google-cloud-spanner/src/main/java/org/apache/polaris/persistence/spanner/GoogleCloudSpannerDatabaseClientLifecycleManager.java:
##########
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ */
+
+package org.apache.polaris.persistence.spanner;
+
+import com.google.cloud.spanner.Database;
+import com.google.cloud.spanner.DatabaseAdminClient;
+import com.google.cloud.spanner.DatabaseId;
+import com.google.cloud.spanner.Dialect;
+import com.google.cloud.spanner.Spanner;
+import jakarta.enterprise.context.ApplicationScoped;
+import jakarta.enterprise.inject.Produces;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import org.apache.polaris.core.persistence.bootstrap.SchemaOptions;
+import org.apache.polaris.persistence.spanner.util.SpannerUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@ApplicationScoped
+public class GoogleCloudSpannerDatabaseClientLifecycleManager {

Review Comment:
   Nit: Does it make sense to shorten the name a bit? I think 
`SpannerClientLifecycleManager` should be concise and descriptive enough here,
   ```suggestion
   public class SpannerClientLifecycleManager {
   ```



##########
gradle/libs.versions.toml:
##########
@@ -52,8 +52,7 @@ cel-bom = { module = "org.projectnessie.cel:cel-bom", version 
= "0.5.3" }
 commons-lang3 = { module = "org.apache.commons:commons-lang3", version = 
"3.20.0" }
 commons-text = { module = "org.apache.commons:commons-text", version = 
"1.15.0" }
 errorprone = { module = "com.google.errorprone:error_prone_core", version = 
"2.45.0" }
-google-cloud-iamcredentials = { module = 
"com.google.cloud:google-cloud-iamcredentials", version = "2.80.0" }
-google-cloud-storage-bom = { module = 
"com.google.cloud:google-cloud-storage-bom", version = "2.60.0" }
+google-cloud-libraries-bom = { module = "com.google.cloud:libraries-bom", 
version = "26.72.0" }

Review Comment:
   +1, thanks for the change, this makes the versions more consistent across 
Google Cloud components.
   
   Continuing my review of #2328: a license update is still required. I’m fine 
with addressing this in a follow-up (see the earlier discussion here: 
https://github.com/apache/polaris/pull/2328#discussion_r2270902715).
   
   Would it make sense to file a tracking issue and mark it as a 1.4 release 
blocker? That would help streamline the release manager’s workflow, since any 
outstanding license issue will cause a release RC to fail.



##########
persistence/google-cloud-spanner/src/main/java/org/apache/polaris/persistence/spanner/GoogleCloudSpannerConfiguration.java:
##########
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+package org.apache.polaris.persistence.spanner;
+
+import io.smallrye.config.ConfigMapping;
+import java.util.Optional;
+
+@ConfigMapping(prefix = "polaris.persistence.spanner")
+public interface GoogleCloudSpannerConfiguration {

Review Comment:
   Nit: same naming suggestion here
   ```suggestion
   public interface SpannerConfiguration {
   ```



##########
persistence/google-cloud-spanner/src/main/java/org/apache/polaris/persistence/spanner/GoogleCloudSpannerConfiguration.java:
##########
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+
+package org.apache.polaris.persistence.spanner;
+
+import io.smallrye.config.ConfigMapping;
+import java.util.Optional;
+
+@ConfigMapping(prefix = "polaris.persistence.spanner")
+public interface GoogleCloudSpannerConfiguration {
+
+  public Optional<String> quotaProjectId();

Review Comment:
   minor: all methods are public in an interface.
   ```suggestion
    Optional<String> quotaProjectId();
   ```



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