You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "bzablocki (via GitHub)" <gi...@apache.org> on 2024/02/09 16:24:49 UTC
[PR] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
bzablocki opened a new pull request, #30279:
URL: https://github.com/apache/beam/pull/30279
Fixes #30276. Returning methods in lexicographical order will prevent non-deterministic schema inference.
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
- [ ] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI or the [workflows README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) to see a list of phrases to trigger workflows.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-1936321003
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment `assign set of reviewers`
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "bzablocki (via GitHub)" <gi...@apache.org>.
bzablocki commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2063592352
assign set of reviewers
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "bzablocki (via GitHub)" <gi...@apache.org>.
bzablocki closed pull request #30279: Return methods in a lexicographical order from ReflectUtils.getMethods()
URL: https://github.com/apache/beam/pull/30279
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2134608622
Stopping reviewer notifications for this pull request: requested by reviewer
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "kennknowles (via GitHub)" <gi...@apache.org>.
kennknowles commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2082958359
How does it work for update compatibility if I add a new field to my POJO? I added Reuven because he knows the most about this.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2120339873
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment `assign to next reviewer`:
R: @damondouglas for label java.
Available commands:
- `stop reviewer notifications` - opt out of the automated review tooling
- `remind me after tests pass` - tag the comment author after tests pass
- `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2079269545
Reminder, please take a look at this pr: @m-trieu
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "m-trieu (via GitHub)" <gi...@apache.org>.
m-trieu commented on code in PR #30279:
URL: https://github.com/apache/beam/pull/30279#discussion_r1580995677
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/ReflectUtils.java:
##########
@@ -82,6 +82,7 @@ public static List<Method> getMethods(Class<?> clazz) {
.filter(m -> !Modifier.isPrivate(m.getModifiers()))
.filter(m -> !Modifier.isProtected(m.getModifiers()))
.filter(m -> !Modifier.isStatic(m.getModifiers()))
+ .sorted((m1, m2) -> m1.getName().compareTo(m2.getName()))
Review Comment:
Nit: would it be better use some sorted data structure like SortedSet or immutable sorted set
To prevent callers from mutating the sorting order
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2063596011
Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
R: @m-trieu for label java.
Available commands:
- `stop reviewer notifications` - opt out of the automated review tooling
- `remind me after tests pass` - tag the comment author after tests pass
- `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
The PR bot will only process comments in the main thread (not review comments).
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "bzablocki (via GitHub)" <gi...@apache.org>.
bzablocki commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2149653496
After talking to @reuvenlax we concluded that this might not be the best way to solve this issue. We'll try to reproduce this problem first and then try to address the root cause. I'll close this PR for now.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2079361348
R: @kennknowles for final approval
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "kennknowles (via GitHub)" <gi...@apache.org>.
kennknowles commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2087789292
Excellent. I was worried this would cause update incompatibility just as you described. But it sounds like it is fine. 👍
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2112368071
Reminder, please take a look at this pr: @kennknowles
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "bzablocki (via GitHub)" <gi...@apache.org>.
bzablocki commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2134606217
stop reviewer notifications
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "reuvenlax (via GitHub)" <gi...@apache.org>.
reuvenlax commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2083171737
Dataflow keeps track of the old and new schema, and will match up fields to
ensure that the encoding position remains the same even if the field orders
are different. This is the reason why schemas have an encoding position in
addition to a field number.
Sorting the fields is not needed for update, and in fact is not a solution
since Dataflow supports adding new fields to a schema via update (if we
relied on sorting the new field would end up in the middle of the list, and
would break update).
On Mon, Apr 29, 2024 at 7:53 AM Kenn Knowles ***@***.***>
wrote:
> How does it work for update compatibility if I add a new field to my POJO?
> I added Reuven because he knows the most about this.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/beam/pull/30279#issuecomment-2082958359>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AFAYJVOTCZO2RRBFYYXKJZLY7ZNHNAVCNFSM6AAAAABDBXMF4GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBSHE2TQMZVHE>
> .
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Draft] Return methods in a lexicographical order from ReflectUtils.getMethods() [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #30279:
URL: https://github.com/apache/beam/pull/30279#issuecomment-2053634897
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org