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

Fix truncate copy job when WRITE_TRUNCATE in BigQuery batch load #25101

Merged
merged 2 commits into from
Jan 20, 2023

Conversation

Abacn
Copy link
Contributor

@Abacn Abacn commented Jan 20, 2023

Fixes #24535

Due to a typo the original fix did not take effect. Fixed and added a test.

Please add a meaningful description for your change here


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.

@Abacn
Copy link
Contributor Author

Abacn commented Jan 20, 2023

R: @robertwb
R: @johnjcasey

We may need another cherry-pick because the original fix, marked as 2.45.0 milestone, did not take effect.

@github-actions
Copy link
Contributor

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

@johnjcasey
Copy link
Contributor

We may need to update the comment, as this did not impact the 2.44 release

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Merging #25101 (bb71a53) into master (6203e58) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #25101   +/-   ##
=======================================
  Coverage   73.12%   73.12%           
=======================================
  Files         735      735           
  Lines       98153    98161    +8     
=======================================
+ Hits        71776    71785    +9     
+ Misses      25013    25012    -1     
  Partials     1364     1364           
Flag Coverage Δ
python 82.68% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...m/examples/inference/runinference_metrics/setup.py 0.00% <ø> (ø)
...s/python/apache_beam/io/gcp/bigquery_file_loads.py 87.38% <100.00%> (+0.22%) ⬆️
...apache_beam/typehints/native_type_compatibility.py 82.82% <0.00%> (-2.34%) ⬇️
...ks/python/apache_beam/runners/worker/sdk_worker.py 89.08% <0.00%> (-0.17%) ⬇️
sdks/python/apache_beam/transforms/util.py 96.24% <0.00%> (-0.16%) ⬇️
sdks/python/apache_beam/typehints/typehints.py 92.88% <0.00%> (ø)
...hon/apache_beam/runners/worker/bundle_processor.py 93.54% <0.00%> (ø)
...on/apache_beam/runners/dataflow/dataflow_runner.py 81.88% <0.00%> (+0.14%) ⬆️
sdks/python/apache_beam/pipeline.py 92.42% <0.00%> (+0.29%) ⬆️
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@robertwb robertwb left a comment

Choose a reason for hiding this comment

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

Thank you!

@Abacn
Copy link
Contributor Author

Abacn commented Jan 20, 2023

@johnjcasey it impacts 2.44.0, and also seen in previous releases. Will try to track since when it is introduced.

It is reported as early as 2.41.0 possibly a long hiden bug but only get exposed as people migrating their batch job to Dataflow runner v2

@Abacn
Copy link
Contributor Author

Abacn commented Jan 20, 2023

Run Python_Examples PreCommit

@Abacn Abacn merged commit e379c23 into apache:master Jan 20, 2023
@Abacn Abacn deleted the errorinjbq branch January 20, 2023 18:30
Abacn added a commit to Abacn/beam that referenced this pull request Jan 20, 2023
…che#25101)

* Fix truncate copyjob when WRITE_TRUNCATE in BigQuery batch load
johnjcasey pushed a commit that referenced this pull request Jan 23, 2023
) (#25102)

* Fix truncate copyjob when WRITE_TRUNCATE in BigQuery batch load
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]: Bigquery Load jobs with WRITE_TRUNCATE disposition may truncate valid records.
3 participants