fix(destination-bigquery): handle InterruptedException during sync cancellation - #79168
fix(destination-bigquery): handle InterruptedException during sync cancellation#79168devin-ai-integration[bot] wants to merge 4 commits into
Conversation
…ncellation Wrap BigQuery API calls in status gatherers with executeBigQueryOperation() to catch BigQueryException caused by InterruptedException. This converts the raw Java exception into a user-friendly TransientErrorException instead of surfacing 'java.lang.InterruptedException' as a system_error. Affected components: - BigqueryDirectLoadDatabaseInitialStatusGatherer - BigqueryTypingDedupingDatabaseInitialStatusGatherer - BigQueryUtils (new executeBigQueryOperation utility) Co-Authored-By: bot_apk <apk@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
Detected
|
|
|
Deploy preview for airbyte-docs ready!
Deployed with vercel-action |
Co-Authored-By: bot_apk <apk@cognition.ai>
… of io.airbyte.commons Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
|
Triggering |
|
🧪 Fix Validation Evidence🟢 Outcome: Fix ProvenUnit tests comprehensively demonstrate that 🚦 Next Steps
📋 Connector & PR DetailsConnector: 📝 Evidence PlanProving CriteriaA sync that previously surfaced Disproving CriteriaUnit tests fail, or the conversion logic has gaps (e.g., non-InterruptedException exceptions are inadvertently caught, thread interrupted status is lost). Testing Strategy: Unit tests only (edge-case-only fix)
Cases Attempted
✅ Pre-flight Checks
📊 Detailed Evidence Log2026-06-08T17:53Z — Pre-release publish triggered: Note: Connection IDs and detailed logs are recorded in the linked private issue. |
|
Reviewing PR for connector safety and quality.
|
🛡️ AI PR Review Report🟢 Review Action: APPROVEDAll 12 gates passed. 🔶 Risk Level: 3/5Error-handling refinement in destination-bigquery: wraps 📋 PR DetailsConnector(s): 🔍 Gate Evaluation DetailsGate-by-Gate Analysis
PR Hygiene Details
Test Coverage Details
Code Security Details
Live / E2E Tests Details
📚 Evidence ConsultedEvidence
Preconditions (all must pass)
Change scope (at least one must pass)❌ No matching change scope detected. |
|
What
Resolves https://github.com/airbytehq/oncall/issues/12814:
When the platform cancels a sync (e.g., due to a source failure), the destination thread gets interrupted. BigQuery SDK's
AbstractFuture.get()throwsInterruptedException, which is wrapped inBigQueryExceptionand surfaces to the user as a rawjava.lang.InterruptedExceptionsystem_error. This is not actionable and creates Sentry noise.How
Added
BigQueryUtils.executeBigQueryOperation()— a utility that catchesBigQueryExceptioncaused byInterruptedExceptionand rethrows it as aTransientErrorExceptionwith the message"BigQuery API call interrupted.". The utility also restores the thread's interrupted status.Wrapped all BigQuery API calls in both database initial status gatherers:
BigqueryDirectLoadDatabaseInitialStatusGatherer.getTableStatus()—getTable()callBigqueryTypingDedupingDatabaseInitialStatusGatherer.getInitialRawTableState()—getTable()andquery()callsReview guide
BigQueryUtils.kt— newexecuteBigQueryOperation()utility methodBigqueryDirectLoadDatabaseInitialStatusGatherer.kt— wrappedgetTable()callBigqueryTypingDedupingDatabaseInitialStatusGatherer.kt— wrappedgetTable()andquery()callsBigQueryUtilsExecuteBigQueryOperationTest.kt— unit tests for the utilityBigqueryDirectLoadDatabaseInitialStatusGathererTest.kt— tests for direct-load gatherer interruption handlingBigqueryTypingDedupingDatabaseInitialStatusGathererTest.kt— tests for T+D gatherer interruption handlingTest Coverage
New unit tests covering:
executeBigQueryOperationconvertsBigQueryException(InterruptedException)→TransientErrorExceptionInterruptedExceptionBigQueryExceptionis rethrown as-isTransientErrorExceptionon interruptionUser Impact
Users will see
"BigQuery API call interrupted."(classified astransient_error) instead of"java.lang.InterruptedException"(classified assystem_error) when a sync is cancelled due to upstream failures. This reduces Sentry noise and provides a clearer error message.Can this PR be safely reverted and rolled back?
Important
Active progressive rollout warning for destination-bigquery.
Devin session