Skip to content

feat: Provide better error when someone runs sync --no-migrate and there are no tables #5152

@erezrokah

Description

@erezrokah

Extracted from https://github.com/cloudquery/cloudquery/discussions/5150

When someones runs CloudQuery for the first time (without an initialized database) and uses the --no-migrate flag they get the following error:

Error: failed to write for aws->local-sqlite: failed to call Write2.Send: EOF

Config to reproduce:

kind: source
spec:
  name: aws
  path: "cloudquery/aws"
  version: "v7.2.2"
  destinations: ["local-sqlite"]
---
kind: destination
spec:
  name: "local-sqlite"
  path: "cloudquery/sqlite"
  version: "v1.0.9"
  spec:
    connection_string: "local.sql"

We should provide a better error message in this case to let the user know that migration is required to bootstrap the database

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions