Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public static void enforceFeatureEnabledOrThrow(
.defaultValue(false)
.buildFeatureConfiguration();

@SuppressWarnings("deprecation")
Copy link
Contributor

@eric-maynard eric-maynard Jun 13, 2025

Choose a reason for hiding this comment

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

This does get rid of the warnings, but aren't the warnings the main feature of the @Deprecated annotation?

ref: #1672 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

The usage of the old config key is deprecated - using that should trigger a user-facing deprecation warning. The deprecation is triggering at the wrong site then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the link I didn't know there was a previous conversation on this topic.

That said, I rather disagree: the annotation is valuable mainly for consumers of the API, and especially when it's well documented in terms of when it was deprecated, when it will be removed and how to replace it.

Here, we own both the source of the deprecation warnings (the catalogConfigUnsafe method) and the call sites where the deprecation warnings are triggered (in FeatureConfiguration class): IOW, keeping the warnings around is not useful for Polaris devs.

And there is no risk of "forgetting" to update FeatureConfiguration later on: as soon as we remove the deprecated method, the FeatureConfiguration class wouldn't compile anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

My take on this: we should rather remove deprecation from catalogConfigUnsafe() and file issues to remove support for those legacy properties. The method itself has a valid use case in Polaris code, which is specifically to support migration from old config names to new name, so the method itself is not conceptually "deprecated".

Copy link
Member

Choose a reason for hiding this comment

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

A io.smallrye.config.RelocateConfigSourceInterceptor implementation can be used to nag users to update the configs.

Copy link
Contributor

@eric-maynard eric-maynard Jun 13, 2025

Choose a reason for hiding this comment

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

There's already a log to remind users to remove the configs, so we are covered from that perspective. This was more intended to nag maintainers to remove the deprecated method at some point in time. Otherwise, why deprecate methods? Will we always add this suppression when a method is deprecated?

public static final FeatureConfiguration<Boolean> ALLOW_TABLE_LOCATION_OVERLAP =
PolarisConfiguration.<Boolean>builder()
.key("ALLOW_TABLE_LOCATION_OVERLAP")
Expand Down Expand Up @@ -118,6 +119,7 @@ public static void enforceFeatureEnabledOrThrow(
.defaultValue(false)
.buildFeatureConfiguration();

@SuppressWarnings("deprecation")
public static final FeatureConfiguration<Boolean> ALLOW_UNSTRUCTURED_TABLE_LOCATION =
PolarisConfiguration.<Boolean>builder()
.key("ALLOW_UNSTRUCTURED_TABLE_LOCATION")
Expand All @@ -127,6 +129,7 @@ public static void enforceFeatureEnabledOrThrow(
.defaultValue(false)
.buildFeatureConfiguration();

@SuppressWarnings("deprecation")
public static final FeatureConfiguration<Boolean> ALLOW_EXTERNAL_TABLE_LOCATION =
PolarisConfiguration.<Boolean>builder()
.key("ALLOW_EXTERNAL_TABLE_LOCATION")
Expand All @@ -137,6 +140,7 @@ public static void enforceFeatureEnabledOrThrow(
.defaultValue(false)
.buildFeatureConfiguration();

@SuppressWarnings("deprecation")
public static final FeatureConfiguration<Boolean> ALLOW_EXTERNAL_CATALOG_CREDENTIAL_VENDING =
PolarisConfiguration.<Boolean>builder()
.key("ALLOW_EXTERNAL_CATALOG_CREDENTIAL_VENDING")
Expand All @@ -146,6 +150,7 @@ public static void enforceFeatureEnabledOrThrow(
.defaultValue(true)
.buildFeatureConfiguration();

@SuppressWarnings("deprecation")
public static final FeatureConfiguration<List<String>> SUPPORTED_CATALOG_STORAGE_TYPES =
PolarisConfiguration.<List<String>>builder()
.key("SUPPORTED_CATALOG_STORAGE_TYPES")
Expand All @@ -159,6 +164,7 @@ public static void enforceFeatureEnabledOrThrow(
StorageConfigInfo.StorageTypeEnum.GCS.name()))
.buildFeatureConfiguration();

@SuppressWarnings("deprecation")
public static final FeatureConfiguration<Boolean> CLEANUP_ON_NAMESPACE_DROP =
PolarisConfiguration.<Boolean>builder()
.key("CLEANUP_ON_NAMESPACE_DROP")
Expand All @@ -168,6 +174,7 @@ public static void enforceFeatureEnabledOrThrow(
.defaultValue(false)
.buildFeatureConfiguration();

@SuppressWarnings("deprecation")
public static final FeatureConfiguration<Boolean> CLEANUP_ON_CATALOG_DROP =
PolarisConfiguration.<Boolean>builder()
.key("CLEANUP_ON_CATALOG_DROP")
Expand All @@ -177,6 +184,7 @@ public static void enforceFeatureEnabledOrThrow(
.defaultValue(false)
.buildFeatureConfiguration();

@SuppressWarnings("deprecation")
public static final FeatureConfiguration<Boolean> DROP_WITH_PURGE_ENABLED =
PolarisConfiguration.<Boolean>builder()
.key("DROP_WITH_PURGE_ENABLED")
Expand Down
Loading