You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@polaris.apache.org by "dimas-b (via GitHub)" <gi...@apache.org> on 2026/08/11 21:18:26 UTC
[PR] Remove "default base location" arg from `CatalogEntity.setStorageConfigurationInfo()` [polaris]
dimas-b opened a new pull request, #5276:
URL: https://github.com/apache/polaris/pull/5276
* The old `defaultBaseLocation` argument of the "set" method was NOT actually used to set the default base location in the Catalog object builder.
* The old `defaultBaseLocation` argument was used for validation, but nothing guaranteed that the caller passed in the right value.
* Remove the `defaultBaseLocation` argument
* Get the default base location value from current `properties` (which is the source of truth for this value).
* Note: most callers on this builder method already set the default base location before invoking `setStorageConfigurationInfo()`
* Keep the exception if `setStorageConfigurationInfo()` is invoked without first setting the default base location.
<!--
๐ Describe what changes you're proposing, especially breaking or user-facing changes.
๐ See https://github.com/apache/polaris/blob/main/CONTRIBUTING.md for more.
-->
## Checklist
- [ ] ๐ก๏ธ Don't disclose security issues! (contact security@apache.org)
- [ ] ๐ Clearly explained why the changes are needed, or linked related issues: Fixes #
- [ ] ๐งช Added/updated tests with good coverage, or manually tested (and explained how)
- [ ] ๐ก Added comments for complex logic
- [ ] ๐งพ Updated `CHANGELOG.md` (if needed)
- [ ] ๐ Updated documentation in `site/content/in-dev/unreleased` (if needed)
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove "default base location" arg from `CatalogEntity.setStorageConfigurationInfo()` [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5276:
URL: https://github.com/apache/polaris/pull/5276#discussion_r3779822857
##########
polaris-core/src/main/java/org/apache/polaris/core/entity/CatalogEntity.java:
##########
@@ -324,8 +323,9 @@ private void validateDefaultBaseLocation() {
}
public Builder setStorageConfigurationInfo(
- RealmConfig realmConfig, StorageConfigInfo storageConfigModel, String defaultBaseLocation) {
+ RealmConfig realmConfig, StorageConfigInfo storageConfigModel) {
if (storageConfigModel != null) {
+ String defaultBaseLocation = properties.get(DEFAULT_BASE_LOCATION_KEY);
Review Comment:
Good point. Will update.
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove "default base location" arg from `CatalogEntity.setStorageConfigurationInfo()` [polaris]
Posted by "flyingImer (via GitHub)" <gi...@apache.org>.
flyingImer commented on code in PR #5276:
URL: https://github.com/apache/polaris/pull/5276#discussion_r3779150735
##########
polaris-core/src/main/java/org/apache/polaris/core/entity/CatalogEntity.java:
##########
@@ -324,8 +323,9 @@ private void validateDefaultBaseLocation() {
}
public Builder setStorageConfigurationInfo(
- RealmConfig realmConfig, StorageConfigInfo storageConfigModel, String defaultBaseLocation) {
+ RealmConfig realmConfig, StorageConfigInfo storageConfigModel) {
if (storageConfigModel != null) {
+ String defaultBaseLocation = properties.get(DEFAULT_BASE_LOCATION_KEY);
Review Comment:
This makes the setter read mutable builder state, so the builder is order-sensitive now: call setStorageConfigurationInfo before setDefaultBaseLocation and it throws "Must specify default base location" even though the caller does set it.
Would it make sense to assemble the storage config in build() too?
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove "default base location" arg from `CatalogEntity.setStorageConfigurationInfo()` [polaris]
Posted by "adutra (via GitHub)" <gi...@apache.org>.
adutra merged PR #5276:
URL: https://github.com/apache/polaris/pull/5276
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove "default base location" arg from `CatalogEntity.setStorageConfigurationInfo()` [polaris]
Posted by "dimas-b (via GitHub)" <gi...@apache.org>.
dimas-b commented on code in PR #5276:
URL: https://github.com/apache/polaris/pull/5276#discussion_r3779877688
##########
polaris-core/src/main/java/org/apache/polaris/core/entity/CatalogEntity.java:
##########
@@ -324,8 +323,9 @@ private void validateDefaultBaseLocation() {
}
public Builder setStorageConfigurationInfo(
- RealmConfig realmConfig, StorageConfigInfo storageConfigModel, String defaultBaseLocation) {
+ RealmConfig realmConfig, StorageConfigInfo storageConfigModel) {
if (storageConfigModel != null) {
+ String defaultBaseLocation = properties.get(DEFAULT_BASE_LOCATION_KEY);
Review Comment:
done
--
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-unsubscribe@polaris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org