-
Notifications
You must be signed in to change notification settings - Fork 333
Merge polaris-service-common into polaris-runtime-service #2233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1c8e65b to
6f80149
Compare
|
The failing test does not fail to me locally: EDIT: not failing anymore 😆 🤷♂️ |
86c44ca to
fe0dc19
Compare
dimas-b
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, but I did not check every single file 😅
fe0dc19 to
c8adf89
Compare
Failing again :-( The error is: IOW, the token expires 311 milliseconds before the lowest bound. I think this test is probably flaky: If a GC pause happens between the token issuance and the call to |
I hope you didn't ! 😆 |
|
FYI: the flaky test should be fixed by #2241. |
c8adf89 to
a8529e2
Compare
| * {@link CallContext}. | ||
| */ | ||
| @ApplicationScoped | ||
| public class TaskExecutorImpl implements TaskExecutor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| public class TaskExecutorImpl implements TaskExecutor { | |
| class TaskExecutorImpl implements TaskExecutor { |
Probably similar for other implementations.
If it works, the constructors can be package-private as well.
| package org.apache.polaris.service.config; | ||
|
|
||
| /** | ||
| * FIXME: this seems unused. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I added this FIXME because I'm truly puzzled by this class. @eric-maynard what is this used for?
...service/src/main/java/org/apache/polaris/service/config/RawBehaviorChangesConfiguration.java
Show resolved
Hide resolved
runtime/service/src/main/java/org/apache/polaris/service/config/RawFeaturesConfiguration.java
Show resolved
Hide resolved
runtime/service/src/main/java/org/apache/polaris/service/config/JacksonConfig.java
Outdated
Show resolved
Hide resolved
| * under the License. | ||
| */ | ||
| package org.apache.polaris.service.quarkus.legacy; | ||
| package org.apache.polaris.service.legacy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated to this PR:
I suspect we can remove this one for the next release.
| private final TaskFileIOSupplier fileIOSupplier; | ||
| private final List<TaskHandler> taskHandlers = new CopyOnWriteArrayList<>(); | ||
| private final PolarisEventListener polarisEventListener; | ||
| private final Tracer tracer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to make this a
| private final Tracer tracer; | |
| 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But how would I inject this, Instance<Tracer>? I'm not sure that's better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm,
Instance.select().stream().findFirst() seems to be the only way...
...e/src/test/java/org/apache/polaris/service/auth/external/PrincipalAuthInfoAugmentorTest.java
Show resolved
Hide resolved
| public void testFullExceptionIsLogged( | ||
| ExceptionMapper<Exception> mapper, Exception exception, Level level) { | ||
| Logger logger = (Logger) LoggerFactory.getLogger(mapper.getClass()); | ||
| logger.setLevel(level); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh? What's the reason for adding this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is brittle because it assumes that the logger has the tested level enabled, but this is not the case anymore.
Anyways, this test is not very Quarkus-friendly. I will refactor it later.
990ac90 to
284b7d1
Compare
e7f0d2e to
c4cc8aa
Compare
snazy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
c4cc8aa to
55e6766
Compare
55e6766 to
bbf30e4
Compare
bbf30e4 to
4edd5dc
Compare
|
Hi, since this PR is generating constant rebase conflicts with other ongoing PRs, I'm going to go ahead and merge it. I hope that's ok for everybody. 🙏 |
* feat: Add `endpointInternal` to `AwsStorageConfigInfo` (apache#2213) * feat: Add `endpointInternal` to `AwsStorageConfigInfo` This API change is backward compatible with older clients and server using old storage configuration. * The `endpointInternal` allows Polaris Servers to use a different host name (or IP address) for accessing S3 storage than clients. This is not a common use case, but may be relevant is more complex environments. * If not set `endpointInternal` defaults to `endpoint`. * The STS endpoint default changes to `endpointInternal`. Contributes to apache#1530 * Fix deprecated Quarkus log properties (apache#2216) see https://github.com/quarkusio/quarkus/wiki/Migration-Guide-3.19#other-changes-gear-white_check_mark CI Quarkus tests were logging this repeatedly: ``` The "quarkus.log.file.json" config property is deprecated and should not be used anymore. The "quarkus.log.console.json" config property is deprecated and should not be used anymore. The "quarkus.log.file.json" config property is deprecated and should not be used anymore. The "quarkus.log.console.json" config property is deprecated and should not be used anymore. ``` * chore(deps): update dependency mypy to >=1.17, <=1.17.1 (apache#2218) * fix(deps): update dependency boto3 to v1.40.1 (apache#2240) * fix(deps): update dependency com.azure:azure-sdk-bom to v1.2.37 (apache#2242) * JDBC: Log SQL statements at debug level (apache#2221) * Add ResolutionManifestFactory (apache#2210) after 95358a9 very little functionality was left in `PolarisEntityManager`. by splitting out the more dedicated `ResolutionManifestFactory` we can remove `PolarisEntityManager` and `RealmEntityManagerFactory` completely it seems. * Prepare upgrade to Gradle 9 (apache#2237) * `shadowPub.kt` the change removes a special case that doesn't apply to Polaris * `api/...` build scripts - changes due to nullable type handling (`Property<String>` vs `Property<String?>` - latter is ... weird) * fix(deps): update dependency software.amazon.awssdk:bom to v2.32.14 (apache#2246) * Replace TestPolarisMetaStoreManager with Mockito.spy (apache#2230) this takes less code and is more flexible in the future * Remove obsolete information from README-quarkus.md (apache#2252) * fix(deps): update dependency boto3 to v1.40.2 (apache#2256) * fix(deps): update dependency com.gradleup.shadow:shadow-gradle-plugin to v8.3.9 (apache#2260) * fix(deps): update immutables to v2.11.2 (apache#2257) * Only pass `RealmConfig` to `PolarisStorageIntegration` (apache#2234) All `PolarisStorageIntegration` requite only the `RealmConfig`, not the whole `CallContext`. This makes it easier for the new tasks impleemntations (both proposals). * QuarkusProducers: remove unneeded `BasePersistence` producer (apache#2255) * Use application-scope clock when generating GCP credentials (apache#2241) This change also fixes a flaky test: `StorageConfigurationTest.testCreateGcpCredentialsFromStaticToken` * chore(deps): update plugin jetbrains-changelog to v2.4.0 (apache#2264) * chore(deps): update gradle/actions digest to 017a9ef (apache#2265) * Remove config parameter from `PolarisStorageIntegration#getSubscopedCreds` (apache#2235) Instances of `PolarisStorageIntegration` are created for a particular `PolarisStorageConfigurationInfo`, the same value is then passed into `PSI.getSubscopedCreds()`. This change removes the config parameter, as it's already known when `PolarisStorageIntegration` instances are created. * chore(deps): update registry.access.redhat.com/ubi9/openjdk-21-runtime docker tag to v1.22-1.1753981256 (apache#2266) * Make `*StorageConfigurationInfo` types immutable (apache#2236) This change eventually enables usage of the `*StorageConfigurationInfo` in the `StorageCredentialCacheKey` due to the then memoized hash-code values, to eliminate a couple of JSON re-serializations. * JDBC: SERIALIZABLE/EntityNotFoundException (apache#2219) With serializable isolation level, if either the primary-key or the check-constraint are violated, the lookup of the conflicting entity is not guaranteed to yield a non-null result (transaction start matters). This changes works around this situation w/ serializable isolation. * Merge polaris-service-common into polaris-runtime-service (apache#2233) * JdbcMetaStoreManagerFactory determines schemaVersion once per realm (apache#2217) otherwise every call to `MetaStoreManagerFactory.getOrCreateSession` was running the query. * Last merged commit af69d9f --------- Co-authored-by: Dmitri Bourlatchkov <dmitri.bourlatchkov@gmail.com> Co-authored-by: Christopher Lambert <xn137@gmx.de> Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Alexandre Dutra <adutra@apache.org>
As discussed in the ML here is a PR that merges polaris-service-common into polaris-runtime-service.
99% of the changes are file moves or renamings:
Commits can be reviewed independently.
Only the 3rd one contains changes of interest.
For example, all classes like
QuarkusXYZConfigurationwere merged intoXYZConfigurationif such class exists, rather than renamed.One particular interface was problematic:
FeaturesConfigurationand its subtypeResolvedFeaturesConfiguration. The merger resulted in a cyclic reference when resolving CDI beans. The same issue also happened withBehaviorChangesConfigurationandResolvedBehaviorChangesConfiguration.To solve both cyclic reference issues, I created the following hierarchy:
BTW @eric-maynard what is
BehaviorChangesConfigurationused for? It seems unused.Also: I renamed
QuarkusProducersin both modules that had such class. They became:ServiceProducersandAdminToolProducers. I also renamedQuarkusSparkITtoSparkIT.