Skip to content

fix(bigquery): enforce idempotency requirements in retry policy - #6798

Merged
alvarowolfx merged 1 commit into
googleapis:mainfrom
alvarowolfx:fix-bq-retry-policy-idempotent
Sep 14, 2026
Merged

alvarowolfx merged 1 commit into
googleapis:mainfrom
alvarowolfx:fix-bq-retry-policy-idempotent

Conversation

@alvarowolfx

Copy link
Copy Markdown
Contributor

Add check for duplicated job error and increase test coverage for idempotency settings.

Towards #6717 #6218

@product-auto-label product-auto-label Bot added the api: bigquery Issues related to the BigQuery API. label Sep 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the BigQuery query retry policy to respect idempotency. Specifically, in RetryableErrors::on_error, if the request state is not idempotent, the retry policy now returns a permanent error. Additionally, a helper function is_duplicate_job_error is introduced to identify duplicate job errors (HTTP 409 or AlreadyExists), and comprehensive unit tests are added to verify these behaviors. I have no feedback to provide.

@alvarowolfx
alvarowolfx marked this pull request as ready for review September 14, 2026 17:33
@alvarowolfx
alvarowolfx requested a review from a team as a code owner September 14, 2026 17:33
@alvarowolfx

Copy link
Copy Markdown
Contributor Author

Split from #6780

@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.03%. Comparing base (c5563c1) to head (4a04cf3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6798   +/-   ##
=======================================
  Coverage   97.02%   97.03%           
=======================================
  Files         326      326           
  Lines      107430   107511   +81     
=======================================
+ Hits       104238   104322   +84     
+ Misses       3192     3189    -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alvarowolfx
alvarowolfx merged commit 8fb991a into googleapis:main Sep 14, 2026
42 checks passed
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 BigQuery API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants