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

feat: Add ability to specify RetryOptions and BigQueryRetryConfig when create job and waitFor #3398

Merged
merged 12 commits into from
Jul 24, 2024

Conversation

PhongChuong
Copy link
Contributor

@PhongChuong PhongChuong commented Jul 23, 2024

Add ability to specify RetryOptions and BigQueryRetryConfig when creating jobs. The RetryOptions and BigQueryRetryConfig are embedded in JobOptions so the BigQuery API interface does not change. This can be extended to other options such as DatasetListOption, DatasetOption, etc. Those options will be added in a future PR as needed.

In addition:
This PR also overloads the job.waitFor() method to allow users to specify BigQueryRetryConfig.
This PR also has a minor refactor to JobTest.java.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #3399 ☕️

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/java-bigquery API. labels Jul 23, 2024
@PhongChuong PhongChuong marked this pull request as ready for review July 23, 2024 19:37
@PhongChuong PhongChuong requested a review from a team as a code owner July 23, 2024 19:37
Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

Generally looks good, just a question about this new configurability in the face of non-query jobs.

Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

Thanks for the clarifications, looks good!

@PhongChuong PhongChuong merged commit 1f91ae7 into main Jul 24, 2024
20 checks passed
@PhongChuong PhongChuong deleted the jobRetryConfig branch July 24, 2024 20:02
@PhongChuong
Copy link
Contributor Author

Thanks for the review.

lqiu96 pushed a commit that referenced this pull request Aug 28, 2024
…n create job and waitFor (#3398)

* feat: initial implementation of customizable BigQueryRetryConfig

* Add unit and integration tests

* Fix lint issues

* Revert unintentional changes to testQueryStatistics in ITBigQueryTest

* Revert unintentional changes to testQueryStatistics in ITBigQueryTest

* Revert unintentional changes to testQueryStatistics in ITBigQueryTest

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Add additional comments to Job.waitFor() for BigQueryRetryConfig

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/java-bigquery API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to specify retry options for job create
2 participants