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

Retry when the BQ job error can be retried #31350

Closed
wants to merge 2 commits into from

Conversation

liferoad
Copy link
Collaborator

@liferoad liferoad commented May 20, 2024

Address #30513 for the flaky BQ test.

From https://ge.apache.org/s/rwjhs7f4gc2ee/console-log/task/:sdks:python:test-suites:direct:py39:postCommitIT?anchor=424&page=1,


[1m�[31mERROR   �[0m apache_beam.runners.common:bundle_processor.py:237 BigQuery job beam_bq_job_COPY_AUTOMATIC_JOB_NAME_COPY_STEP_76772e260e0c46cf96f0b94402c2595d_2af7745dca2d9060a22b202c77bbc2d8 failed. Error Result: <ErrorProto |  
-- | --
  | message: 'Error encountered during execution. Retrying may solve the problem.' |  
  | reason: 'backendError'> [while running 'write/BigQueryBatchFileLoads/ParDo(TriggerCopyJobs)/ParDo(TriggerCopyJobs)']

It looks like we should retry when this happens.


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.

Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@liferoad liferoad requested review from damccorm and Abacn May 21, 2024 15:53
raise RuntimeError(
'BigQuery job {} failed. Error Result: {}'.format(
job_reference.jobId, job.status.errorResult))
if 'Retrying may solve the problem.' in job.status.errorResult.message:
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understood correctly, at this point the job is already completed as "DONE" and with error.

self.get_job(...) is just a GET call to get. the BigQuery load job status. It won't retry the load job.

The current retry logic is to poll existing job, and this poll API call can intermittently fail and get retried

Copy link
Contributor

Choose a reason for hiding this comment

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

So retry poll job when a job status returned DONE with errorResult, it won't actually retry the load job.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, you are right. Close this.

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.

None yet

2 participants