Skip to content

bug: --log-console is broken on CLI version v5.20.4 #18160

@erezrokah

Description

@erezrokah

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Using --log-console exits with an error Error All attempts fail:\n#1: failed to copy body to file ... write /dev/stdout: file already closed

Expected Behavior

Not error and CLI command works

CloudQuery (redacted) config

kind: source
spec:
  name: "gcp"
  path: "cloudquery/gcp"
  version: "v14.0.0"
  destinations: ["postgresql"]
  tables: ["*"]
---
kind: destination
spec:
  name: "postgresql"
  path: "cloudquery/postgresql"
  version: "v8.0.4"
  migrate_mode: "forced"
  spec:
    connection_string: "postgresql://postgres:pass@localhost:5432/postgres?sslmode=disable"

Steps To Reproduce

  1. cloudquery plugin install spec.yml --log-console

With the spec.yml above

CloudQuery (redacted) logs

2024-06-06T08:15:06Z INF Loading spec(s) args=["examples/gcp-postgres.yml"] invocation-id=a21036eb-2856-4d1e-8ae7-91fbbd532a31 module=cli
Error: failed to download plugin: failed downloading URL "https://assets.cloudquery.io/cq-cloud-releases/cloudquery/source/gcp/v14.0.0/darwin_arm64". Error All attempts fail:
#1: failed to copy body to file .cq/plugins/source/cloudquery/gcp/v14.0.0/plugin.zip: write /dev/stdout: file already closed
2024-06-06T08:15:07Z ERR exiting with error error="failed to download plugin: failed downloading URL \"https://assets.cloudquery.io/cq-cloud-releases/cloudquery/source/gcp/v14.0.0/darwin_arm64". Error All attempts fail:\n#1: failed to copy body to file .cq/plugins/source/cloudquery/gcp/v14.0.0/plugin.zip: write /dev/stdout: file already closed" invocation-id=a21036eb-2856-4d1e-8ae7-91fbbd532a31 module=cli

CloudQuery version

v5.20.4

Additional Context

Could be related to cloudquery/plugin-pb-go#332 or cloudquery/plugin-pb-go#330

Pull request (optional)

  • I can submit a pull request

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions