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/05/17 02:24:13 UTC
[GitHub] [kafka] NLincoln opened a new pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
NLincoln opened a new pull request #10709:
URL: https://github.com/apache/kafka/pull/10709
The schema definition for the DescribeProducersRequest see [here](https://github.com/apache/kafka/blob/3b6599c600f6e7fbeb000a088591f1cf9aba107d/clients/src/main/resources/common/message/DescribeProducersRequest.json) has trailing tokens - specifically, the last two lines in the commit in that link.
This does not cause problems for the generator, because Jackson will ignore trailing input by default.
However, some JSON parsers cannot be configured to ignore trailing characters, and so they fail on that file. This can cause problems for users wishing to use the official schema definitions to generate clients in other languages.
The fix here is pretty simple - just remove the trailing tokens, and optionally configure jackson to fail on trailing tokens. This patch is for the former, and I'll be happy to submit a patch that configures jackson so this won't happen again :).
### 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 merged pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dajac merged pull request #10709:
URL: https://github.com/apache/kafka/pull/10709
--
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 #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dajac merged pull request #10709:
URL: https://github.com/apache/kafka/pull/10709
--
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 #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#issuecomment-842387273
@NLincoln Regarding your suggesting to configure Jackson to not ignore trailing tokens, that might be a good idea. Could you file a separate JIRA for it?
--
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 #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#issuecomment-842430274
> @dajac done! https://issues.apache.org/jira/browse/KAFKA-12800
>
> I can't edit the assignee field of that ticket, but I can submit a patch for it tonight :)
Awesome, 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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] dajac commented on a change in pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#discussion_r633353099
##########
File path: clients/src/main/resources/common/message/DescribeProducersRequest.json
##########
@@ -27,6 +27,5 @@
{ "name": "PartitionIndexes", "type": "[]int32", "versions": "0+",
"about": "The indexes of the partitions to list producers for." }
]}
- ]}
Review comment:
Good catch. Could we re-indent the `Topics` (L24) block now that we have removed the trailing json? We usually two spaces.
--
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] dongjinleekr commented on pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dongjinleekr commented on pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#issuecomment-842297201
Nice Catch. 👍👍👍
--
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 #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dajac commented on a change in pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#discussion_r633353099
##########
File path: clients/src/main/resources/common/message/DescribeProducersRequest.json
##########
@@ -27,6 +27,5 @@
{ "name": "PartitionIndexes", "type": "[]int32", "versions": "0+",
"about": "The indexes of the partitions to list producers for." }
]}
- ]}
Review comment:
Good catch. Could we re-indent the `Topics` (L24) block now that we have removed the trailing json? We usually two spaces.
--
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] NLincoln commented on pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
NLincoln commented on pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#issuecomment-842404631
@dajac done! https://issues.apache.org/jira/browse/KAFKA-12800
I can't edit the assignee field of that ticket, but I can submit a patch for it tonight :)
--
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] NLincoln commented on pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
NLincoln commented on pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#issuecomment-842404631
@dajac done! https://issues.apache.org/jira/browse/KAFKA-12800
I can't edit the assignee field of that ticket, but I can submit a patch for it tonight :)
--
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] NLincoln commented on a change in pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
NLincoln commented on a change in pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#discussion_r633535873
##########
File path: clients/src/main/resources/common/message/DescribeProducersRequest.json
##########
@@ -27,6 +27,5 @@
{ "name": "PartitionIndexes", "type": "[]int32", "versions": "0+",
"about": "The indexes of the partitions to list producers for." }
]}
- ]}
Review comment:
1e9d680e4225de93169cb357147723d7527b3503 🎉
--
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] NLincoln commented on a change in pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
NLincoln commented on a change in pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#discussion_r633535873
##########
File path: clients/src/main/resources/common/message/DescribeProducersRequest.json
##########
@@ -27,6 +27,5 @@
{ "name": "PartitionIndexes", "type": "[]int32", "versions": "0+",
"about": "The indexes of the partitions to list producers for." }
]}
- ]}
Review comment:
1e9d680e4225de93169cb357147723d7527b3503 🎉
--
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] dongjinleekr commented on pull request #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dongjinleekr commented on pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#issuecomment-842297201
Nice Catch. 👍👍👍
--
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 #10709: KAFKA-12794: Fix trailing json tokens in DescribeProducersRequest.json
Posted by GitBox <gi...@apache.org>.
dajac commented on pull request #10709:
URL: https://github.com/apache/kafka/pull/10709#issuecomment-842387273
--
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