You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "damondouglas (via GitHub)" <gi...@apache.org> on 2023/04/25 07:09:22 UTC

[GitHub] [beam] damondouglas opened a new pull request, #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

damondouglas opened a new pull request, #26413:
URL: https://github.com/apache/beam/pull/26413

   This PR addresses #20498 by removing the SuppressWarnings nullness annotation from SelectByteBuddyHelpers.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [x] 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://beam.apache.org/contribute/get-started-contributing/#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)
   ------------------------------------------------------------------------------------------------
   [![Build python source distribution and wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go tests](https://github.com/apache/beam/workflows/Go%20tests/badge.svg?branch=master&event=schedule)](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.
   


-- 
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


[GitHub] [beam] github-actions[bot] commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1522097522

   Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
   
   R: @robertwb 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


[GitHub] [beam] damondouglas commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1524796278

   @kennknowles nullness check cleanup score:
   Kenn: 30
   Damon: 1 😂


-- 
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


[GitHub] [beam] kennknowles commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "kennknowles (via GitHub)" <gi...@apache.org>.
kennknowles commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1536713102

   R: @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


[GitHub] [beam] github-actions[bot] commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1536170013

   Reminder, please take a look at this pr: @robertwb 


-- 
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


[GitHub] [beam] damondouglas commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1622199434

   @kennknowles I closed this PR. However, I feel like this initiative should not stop. My goal is to get into a single file single PR routine so that the rate of increase of SuppressWarnings into the repository is less than the rate of decrease. In the long run, with this strategy I anticipate we might be able to get to a manageable state.


-- 
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


[GitHub] [beam] damondouglas commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1522081028

   Run Java PreCommit


-- 
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


[GitHub] [beam] kennknowles commented on a diff in pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "kennknowles (via GitHub)" <gi...@apache.org>.
kennknowles commented on code in PR #26413:
URL: https://github.com/apache/beam/pull/26413#discussion_r1179442083


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/SelectByteBuddyHelpers.java:
##########
@@ -174,10 +171,13 @@ static RowSelector createRowSelector(SchemaAndDescriptor schemaAndDescriptor) {
               .withParameters(Schema.class)
               .intercept(new SelectInstructionConstructor());
 
+      Optional<ClassLoader> rowClassLoader = Optional.ofNullable(Row.class.getClassLoader());
+      checkState(rowClassLoader.isPresent());

Review Comment:
   You can get the same effect as your code without going through `Optional` by using `org.apache.beam.sdk.util.Preconditions.checkStateNotNull`. Here and in the other locations.
   
   (I do prefer to use `Optional` in data structure design rather than null, because it is clearer and composes, but in this case it doesn't seem to add much)



-- 
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


[GitHub] [beam] github-actions[bot] commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1536714075

   Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control


-- 
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


[GitHub] [beam] damondouglas closed pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "damondouglas (via GitHub)" <gi...@apache.org>.
damondouglas closed pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers
URL: https://github.com/apache/beam/pull/26413


-- 
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


[GitHub] [beam] github-actions[bot] commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1621687668

   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


[GitHub] [beam] kennknowles commented on pull request #26413: [20498] Remove SuppressWarnings nullness from SelectByteBuddyHelpers

Posted by "kennknowles (via GitHub)" <gi...@apache.org>.
kennknowles commented on PR #26413:
URL: https://github.com/apache/beam/pull/26413#issuecomment-1629157976

   Agreed. File-by-file we should be able to reduce this. And be sure to not accept new files with suppressions. Two good strategies are (1) add the checkin back in to files that show problems (like BigQueryIO) and (2) add the checking back in to files that are pretty easy


-- 
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