Skip to content

Commit d623f6b

Browse files
committed
fix for catalog config
1 parent 6548829 commit d623f6b

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

polaris-core/src/main/java/org/apache/polaris/core/config/BehaviorChangeConfiguration.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222

2323
/**
2424
* Internal configuration flags for non-feature behavior changes in Polaris. These flags control
25-
* subtle behavior adjustments and bug fixes, not user-facing catalog settings. They are intended
26-
* for internal use only, are inherently unstable, and may be removed at any time. When introducing
27-
* a new flag, consider the trade-off between maintenance burden and the risk of an unguarded
28-
* behavior change. Flags here are generally short-lived and should either be removed or promoted to
29-
* stable feature flags before the next release.
25+
* subtle behavior adjustments and bug fixes, not user-facing settings. They are intended for
26+
* internal use only, are inherently unstable, and may be removed at any time. When introducing a
27+
* new flag, consider the trade-off between maintenance burden and the risk of an unguarded behavior
28+
* change. Flags here are generally short-lived and should either be removed or promoted to stable
29+
* feature flags before the next release.
3030
*
3131
* @param <T> The type of the configuration
3232
*/
@@ -80,8 +80,8 @@ protected BehaviorChangeConfiguration(
8080
.key("ALLOW_NAMESPACE_CUSTOM_LOCATION")
8181
.catalogConfig("polaris.config.namespace-custom-location.enabled")
8282
.description(
83-
"If set to true, allow namespaces with completely arbitrary locations. This should not affect" +
84-
" credential vending.")
83+
"If set to true, allow namespaces with completely arbitrary locations. This should not affect"
84+
+ " credential vending.")
8585
.defaultValue(false)
8686
.buildBehaviorChangeConfiguration();
8787
}

polaris-core/src/main/java/org/apache/polaris/core/config/PolarisConfiguration.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,6 @@ public FeatureConfiguration<T> buildFeatureConfiguration() {
209209

210210
public BehaviorChangeConfiguration<T> buildBehaviorChangeConfiguration() {
211211
validateOrThrow();
212-
if (catalogConfig.isPresent() || catalogConfigUnsafe.isPresent()) {
213-
throw new IllegalArgumentException(
214-
"catalog configs are not valid for behavior change configs");
215-
}
216212
BehaviorChangeConfiguration<T> config =
217213
new BehaviorChangeConfiguration<>(
218214
key, description, defaultValue, catalogConfig, catalogConfigUnsafe);

runtime/service/src/main/java/org/apache/polaris/service/catalog/iceberg/IcebergCatalog.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,9 @@ public boolean setProperties(Namespace namespace, Map<String, String> properties
677677
}
678678
if (!realmConfig.getConfig(
679679
BehaviorChangeConfiguration.ALLOW_NAMESPACE_CUSTOM_LOCATION, catalogEntity)) {
680-
validateNamespaceLocation(NamespaceEntity.of(entity), resolvedEntities);
680+
if (properties.containsKey(PolarisEntityConstants.ENTITY_BASE_LOCATION)) {
681+
validateNamespaceLocation(NamespaceEntity.of(entity), resolvedEntities);
682+
}
681683
}
682684

683685
List<PolarisEntity> parentPath = resolvedEntities.getRawFullPath();

0 commit comments

Comments
 (0)