-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Mark Deprecated with removal for join-pushdown.with-expressions
#27619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Mark Deprecated with removal for join-pushdown.with-expressions
#27619
Conversation
|
|
||
| @Deprecated | ||
| @Config("deprecated.join-pushdown.with-expressions") | ||
| @LegacyConfig("join-pushdown.with-expressions") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initially #27498 just made the property @Deprecated. this triggers a startup warning when property is used. obviously some people don't read startup warnings...
then @kokosing proposed in in #27498 (comment) to force server startup failure when the property is used -- simply by renaming the property
now, if we add @LegacyConfig are we back to situation when using the property generates just a startup warning?
if that's what we really want then
- seek @kokosing 's approval, because he explicitly wanted otherwise AND
- revert the rename of the property. we don't need
@LegacyConfig. Just@Deprecatedtriggers a warning and is more appropriate to this situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest rename here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a mechanism for deprecating config options. It’s LegacyConfig.
Renaming a property for the purpose of deprecation forces a breaking change twice: once when it’s renamed, and once when it’s removed. That’s a worse user experience.
If the warning on the console and a mention of the deprecation in the release notes is not enough, then I would argue that the user doesn’t care enough about hygiene and diligence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we need to establish a clear agreement on how configuration options should be retired and removed. Should we follow a rename-then-remove approach, mark them as deprecated first, or introduce a LegacyConfig path before eventual removal ?
Each option has its own trade-offs, so we should finalize a consistent policy.
What is the appropriate next step for driving this forward?
Should I open a community or slack discussion, schedule a meeting, or take another approach?
anyway, we should finalize it @martint @findepi @kokosing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have a mechanism for deprecating config options. It’s LegacyConfig.
We actually have two: @LegacyConfig and @Deprecated
when a used property is both @Config and @Deprecated:
==========
Configuration should be updated:
1) Configuration property 'query.client.timeout' is deprecated and should not be used
==========
when a used property is both @Config and @Deprecated(forRemoval = true):
==========
Configuration should be updated:
1) Configuration property 'query.client.timeout' is deprecated and will be removed in the future
==========
when a used property is both @Config and @LegacyConfig and the legacy name is used, we print this
==========
Configuration should be updated:
1) Configuration property 'query.client.timeout' has been replaced. Use 'query.client.timeout.new' instead.
==========
So
@LegacyConfigis the way to go when we our goal is to rename a property or replace with a better config toggle. We want users to use the new name.@Deprecatedis the way to go when our goal is to remove a property.
Renaming a property for the purpose of deprecation forces a breaking change twice: once when it’s renamed, and once when it’s removed. That’s a worse user experience.
it has one advantage though
the first breakage acts like the last boarding call for a train. It gives operators a chance to come back to us and say they actually need particular property before it's removed along with the code it was configuring.
i am not saying this is super important. in particular, i don't think this is the case with this property, but we can't say this doesn't exist.
If the warning on the console and a mention of the deprecation in the release notes is not enough, then I would argue that the user doesn’t care enough about hygiene and diligence.
i wish all peoples followed the same principles, then there wouldn't be disagreements
however, i know of many people who don't study release notes and don't pay attention to warnings. this is not to say we should do a particular process, but acknowledging their existence might be helpful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was long. @chenjian2664 if you want to avoid the breakage -- i assume this was the intention of this PR -- the correct way to do it is
- revert the rename, i.e. drop "deprecated." prefix that was added in Deprecate join-pushdown.with-expressions config property #27498
- keep the property as
@Deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated output examples above to include @Deprecated(forRemoval = true).
Addition of forRemoval = true triggers a better startup warning.
(i don't really get why the distinction. to me deprecation is always with the intent of eventual removal)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @findepi . My understanding is as follows: when we rename a configuration, we should use @Deprecated together with @LegacyConfig. If we plan to remove the old configuration name (which is likely in most cases), we can later mark the @Deprecated with forRemoval = true. As a final step, we can either remove the legacy code entirely or use replacedBy in @LegacyConfig to provide a clear migration path before the actual removal
We should use replacedBy in @LegacyConfig to provide a clear migration path before the actual removal
For removing config, just added @Drepcated(forRemoval = true) at first, then for final removal is the same as rename, use then remove the codeReplacedBy in @LegacyConfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with @Drepcated(forRemoval = true) + @LegacyConfig:
==========
Configuration should be updated:
1) Configuration property 'join-pushdown.with-expressions' has been replaced. Use 'deprecated.join-pushdown.with-expressions' instead.
2) Configuration property 'join-pushdown.with-expressions' is deprecated and will be removed in the future
==========
8151d37 to
f80d183
Compare
join-pushdown.with-expressionsjoin-pushdown.with-expressions
Description
We should following below steps to retire or remove config.
Removing a configuration property
When a configuration is being fully removed, the following steps should be applied:
@Deprecated(forRemoval = true).@DefunctConfig(if applicable)Renaming a configuration property
When a configuration is renamed (with or without a future removal plan), apply the following steps:
@Deprecatedand@LegacyConfigfor old configuration key. If the old name is expected to be removed eventually, setforRemoval = truein@Deprecated.@LegacyConfigon the old configuration withreplacedBypointing to the new name.(also we could revert@Deprecated(forRemoval = true)back to@Deprecatedor even remove@Deprecatedfully)@DefunctConfig(if applicable)The
join-pushdown.with-expressionsoriginal in #27498 was renamed but actually is going to be removed, thus we follow the removed instructions.in pr: revert the rename(removed the prefix "deprecated.") and mark
@Deprecated(forRemoval = true)at current.Additional context and related issues
#27153 (comment)
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: