Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cnquery does not fetch providers based on connection #1658

Closed
czunker opened this issue Sep 7, 2023 · 3 comments
Closed

cnquery does not fetch providers based on connection #1658

czunker opened this issue Sep 7, 2023 · 3 comments
Labels
bug Something isn't working v9
Milestone

Comments

@czunker
Copy link
Contributor

czunker commented Sep 7, 2023

Describe the bug
Running this results in the help message:

cnquery run container registry gcr.io/mondoo-dev-262313/ubuntu -c "asset{ name platform ids kind runtime title }"
Run an MQL query on the CLI and displays its results.

Usage:
  cnquery run [command]

Available Commands:
  arista           Run a query with Arista EOS
...

I did not have the os provider installed, which this connection is part of.

When I manually add the os provider, all is fine again.

The same happens, when using the local connection.

To Reproduce
Steps to reproduce the behavior:

  1. Remove local os proivder
  2. Run above command
  3. Note the help message

Expected behavior
I'd expect cnquery to automatically load the needed provider.

@czunker czunker added bug Something isn't working v9 labels Sep 7, 2023
@czunker czunker added this to the v9 milestone Sep 7, 2023
@czunker
Copy link
Contributor Author

czunker commented Sep 11, 2023

Should be fixed by #1668. Needs. a re-test.

@czunker
Copy link
Contributor Author

czunker commented Sep 11, 2023

No, still get the same result:

cnquery run container registry gcr.io/mondoo-dev-262313/ubuntu -c "asset{ name platform ids kind runtime title }"                           ✔ │ 06:47:39 
Run an MQL query on the CLI and displays its results.

Usage:
  cnquery run [command]

Available Commands:
  arista           Run a query with Arista EOS
...

@czunker
Copy link
Contributor Author

czunker commented Sep 18, 2023

Fixed now:

cnquery run container registry gcr.io/mondoo-dev-262313/ubuntu -c "asset{ name platform ids kind runtime title }"                            ✔ │ 11:17:12 
→ loaded configuration from /etc/opt/mondoo/mondoo.yml using source default
asset: {
  kind: "container-image"
  title: "Ubuntu 19.04, Docker Image"
  platform: "ubuntu"
  runtime: "docker-image"
  ids: [
    0: "//platformid.api.mondoo.app/runtime/docker/images/61844ceb1dd55aa110ca578bd4a042200bc64bb5d702c9a19b9fb90409565da0"
  ]
  name: "gcr.io/mondoo-dev-262313/ubuntu@61844ceb1dd5"
}
asset: {
  kind: "container-image"
  title: "Ubuntu 18.04.4 LTS, Docker Image"
  platform: "ubuntu"
  runtime: "docker-image"
  ids: [
    0: "//platformid.api.mondoo.app/runtime/docker/images/e5dd9dbb37df5b731a6688fa49f4003359f6f126958c9c928f937bec69836320"
  ]
  name: "gcr.io/mondoo-dev-262313/ubuntu@e5dd9dbb37df"
}
...

Used latest main.

@czunker czunker closed this as completed Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v9
Projects
None yet
Development

No branches or pull requests

1 participant