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

🐛 Continue scanning when connect to one asset fails #2081

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Oct 4, 2023

Fixes #2080

@czunker
Copy link
Contributor Author

czunker commented Oct 4, 2023

With cnspec, this now looks like this:

cnspec scan k8s --discover container-images --config ~/workspace/mondoo/sa-edge-default.json                                                                                                                                                          
→ loaded configuration from /home/christian/workspace/mondoo/sa-edge-default.json using source --config
→ using service account credentials
→ discover related assets for 1 asset(s)
x unable to connect to asset error="rpc error: code = Unknown desc = GET https://ghcr.io/v2/mondoohq/mondoo-operator/manifests/sha256-34e4bc26bf44ae1dddab394f5e9449664d6fe3a4.sig: MANIFEST_UNKNOWN: manifest unknown"
→ synchronize assets

 quay.io/jetstack/cert-manager-controller@2642e7f41545      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% score
 quay.io/jetstack/cert-manager-webhook@a3205d026246      
...

@@ -59,7 +59,7 @@ func detectAssets(runtime *Runtime, assetCandidates []*inventory.Asset, upstream
Upstream: upstreamConfig,
})
if err != nil {
return err
Copy link
Member

Choose a reason for hiding this comment

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

shall we at least log the error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had this in a previous version, but then it showed up twice here:

→ discover related assets for 1 asset(s)
x failed to connect to asset error="rpc error: code = Unknown desc = GET https://ghcr.io/v2/mondoohq/mondoo-operator/manifests/sha256-34e4bc26bf44ae1dddab394f5e9449664d6fe3a4.sig: MANIFEST_UNKNOWN: manifest unknown" asset=
x unable to connect to asset error="rpc error: code = Unknown desc = GET https://ghcr.io/v2/mondoohq/mondoo-operator/manifests/sha256-34e4bc26bf44ae1dddab394f5e9449664d6fe3a4.sig: MANIFEST_UNKNOWN: manifest unknown"
→ synchronize assets

So, I removed the logging.

@imilchev imilchev merged commit 1bc7ef5 into main Oct 4, 2023
10 checks passed
@imilchev imilchev deleted the christian/fix_failed_connect branch October 4, 2023 13:25
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scan exits on first error while scanning multiple assets
2 participants