-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt at fixing the scan runtime problem. (#1649)
Not necessarily the fix, but an attempt to get a proper solution for this. There are 2 problems I am trying to solve here: 1. Do not rely on two separate `assets` and `runtime` lists to get the scan to work. This will crash if we do not have an equal amount of assets and runtimes. Instead use a private struct to tie those two together 2. Running filters (queries) on a provider uses the currently attached asset, see https://github.com/mondoohq/cnquery/blob/main/providers/runtime.go#L419. At this moment we can only attach one asset, found under `r.Provider.Connection.Asset`. To ensure this works for all discovered assets, we need to make sure there's a proper runtime for each of those assets. This is where I am not sure if this is the right fix as we're now creating a runtime for each asset.
- Loading branch information
1 parent
233b0b4
commit 25b6c12
Showing
1 changed file
with
61 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters