Skip to content

fix: Don't call Tables gRPC method at the beginning of the sync#21180

Merged
kodiakhq[bot] merged 5 commits intomainfrom
fix/dont_call_tables
Jul 30, 2025
Merged

fix: Don't call Tables gRPC method at the beginning of the sync#21180
kodiakhq[bot] merged 5 commits intomainfrom
fix/dont_call_tables

Conversation

@erezrokah
Copy link
Copy Markdown
Member

Summary

Since this PR https://github.com/cloudquery/cloudquery/pull/20909/files the S3 source plugin fails to sync and result in the following error failed to get tables: tables only discovered during sync.

The reason is that the S3 source dynamically discovers all files/tables during the sync, and errors out if you call the tables endpoint before the sync is done, see https://github.com/cloudquery/cloudquery-private/blob/334760529da4815dc83659c7f529154682b2c8a0/plugins/source/s3/resources/plugin/client.go#L91

Instead of calling the tables endpoint we can keep track of the tables during the sync. This works even if you pass --no-migrate since we skip those a bit after the new code

if noMigrate {

@erezrokah erezrokah requested a review from a team as a code owner July 30, 2025 09:55
@erezrokah erezrokah requested a review from stoovon July 30, 2025 09:55
return err
}
// Pre init stats per table
for _, table := range sourceTables {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We don't really need the init code as Go Zero value gives us the same functionality

@erezrokah erezrokah requested review from murarustefaan and removed request for stoovon July 30, 2025 09:56
@erezrokah erezrokah added the automerge Automatically merge once required checks pass label Jul 30, 2025
@kodiakhq kodiakhq bot merged commit 9510f5e into main Jul 30, 2025
18 checks passed
@kodiakhq kodiakhq bot deleted the fix/dont_call_tables branch July 30, 2025 11:14
kodiakhq bot pushed a commit that referenced this pull request Jul 30, 2025
🤖 I have created a release *beep* *boop*
---


## [6.26.1](cli-v6.26.0...cli-v6.26.1) (2025-07-30)


### Bug Fixes

* Don't call Tables gRPC method at the beginning of the sync ([#21180](#21180)) ([9510f5e](9510f5e))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli automerge Automatically merge once required checks pass priority merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants