Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev committed Mar 7, 2024
1 parent 774ac30 commit 023880f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion explorer/scan/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func prepareAsset(a *inventory.Asset, rootAsset *inventory.Asset, runtimeLabels
a.AddAnnotations(rootAsset.GetAnnotations())
a.ManagedBy = rootAsset.ManagedBy
if platform := a.GetPlatform(); platform != nil {
a.KindString = a.GetPlatform().Kind
a.KindString = platform.Kind
}
if a.Labels == nil {
a.Labels = map[string]string{}
Expand Down
2 changes: 1 addition & 1 deletion explorer/scan/local_scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ func (s *LocalScanner) distributeJob(job *Job, ctx context.Context, upstream *up

assetBatches := slicesx.Batch(discoveredAssets.Assets, 100)
for i := range assetBatches {
log.Info().Msg("synchronize assets")
batch := assetBatches[i]

// sync assets
Expand All @@ -277,6 +276,7 @@ func (s *LocalScanner) distributeJob(job *Job, ctx context.Context, upstream *up
assetsToSync = append(assetsToSync, batch[i].Asset)
}

log.Info().Msg("synchronize assets")
resp, err := services.SynchronizeAssets(ctx, &explorer.SynchronizeAssetsReq{
SpaceMrn: spaceMrn,
List: assetsToSync,
Expand Down
2 changes: 1 addition & 1 deletion providers-sdk/v1/inventory/inventory.proto
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ message Config {
string platform_id = 26;
repeated string capabilities = 29;
// Determines whether to delay discovery during the connection phase.
// Discovery will only happen if this is false
// Discovery will only happen if Connect is called and this is false
bool delay_discovery = 31;
}

Expand Down
2 changes: 1 addition & 1 deletion providers/os/connection/container/image_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
// NewImageConnection uses a container image reference as input and creates a tar connection
func NewImageConnection(id uint32, conf *inventory.Config, asset *inventory.Asset, img v1.Image) (*tar.Connection, error) {
// FIXME: DEPRECATED, remove in v12.0 vv
// The SkipDiscovery flag should always be set from v12
// The DelayDiscovery flag should always be set from v12
if conf.Options == nil || conf.Options[plugin.DISABLE_DELAYED_DISCOVERY_OPTION] == "" {
conf.DelayDiscovery = true // Delay discovery, to make sure we don't directly download the image
}
Expand Down
4 changes: 2 additions & 2 deletions providers/os/connection/docker/container_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func NewDockerEngineContainer(id uint32, conf *inventory.Config, asset *inventor
conn.Metadata.Name = containerid.ShortContainerImageID(ci.ID)
conn.Metadata.Labels = ci.Labels
// FIXME: DEPRECATED, remove in v12.0 vv
// The SkipDiscovery flag should always be set from v12
// The DelayDiscovery flag should always be set from v12
if conf.Options == nil || conf.Options[plugin.DISABLE_DELAYED_DISCOVERY_OPTION] == "" {
conf.DelayDiscovery = true // Delay discovery, to make sure we don't directly download the image
}
Expand Down Expand Up @@ -302,7 +302,7 @@ func NewContainerImageConnection(id uint32, conf *inventory.Config, asset *inven
}
conf.Options[tar.OPTION_FILE] = filename
// FIXME: DEPRECATED, remove in v12.0 vv
// The SkipDiscovery flag should always be set from v12
// The DelayDiscovery flag should always be set from v12
if conf.Options == nil || conf.Options[plugin.DISABLE_DELAYED_DISCOVERY_OPTION] == "" {
conf.DelayDiscovery = true // Delay discovery, to make sure we don't directly download the image
}
Expand Down

0 comments on commit 023880f

Please sign in to comment.