Skip to content
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

BigtableIO: Force minimum value of desiredBundleSizeBytes to be 1 #28798

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

joar
Copy link
Contributor

@joar joar commented Oct 3, 2023

Fixes #28793 in the way suggested in #28793 (comment):


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.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit 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
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@joar joar changed the title Add testReadingTinyTable WIP Oct 3, 2023
@joar joar force-pushed the fix-bigtableio-desired-bundle-size-zero branch from 4cf0310 to 9456610 Compare October 4, 2023 09:54
@joar joar changed the title WIP BigtableIO: Force minimum value of desiredBundleSizeBytes to be 1 Oct 4, 2023
@joar joar force-pushed the fix-bigtableio-desired-bundle-size-zero branch from 41b32c7 to 87960f7 Compare October 4, 2023 11:20
Fixes apache#28793 in the way suggested in apache#28793 (comment):

- `BoundedReadEvaluatorFactory#getInitialInputs` may still calculate a
  `bytesPerBundle` of `0`; but
- `BigtableSource#split` will interpret it as `1` in order to not
  violate the `checkArgument()` in
  https://github.com/apache/beam/blob/71c8459633ec86e576eca080a26be9f42474ecb2/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableIO.java#L1623-L1626
@joar joar force-pushed the fix-bigtableio-desired-bundle-size-zero branch from 87960f7 to 7ed57ef Compare October 4, 2023 11:22
@joar joar marked this pull request as ready for review October 4, 2023 11:23
@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2023

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @bvolpato for label java.
R: @chamikaramj for label io.

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

CHANGES.md Outdated Show resolved Hide resolved
Copy link
Contributor

@bvolpato bvolpato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix LGTM, just +1 on moving the CHANGES.md delta to 2.52.0 since 2.51.0 is almost out / at release candidate fix.

@joar joar force-pushed the fix-bigtableio-desired-bundle-size-zero branch 3 times, most recently from b854f02 to afe1dc9 Compare October 5, 2023 12:29
@joar
Copy link
Contributor Author

joar commented Oct 5, 2023

The "PreCommit Whitespace" failure seems to me to be unrelated to the changes in this PR:

> Task :sdks:python:sdist

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':sdks:python:test-suites:tox:py38:archiveFilesToLint' (type 'Zip').
  - Gradle detected a problem with the following location: '/runner/_work/beam/beam'.
    
    Reason: Task ':sdks:python:test-suites:tox:py38:archiveFilesToLint' uses this output of task ':sdks:python:setupVirtualenv' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':sdks:python:setupVirtualenv' as an input of ':sdks:python:test-suites:tox:py38:archiveFilesToLint'.
      2. Declare an explicit dependency on ':sdks:python:setupVirtualenv' from ':sdks:python:test-suites:tox:py38:archiveFilesToLint' using Task#dependsOn.
      3. Declare an explicit dependency on ':sdks:python:setupVirtualenv' from ':sdks:python:test-suites:tox:py38:archiveFilesToLint' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

Edit: It could also be caused by the modifications to CHANGES.md, in which case it's not a great error message.
Edit 2: So, the changes to CHANGES.md seems to trigger the action, but the action itself seems broken at the moment.

@joar joar force-pushed the fix-bigtableio-desired-bundle-size-zero branch from 7b840f2 to 3096265 Compare October 5, 2023 15:30
@joar
Copy link
Contributor Author

joar commented Oct 5, 2023

Running whitespacelint manually makes me believe that it would pass if the check was working :)

$ python -m pip install --user whitespacelint==1.1.0
Requirement already satisfied: whitespacelint==1.1.0 in /home/joar/.local/lib/python3.8/site-packages (1.1.0)
$ whitespacelint CHANGES.md
# exits with 0
$ git rev-parse HEAD
3096265e05ff59ae192cc7f4a571e9247937211b

@Abacn
Copy link
Contributor

Abacn commented Oct 5, 2023

whitespace issue was an issue on master and now fixed #28845

@Abacn Abacn merged commit c2d7d5f into apache:master Oct 5, 2023
19 checks passed
@joar joar deleted the fix-bigtableio-desired-bundle-size-zero branch October 6, 2023 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: BigtableSource "Desired bundle size 0 bytes must be greater than 0"
3 participants