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 @@ -165,10 +165,11 @@ public Builder<T> catalogConfig(String catalogConfig) {
/**
* Used to support backwards compatability before there were reserved properties. Usage of this
* method should be removed over time.
*
* @deprecated Use {@link #catalogConfig()} instead.
*/
@Deprecated
Copy link
Contributor

Choose a reason for hiding this comment

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

I know the alerts are annoying, but I think we need to get in the habit of marking things we want to remove as Deprecated and would like to keep the annotation

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'm not sure we want to remove this method. We may be able to remove it if we stop supporting the old config names at some point and never rename configs again 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

That was definitely my intent when I made it -- to prohibit new usage and eventually phase out old usage. I think there's a comment to this effect, and the alerts are sort of "meant" to be annoying. We shouldn't have configs that are unsafe, I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's not to say we can't change our minds about this btw, just noting this is by design. Maybe bad design :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Annoying to whom? ;) Right now they seems to be very visible to use users, who cannot do anything to "fix" it 🤷

Copy link
Contributor

@eric-maynard eric-maynard May 27, 2025

Choose a reason for hiding this comment

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

Only to users building from source. Otherwise, it's meant to be visible to developers -- a reminder & incentive to deprecate the method, not one to just yank the @Deprecated annotation.

If we're concerned about the verbosity of ./gradlew build, these warnings are a very small fraction of the output I see when building. There is lots of other output which is much lower-signal to users, such as all the split package warnings or the Hibernate Validator output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I noted in #1666 the concern is with log messages.

I'll restore the deprecation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR only removes the INFO log message now. Description updated.

Copy link
Contributor

@eric-maynard eric-maynard May 27, 2025

Choose a reason for hiding this comment

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

Looks good! Just want to flag that there is a surviving log here, but IMO we should keep that one because it tells users to stop using the config, rather than developers to stop building Polaris with a method call in place they can't actually remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The "surviving" log is quite appropriate IMHO. It informs the user that they ought to update their table's properties to use the new name.

public Builder<T> catalogConfigUnsafe(String catalogConfig) {
LOGGER.info("catalogConfigUnsafe is deprecated! Use catalogConfig() instead.");
if (catalogConfig.startsWith(SAFE_CATALOG_CONFIG_PREFIX)) {
throw new IllegalArgumentException(
"Unsafe catalog configs are not expected to start with " + SAFE_CATALOG_CONFIG_PREFIX);
Expand Down
Loading