feat(bigquery): classify common BigQuery errors - #4773
Open
dtunikov wants to merge 20 commits into
Open
Conversation
- use native bigquery.FieldType in pkg ColumnInfo
Tables without a primary key constraint have TableConstraints == nil, which panicked on tableMeta.TableConstraints.PrimaryKey.Columns.
Adding BIGQUERY_REPLICATION_MODE_UNSPECIFIED = 0 (and BIGQUERY_CDC_EVENTS_FUNCTION_UNSPECIFIED = 0) moved EVENTS and APPENDS off the proto zero value, so Test_BigQuery_Source_CDC_Validation's base config, which relied on those defaults, started tripping the new "invalid replication mode" guard in ValidateMirrorSource. Set the replication mode and CDC events function explicitly on the base config, restore it (rather than nil) after the QUERY subtest, and cover the unspecified-mode rejection directly. Also reject an unset replication mode in ValidateSourceCDC. The flow connector already guards it, but the pkg is meant to be callable from outside the flow module, and there it silently skipped every CDC check. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The regenerated TableMapping interface has a required watermarkColumn field, and TableMapRow derives from it, so both table-mapping object literals in the mirror create handlers stopped type checking. Pass the row's value through in reformattedTableMapping and default it to empty when building rows from the source schema; there is no UI control for it yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dtunikov
force-pushed
the
bq/watermark-column-replication
branch
from
September 4, 2026 09:36
9955a78 to
183fbdc
Compare
dtunikov
force-pushed
the
codex/classify-common-bigquery-errors
branch
from
September 4, 2026 11:40
7f8bb0a to
885ace4
Compare
dtunikov
marked this pull request as ready for review
September 8, 2026 12:33
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
jgao54
reviewed
Sep 8, 2026
Comment on lines
+362
to
+377
| case "attributeError", | ||
| "badRequest", | ||
| "billingNotEnabled", | ||
| "billingTierLimitExceeded", | ||
| "blocked", | ||
| "duplicate", | ||
| "invalid", | ||
| "invalidQuery", | ||
| "notImplemented", | ||
| "quotaExceeded", | ||
| "resourceInUse", | ||
| "resourcesExceeded", | ||
| "responseTooLarge", | ||
| "stopped", | ||
| "timeout": | ||
| return ErrorNotifyBigQueryError, true |
Contributor
There was a problem hiding this comment.
nit: classifying errors upfront have the benefit of less noisy alert; the trade-off here is that some of these errors (e.g. invalidQuery) may actually surface implementation issues that we otherwise don't get alerted if it is something on our end that could be fixed, so could be informative for new connectors. Since you have a better grasp of errors in BQ will leave this to your decision on this trade-offs here and which errors to classify upfront vs. later.
Contributor
Author
There was a problem hiding this comment.
yeah..
i'll double check these errors and exclude those that can be added after some monitoring in prod
jgao54
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
googleapi.CheckResponsein tests