fix: BigQuery destination: wait for table migrations to complete#5544
Merged
kodiakhq[bot] merged 4 commits intomainfrom Dec 12, 2022
Merged
fix: BigQuery destination: wait for table migrations to complete#5544kodiakhq[bot] merged 4 commits intomainfrom
kodiakhq[bot] merged 4 commits intomainfrom
Conversation
Contributor
|
Nice find. Is there an API in bigquery which can gurantee that when it completes the table is created? |
Contributor
Author
@yevgenypats Not as far as I know, or at least I couldn't find anything. |
erezrokah
approved these changes
Dec 12, 2022
kodiakhq bot
pushed a commit
that referenced
this pull request
Dec 13, 2022
🤖 I have created a release *beep* *boop* --- ## [1.1.2](plugins-destination-bigquery-v1.1.1...plugins-destination-bigquery-v1.1.2) (2022-12-13) ### Bug Fixes * BigQuery destination: wait for table migrations to complete ([#5544](#5544)) ([712ee39](712ee39)) * **deps:** Update module github.com/cloudquery/plugin-sdk to v1.12.0 ([#5539](#5539)) ([fb71293](fb71293)) * Fix deadlock in BigQuery destination if error occurs during write ([#5550](#5550)) ([e087095](e087095)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
yevgenypats
pushed a commit
that referenced
this pull request
Dec 13, 2022
This adds additional wait blocks to the BigQuery destination migration code to ensure that we do not return from `Migrate` before the tables are confirmed to be either created or matching the expected schema, depending on the case. This helps prevent an issue where BigQuery returns a 404 when a write immediately follows the creation of the table (as is usually the case when you run `cloudquery sync` for the first time).
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.
This adds additional wait blocks to the BigQuery destination migration code to ensure that we do not return from
Migratebefore the tables are confirmed to be either created or matching the expected schema, depending on the case. This helps prevent an issue where BigQuery returns a 404 when a write immediately follows the creation of the table (as is usually the case when you runcloudquery syncfor the first time).