-
Notifications
You must be signed in to change notification settings - Fork 332
Remove PolarisConfiguration.loadConfig (v2) #1858
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
adutra
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.
Changes LGTM. I'd note that PolarisConfiguration.loadConfig has not been removed, it is still present (but unused).
| } | ||
|
|
||
| /** Validate the number of allowed locations not exceeding the max value. */ | ||
| private void validateMaxAllowedLocations(Collection<String> allowedLocations) { |
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.
Don't we need this validation anymore? Or is it being done elsewhere?
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 is a temporary BehaviorChangeConfiguration (the default is no validation) so I thought this might be a good time to remove it. but if you think we'd better separate out that change, I can try to re-add the check. Unfortunately, there's not a great narrow waist for adding a PolarisCallContext to an entity.
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.
Ah right, it's a BehaviorChangeConfiguration. OK to remove this validation then.
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 undid the change for now and piped a CallContext in, we can always remove it separately. Thanks for flagging this
...ris-core/src/test/java/org/apache/polaris/core/storage/cache/StorageCredentialCacheTest.java
Outdated
Show resolved
Hide resolved
polaris-core/src/test/java/org/apache/polaris/core/storage/BaseStorageIntegrationTest.java
Outdated
Show resolved
Hide resolved
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.
Thanks for reducing the use of thread locals, @eric-maynard ! 👍
This PR LGTM overall, just some minor comments.
...kus/service/src/test/java/org/apache/polaris/service/quarkus/catalog/IcebergCatalogTest.java
Outdated
Show resolved
Hide resolved
(cherry picked from commit 8942f68)
* main: Update dependency io.projectreactor.netty:reactor-netty-http to v1.2.7 (apache#1845) * docs: fix broken 'Polaris Overview' link in README.md (apache#1846) docs: fix broken 'Polaris Overview' link in README.md Co-authored-by: Joy Haldar <Joy.Haldar@target.com> * Update spark client license (apache#1839) * Update LICENCE (apache#1851) * Add Yun Zou as the new committer Co-authored-by: Yufei Gu <yufei.apache.org> * main: Update docker.io/jaegertracing/all-in-one Docker tag to v1.70.0 (apache#1853) * main: Update dependency io.opentelemetry.semconv:opentelemetry-semconv to v1.34.0 (apache#1850) * main: Update dependency boto3 to v1.38.34 (apache#1852) * main: Update dependency org.postgresql:postgresql to v42.7.7 (apache#1859) * [SPEC] Add base-location keyword for GenericTable API (apache#1543) * Update LICENSE for binary distributions (apache#1855) * Add integration tests to Python Client (apache#1856) * Update JDBC Getting-started example's README.md to use localhost for curl commands (apache#1872) * Remove PolarisConfiguration.loadConfig (v2) (apache#1858) * Enhance EclipseLink quickstart (apache#1870) 1. Update the name catalog name used to `quickstart_catalog` from `polaris` to make it consistent 2. Update the name of `eclipselink-trino-1` to `polaris-trino-1` 3. make the polaris server url consistent with using `localhost` to avoid failures * Remove generated Python client from git tracking (apache#1810) After apache#1675, we now generate the Python client on-demand when it's needed by tests or the CLI. With this, we can safely remove the Python client from being tracked in the repo and add its files to .gitignore * Fix telemetry quickstart example for 1.0 release (apache#1873) * main: Update gradle/actions digest to ac638b0 (apache#1877) * main: Update dependency boto3 to v1.38.35 (apache#1874) * Removing star import and adding errorprone rule (apache#1831) Fixes apache#1100 * NoSQL: merge related changes * Last merged commit 0faf948 --------- Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Joy Haldar <joyno.23@gmail.com> Co-authored-by: Joy Haldar <Joy.Haldar@target.com> Co-authored-by: gh-yzou <167037035+gh-yzou@users.noreply.github.com> Co-authored-by: Yufei Gu <yufei@apache.org> Co-authored-by: Yun Zou <yunzou.colostate@gmail.com> Co-authored-by: Honah (Jonas) J. <honahx@apache.org> Co-authored-by: Eric Maynard <eric.maynard+oss@snowflake.com> Co-authored-by: William Hyun <william@apache.org> Co-authored-by: gfakbar20 <gfakbar20@gmail.com>
PolarisConfiguration.loadConfigrelies onCallContext.getCurrentContextwhich may not be apparent to callers and often will not work. If the CallContext ThreadLocal hasn't been appropriately set in the calling thread, this method will return invalid results.This PR proposed to remove the problematic method as part of a series of changes to reduce or remove the usage of ThreadLocal throughout Polaris. This is a rewrite of #1356 now that we have a more CDI-oriented
PolarisConfigurationStoreand an integration betweenCallContextandPolarisCallContext.