You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/30 08:41:25 UTC
[GitHub] [kafka] dajac opened a new pull request #10436: MINOR: Remove deprecated ConfigEntry constructor
dajac opened a new pull request #10436:
URL: https://github.com/apache/kafka/pull/10436
`ConfigEntry`'s constructor was deprecated in 1.1.0. It seems that we can safely remove it now.
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a change in pull request #10436: KAFKA-12577; Remove deprecated ConfigEntry constructor
Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#discussion_r604193906
##########
File path: docs/upgrade.html
##########
@@ -28,6 +28,8 @@ <h5><a id="upgrade_300_notable" href="#upgrade_300_notable">Notable changes in 3
<li>The Streams API removed all deprecated APIs that were deprecated in version 2.5.0 or earlier.
For a complete list of removed APIs compare the detailed Kafka Streams upgrade notes.</li>
<li>The deprecated <code>Metric#value()</code> method was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12573">KAFKA-12573</a>).</li>
+ <li>The deprecated <code>org.apache.kafka.clients.admin.ConfigEntry</code> constructor was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12577">KAFKA-12577</a>).
Review comment:
> Do we have multiple `ConfigEntry` that are public APIs?
Good point. There is only one in the public APIs. Let me remove the fully qualified name.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac merged pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
dajac merged pull request #10436:
URL: https://github.com/apache/kafka/pull/10436
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] sknot-rh commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
sknot-rh commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913710299
Let me know if I can do my first contribution! :laughing:
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10436: KAFKA-12577; Remove deprecated ConfigEntry constructor
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#discussion_r604187955
##########
File path: docs/upgrade.html
##########
@@ -28,6 +28,8 @@ <h5><a id="upgrade_300_notable" href="#upgrade_300_notable">Notable changes in 3
<li>The Streams API removed all deprecated APIs that were deprecated in version 2.5.0 or earlier.
For a complete list of removed APIs compare the detailed Kafka Streams upgrade notes.</li>
<li>The deprecated <code>Metric#value()</code> method was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12573">KAFKA-12573</a>).</li>
+ <li>The deprecated <code>org.apache.kafka.clients.admin.ConfigEntry</code> constructor was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12577">KAFKA-12577</a>).
Review comment:
On the other hand, it won't be practical to do the same for cases where there are a lot of deprecated usages. So, maybe we should keep it simple and people should make sure to remove deprecations before the upgrade so they get useful help.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] sknot-rh commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
sknot-rh commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913679136
The test scenario is basically "mocking" server response to `describeConfig`. Then I am looking at the `source` property to determine whether the changed configuration property is default (`source==DEFAULT_CONFIG) or custom (`source=UNKNOWN`).
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] sknot-rh commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
sknot-rh commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913689790
No, it is just a junit test consuming properties in `key=value` format. And I want to mark init configuration as default.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] tombentley commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
tombentley commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913714434
[KIP-692](https://cwiki.apache.org/confluence/display/KAFKA/KIP-692:+Make+AdminClient+value+object+constructors+public) proposed to do this for all the record-like classes in the admin client. I don't think it got any votes at the time.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a change in pull request #10436: KAFKA-12577; Remove deprecated ConfigEntry constructor
Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#discussion_r604176897
##########
File path: docs/upgrade.html
##########
@@ -28,6 +28,8 @@ <h5><a id="upgrade_300_notable" href="#upgrade_300_notable">Notable changes in 3
<li>The Streams API removed all deprecated APIs that were deprecated in version 2.5.0 or earlier.
For a complete list of removed APIs compare the detailed Kafka Streams upgrade notes.</li>
<li>The deprecated <code>Metric#value()</code> method was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12573">KAFKA-12573</a>).</li>
+ <li>The deprecated <code>org.apache.kafka.clients.admin.ConfigEntry</code> constructor was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12577">KAFKA-12577</a>).
Review comment:
We have multiple `ConfigEntry` classes in the code base so I used the fully qualified name to be precise. `Metric` is unique however. Shall we use the fully qualified name for `Metric` as well in order to be consistent?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
chia7712 commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913701007
ok. How about using reflection to update private fields of `ConfigEntry`? For example:
```java
Class<?> clazz = ConfigEntry.class;
ConfigEntry entry = new ConfigEntry("name", "value");
Field f1 = entry.getClass().getDeclaredField("source");
f1.setAccessible(true);
f1.set(entry, ConfigEntry.ConfigSource.DYNAMIC_BROKER_CONFIG);
```
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] sknot-rh edited a comment on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
sknot-rh edited a comment on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913702209
Yes, I used something similar. Thank you for looking :)
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on pull request #10436: KAFKA-12577; Remove deprecated ConfigEntry constructor
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-810350507
@ijuma Updated the PR.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] sknot-rh commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
sknot-rh commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-912277770
I am using this deprecated ctor in my tests. How can I set, for example `source` option now? The other ctor has a package protected access.
```
ConfigEntry(String name, String value, ConfigSource source, boolean isSensitive, boolean isReadOnly,
List<ConfigSynonym> synonyms, ConfigType type, String documentation)
```
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913705180
I think it makes sense to make the constructor public, but it would require a small kip. We don't gain anything by not making it public if people access it via reflection anyway.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
chia7712 commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913687917
> The test scenario is basically "mocking" server response to describeConfig.
Do you create a mock kafka admin and then mock response for specify request. If so, it seems to me you can mock the `ConfigEntry` according request and then use the mocked `ConfigEntry` to create response.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
ijuma commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913715227
@tombentley maybe we should vote for it then :)
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] sknot-rh edited a comment on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
sknot-rh edited a comment on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-912277770
I am using this deprecated ctor in my tests. How can I set, for example `source` option now? The other ctor has a package protected access.
```
ConfigEntry(String name, String value, ConfigSource source, boolean isSensitive, boolean isReadOnly,
List<ConfigSynonym> synonyms, ConfigType type, String documentation)
```
// edit
I used reflection to invoke protected ctor.
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-810919457
Failed tests are not related to this change. Merging to trunk.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on pull request #10436: MINOR: Remove deprecated ConfigEntry constructor
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-810034992
I need to file a Jira and update the upgrade nodes.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] chia7712 commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
chia7712 commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913671739
> I am using this deprecated ctor in my tests
just curious. Why you need to create `ConfigEntry` in your tests? Could you share the use case to me? thanks
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10436: KAFKA-12577; Remove deprecated ConfigEntry constructor
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#discussion_r604171085
##########
File path: docs/upgrade.html
##########
@@ -28,6 +28,8 @@ <h5><a id="upgrade_300_notable" href="#upgrade_300_notable">Notable changes in 3
<li>The Streams API removed all deprecated APIs that were deprecated in version 2.5.0 or earlier.
For a complete list of removed APIs compare the detailed Kafka Streams upgrade notes.</li>
<li>The deprecated <code>Metric#value()</code> method was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12573">KAFKA-12573</a>).</li>
+ <li>The deprecated <code>org.apache.kafka.clients.admin.ConfigEntry</code> constructor was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12577">KAFKA-12577</a>).
Review comment:
Do we need the fully qualified name? We didn't use it for the `Metric` case.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] sknot-rh commented on pull request #10436: KAFKA-12577; Remove deprecated `ConfigEntry` constructor for 3.0
Posted by GitBox <gi...@apache.org>.
sknot-rh commented on pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#issuecomment-913702209
Yes, I used seemthing similar. Thank you for looking :)
--
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] ijuma commented on a change in pull request #10436: KAFKA-12577; Remove deprecated ConfigEntry constructor
Posted by GitBox <gi...@apache.org>.
ijuma commented on a change in pull request #10436:
URL: https://github.com/apache/kafka/pull/10436#discussion_r604186633
##########
File path: docs/upgrade.html
##########
@@ -28,6 +28,8 @@ <h5><a id="upgrade_300_notable" href="#upgrade_300_notable">Notable changes in 3
<li>The Streams API removed all deprecated APIs that were deprecated in version 2.5.0 or earlier.
For a complete list of removed APIs compare the detailed Kafka Streams upgrade notes.</li>
<li>The deprecated <code>Metric#value()</code> method was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12573">KAFKA-12573</a>).</li>
+ <li>The deprecated <code>org.apache.kafka.clients.admin.ConfigEntry</code> constructor was removed (<a href="https://issues.apache.org/jira/browse/KAFKA-12577">KAFKA-12577</a>).
Review comment:
Do we have multiple `ConfigEntry` that are public APIs? One option would be to link to the file in GitHub using a commit hash from the 2.8 branch. That would be both concise and informative (the deprecation documentation would include the suggested replacement typically).
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org