Skip to content

Conversation

@dimas-b
Copy link
Contributor

@dimas-b dimas-b commented Jul 31, 2025

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


@JsonIgnore
@Nullable
public URI getInternalEndpointUri() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there is a minor naming inconsistency between getInternalEndpointUri and endpointInternal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, but getEndpointInternalUri() sounds awkward to me 😅 I'm open to renaming :) Let's see what other people think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the method name doesn't affect the serialized representation - so i've got no opinion here ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(although a 3rd non-native English speaker's opinion might be interesting ;) )

stsEndpoint:
type: string
description: endpoint for STS requests (optional). If not set, defaults to 'endpoint'.
description: endpoint for STS requests (optional). If not set, defaults to 'endpointInternal'.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for stsEndpoint or endpoint ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the description needs to clarify:

  • defaults to endpointInternal
  • if endpointInternal is not specified, defaults to endpoint

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

STS requests are always sent by the Polaris Server. So if stsEndpoint is not set, the server will first default to endpointInternal for STS requests, then to endpoint. I've updated the doc comment to clarify.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, my comment's about telling that our users

Comment on lines 1062 to 1068
endpoint for S3 requests made by the Polaris Server (optional). If set, Polaris Service will use
this value instead of "endpoint". If not set, defaults to 'endpoint'. Iceberg REST API clients never
see this value.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth to update the description for endpoint as well, mentioning that there's endpointInternal in case the (client) needs to use a separate value than the service.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

dimas-b added 2 commits July 31, 2025 10:38
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
@dimas-b dimas-b force-pushed the server-specific-s3-endpoint branch from 61c9470 to cacda81 Compare July 31, 2025 14:43
@github-project-automation github-project-automation bot moved this from PRs In Progress to Ready to merge in Basic Kanban Board Jul 31, 2025
Copy link
Member

@snazy snazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Just nits.


@JsonIgnore
@Nullable
public URI getInternalEndpointUri() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the method name doesn't affect the serialized representation - so i've got no opinion here ;)


@JsonIgnore
@Nullable
public URI getInternalEndpointUri() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(although a 3rd non-native English speaker's opinion might be interesting ;) )

endpoint:
type: string
description: endpoint for S3 requests (optional)
description: >-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think you don't need the >- thingy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably, but I think it's marginally cleaner and clearer 😃 based on https://yaml-multiline.info/

type: string
description: endpoint for S3 requests (optional)
description: >-
endpoint for S3 requests (optional). Clients always see this value (if it is set). Polaris Servers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit-pick

Suggested change
endpoint for S3 requests (optional). Clients always see this value (if it is set). Polaris Servers
Endpoint for S3 requests (optional). Clients always see this value (if it is set). Polaris Servers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other doc comments start with lowercase letters ;) 🤷

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well (nit-pick-alert!)...
It's a (nearly) complete sentence, so :D

type: string
description: endpoint for STS requests (optional). If not set, defaults to 'endpoint'.
description: >-
endpoint for STS requests made by the Polaris Server (optional). If not set, defaults to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit-pick

Suggested change
endpoint for STS requests made by the Polaris Server (optional). If not set, defaults to
Endpoint for STS requests made by the Polaris Server (optional). If not set, defaults to

Comment on lines +1066 to +1067
endpoint for S3 requests made by the Polaris Server (optional). If set, Polaris Service will use
this value instead of `endpoint`. If not set, defaults to `endpoint`. Iceberg REST API clients never
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit-pick

Suggested change
endpoint for S3 requests made by the Polaris Server (optional). If set, Polaris Service will use
this value instead of `endpoint`. If not set, defaults to `endpoint`. Iceberg REST API clients never
Endpoint for S3 requests made by the Polaris Server (optional). If set, Polaris Service will use
this value instead of `endpoint`. If not set, defaults to `endpoint`. Iceberg REST API clients never

@dimas-b
Copy link
Contributor Author

dimas-b commented Jul 31, 2025

If no more comments, I'll be merging on Aug 1.

@dimas-b dimas-b merged commit e439ff5 into apache:main Aug 1, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from Ready to merge to Done in Basic Kanban Board Aug 1, 2025
@dimas-b dimas-b deleted the server-specific-s3-endpoint branch August 1, 2025 13:15
@flyrain
Copy link
Contributor

flyrain commented Aug 1, 2025

As a spec change, we will need to conclude the dev ML discussion or vote before merging. I don't think there is a consensus in the discussion thread, https://lists.apache.org/thread/9nggnwp8qb12of74zwh76l2qzkos3kjc.

@dimas-b
Copy link
Contributor Author

dimas-b commented Aug 1, 2025

@flyrain : feel free to revert

snazy added a commit to snazy/polaris that referenced this pull request Nov 20, 2025
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants