snazy commented on code in PR #2233: URL: https://github.com/apache/polaris/pull/2233#discussion_r2250723965
########## runtime/service/src/main/java/org/apache/polaris/service/task/TaskExecutorImpl.java: ########## @@ -36,13 +44,15 @@ import org.apache.polaris.service.events.AfterTaskAttemptedEvent; import org.apache.polaris.service.events.BeforeTaskAttemptedEvent; import org.apache.polaris.service.events.PolarisEventListener; +import org.apache.polaris.service.tracing.TracingFilter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Given a list of registered {@link TaskHandler}s, execute tasks asynchronously with the provided * {@link CallContext}. */ +@ApplicationScoped public class TaskExecutorImpl implements TaskExecutor { Review Comment: ```suggestion class TaskExecutorImpl implements TaskExecutor { ``` Probably similar for other implementations. If it works, the constructors can be package-private as well. ########## runtime/service/src/main/java/org/apache/polaris/service/config/RawBehaviorChangesConfiguration.java: ########## @@ -0,0 +1,24 @@ +/* + * 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.service.config; + +import io.smallrye.config.ConfigMapping; + +@ConfigMapping(prefix = "polaris.behavior-changes") Review Comment: Why not have this on the base interface? ########## runtime/service/src/main/java/org/apache/polaris/service/config/JacksonConfig.java: ########## @@ -31,20 +31,19 @@ import jakarta.inject.Inject; import jakarta.inject.Singleton; import org.apache.iceberg.rest.RESTSerializers; -import org.apache.polaris.service.config.Serializers; import org.eclipse.microprofile.config.inject.ConfigProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @Singleton -public class QuarkusJacksonConfig implements ObjectMapperCustomizer { +public class JacksonConfig implements ObjectMapperCustomizer { Review Comment: Nomenclature: ```suggestion public class PolarisIcebergObjectMapperCustomizer implements ObjectMapperCustomizer { ``` ... because this configures the global `ObjectMapper` specific to Iceberg + inherited Polaris specifics. ########## runtime/service/src/main/java/org/apache/polaris/service/legacy/LegacyManagementEndpoints.java: ########## @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.apache.polaris.service.quarkus.legacy; +package org.apache.polaris.service.legacy; Review Comment: Unrelated to this PR: I suspect we can remove this one for the next release. ########## runtime/service/src/test/java/org/apache/polaris/service/exception/ExceptionMapperTest.java: ########## @@ -48,6 +48,7 @@ public class ExceptionMapperTest { public void testFullExceptionIsLogged( ExceptionMapper<Exception> mapper, Exception exception, Level level) { Logger logger = (Logger) LoggerFactory.getLogger(mapper.getClass()); + logger.setLevel(level); Review Comment: Huh? What's the reason for adding this? ########## runtime/service/src/main/java/org/apache/polaris/service/task/TaskExecutorImpl.java: ########## @@ -52,18 +62,28 @@ public class TaskExecutorImpl implements TaskExecutor { private final TaskFileIOSupplier fileIOSupplier; private final List<TaskHandler> taskHandlers = new CopyOnWriteArrayList<>(); private final PolarisEventListener polarisEventListener; + private final Tracer tracer; Review Comment: I'd prefer to make this a ```suggestion private final Optional<Tracer> tracer; ``` I'm a bit cautious when using otel code, been bitten hard w/ static initializers in the past, although the particular test doesn't seem to harm. ########## runtime/service/src/main/java/org/apache/polaris/service/config/RawFeaturesConfiguration.java: ########## @@ -0,0 +1,24 @@ +/* + * 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.service.config; + +import io.smallrye.config.ConfigMapping; + +@ConfigMapping(prefix = "polaris.features") Review Comment: Why not have this on the base interface? ########## runtime/service/src/main/java/org/apache/polaris/service/config/BehaviorChangesConfiguration.java: ########## @@ -0,0 +1,27 @@ +/* + * 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.service.config; + +/** + * FIXME: this seems unused. Review Comment: Maybe remove? ########## runtime/service/src/test/java/org/apache/polaris/service/auth/external/PrincipalAuthInfoAugmentorTest.java: ########## @@ -32,39 +32,38 @@ import java.util.Optional; import java.util.OptionalLong; import java.util.Set; -import org.apache.polaris.service.quarkus.auth.external.OidcTenantConfiguration.PrincipalMapper; -import org.apache.polaris.service.quarkus.auth.external.OidcTenantConfiguration.PrincipalRolesMapper; -import org.apache.polaris.service.quarkus.auth.external.PrincipalAuthInfoAugmentor.OidcPrincipalAuthInfo; +import org.apache.polaris.service.auth.external.OidcTenantConfiguration.PrincipalMapper; +import org.apache.polaris.service.auth.external.OidcTenantConfiguration.PrincipalRolesMapper; +import org.apache.polaris.service.auth.external.PrincipalAuthInfoAugmentor.OidcPrincipalAuthInfo; import org.eclipse.microprofile.jwt.JsonWebToken; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; class PrincipalAuthInfoAugmentorTest { private PrincipalAuthInfoAugmentor augmentor; - private org.apache.polaris.service.quarkus.auth.external.mapping.PrincipalMapper principalMapper; - private org.apache.polaris.service.quarkus.auth.external.mapping.PrincipalRolesMapper + private org.apache.polaris.service.auth.external.mapping.PrincipalMapper principalMapper; + private org.apache.polaris.service.auth.external.mapping.PrincipalRolesMapper Review Comment: Do we still need the fully qualified types here? -- 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: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org