-
Notifications
You must be signed in to change notification settings - Fork 23
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
🧹 providers coordinator v2 #3218
Conversation
Signed-off-by: Ivan Milchev <[email protected]>
Signed-off-by: Ivan Milchev <[email protected]>
Signed-off-by: Ivan Milchev <[email protected]>
298e1c7
to
bf90bcd
Compare
Signed-off-by: Ivan Milchev <[email protected]>
Signed-off-by: Ivan Milchev <[email protected]>
@@ -30,13 +36,26 @@ type AssetWithError struct { | |||
|
|||
type DiscoveredAssets struct { | |||
platformIds map[string]struct{} | |||
Assets []*AssetWithRuntime | |||
Errors []*AssetWithError | |||
// Assets []*AssetWithRuntime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this line be removed
RootAssets map[*inventory.Asset]*RootAsset | ||
} | ||
|
||
func (d *DiscoveredAssets) AddRoot(root *inventory.Asset, coordinator providers.Coordinator, runtime *providers.Runtime) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runtime isn't used. is that expected?
log.Debug().Str("asset", discoveredAssets.Assets[0].Asset.Name).Msg("Overriding asset name with --asset-name flag") | ||
discoveredAssets.Assets[0].Asset.Name = invAssets[0].Name | ||
} | ||
// if len(discoveredAssets.Assets) == 1 && invAssets[0].Name != "" && invAssets[0].Name != discoveredAssets.Assets[0].Asset.Name { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented out code
Thank you for taking a stab at this! We are motivated by random provider shutdowns across the system and by supporting multiple scans at the same time. We'll have a separate call to go over a discussion of this, so we will keep this PR as draft until then. |
we are fixing this by getting rid of ephemeral providers and making sure we have a more robust provider management system. Closing this one |
The goal is to allow creating local coordinators with a parent coordinator. The way the code is setup is: