Skip to content

Commit

Permalink
Consider nil tag processor in wmeta collector for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gabedos committed Jan 10, 2025
1 parent aaecb0a commit 8530b0e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 243 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@
/pkg/util/kubernetes/ @DataDog/container-integrations @DataDog/container-platform @DataDog/container-app
/pkg/util/podman/ @DataDog/container-integrations
/pkg/util/prometheus @DataDog/container-integrations
/pkg/util/tags/ @DataDog/container-platform
/pkg/util/trivy/ @DataDog/container-integrations @DataDog/agent-security
/pkg/util/uuid/ @DataDog/agent-shared-components
/pkg/util/cgroups/ @DataDog/container-integrations
Expand Down
4 changes: 3 additions & 1 deletion comp/core/tagger/collectors/workloadmeta_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ func NewWorkloadMetaCollector(ctx context.Context, cfg config.Component, store w
c.initK8sResourcesMetaAsTags(metadataAsTags.GetResourcesLabelsAsTags(), metadataAsTags.GetResourcesAnnotationsAsTags())

// initializes with the static global tags
c.collectStaticGlobalTags(ctx, cfg)
if c.tagProcessor != nil {
c.collectStaticGlobalTags(ctx, cfg)
}

return c
}
Expand Down
3 changes: 3 additions & 0 deletions comp/dogstatsd/server/server_util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func fulfillDepsWithConfigOverride(t testing.TB, overrides map[string]interface{
demultiplexerimpl.FakeSamplerMockModule(),
workloadmetafxmock.MockModule(workloadmeta.NewParams()),
taggermock.Module(),
fx.Provide(func(mock taggermock.Mock) tagger.Component { return mock }),
Module(Params{Serverless: false}),
))
}
Expand All @@ -108,6 +109,7 @@ func fulfillDepsWithConfigYaml(t testing.TB, yaml string) serverDeps {
demultiplexerimpl.FakeSamplerMockModule(),
workloadmetafxmock.MockModule(workloadmeta.NewParams()),
taggermock.Module(),
fx.Provide(func(mock taggermock.Mock) tagger.Component { return mock }),
Module(Params{Serverless: false}),
))
}
Expand All @@ -128,6 +130,7 @@ func fulfillDepsWithInactiveServer(t *testing.T, cfg map[string]interface{}) (de
demultiplexerimpl.FakeSamplerMockModule(),
workloadmetafxmock.MockModule(workloadmeta.NewParams()),
taggermock.Module(),
fx.Provide(func(mock taggermock.Mock) tagger.Component { return mock }),
))

s := newServerCompat(deps.Config, deps.Log, deps.Replay, deps.Debug, false, deps.Demultiplexer, deps.WMeta, deps.PidMap, deps.Telemetry, deps.Tagger)
Expand Down
117 changes: 0 additions & 117 deletions pkg/util/tags/static_tags.go

This file was deleted.

124 changes: 0 additions & 124 deletions pkg/util/tags/static_tags_test.go

This file was deleted.

0 comments on commit 8530b0e

Please sign in to comment.