Skip to content

fix: BigQuery destination: wait for table migrations to complete#5544

Merged
kodiakhq[bot] merged 4 commits intomainfrom
bigquery-wait-for-tables
Dec 12, 2022
Merged

fix: BigQuery destination: wait for table migrations to complete#5544
kodiakhq[bot] merged 4 commits intomainfrom
bigquery-wait-for-tables

Conversation

@hermanschaaf
Copy link
Copy Markdown
Contributor

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).

@hermanschaaf hermanschaaf requested review from a team and yevgenypats and removed request for a team December 12, 2022 11:52
@yevgenypats
Copy link
Copy Markdown
Contributor

Nice find. Is there an API in bigquery which can gurantee that when it completes the table is created?

@hermanschaaf
Copy link
Copy Markdown
Contributor Author

Is there an API in bigquery which can gurantee that when it completes the table is created?

@yevgenypats Not as far as I know, or at least I couldn't find anything.

@hermanschaaf hermanschaaf added the automerge Automatically merge once required checks pass label Dec 12, 2022
@kodiakhq kodiakhq bot merged commit 712ee39 into main Dec 12, 2022
@kodiakhq kodiakhq bot deleted the bigquery-wait-for-tables branch December 12, 2022 16:10
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants