Skip to content

Commit

Permalink
component: remove classic module.* components
Browse files Browse the repository at this point in the history
Remove the deprecated classic module.* components. The files have been
moved to testcomponents/ as there are still valuable tests that depend
on them; these can be removed in the future.
  • Loading branch information
rfratto committed Mar 1, 2024
1 parent f7e3998 commit 0fba35c
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 11 deletions.
4 changes: 0 additions & 4 deletions internal/component/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ import (
_ "github.com/grafana/agent/internal/component/loki/source/windowsevent" // Import loki.source.windowsevent
_ "github.com/grafana/agent/internal/component/loki/write" // Import loki.write
_ "github.com/grafana/agent/internal/component/mimir/rules/kubernetes" // Import mimir.rules.kubernetes
_ "github.com/grafana/agent/internal/component/module/file" // Import module.file
_ "github.com/grafana/agent/internal/component/module/git" // Import module.git
_ "github.com/grafana/agent/internal/component/module/http" // Import module.http
_ "github.com/grafana/agent/internal/component/module/string" // Import module.string
_ "github.com/grafana/agent/internal/component/otelcol/auth/basic" // Import otelcol.auth.basic
_ "github.com/grafana/agent/internal/component/otelcol/auth/bearer" // Import otelcol.auth.bearer
_ "github.com/grafana/agent/internal/component/otelcol/auth/headers" // Import otelcol.auth.headers
Expand Down
2 changes: 1 addition & 1 deletion internal/flow/componenttest/testfailmodule.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"

"github.com/grafana/agent/internal/component"
mod "github.com/grafana/agent/internal/component/module"
"github.com/grafana/agent/internal/featuregate"
mod "github.com/grafana/agent/internal/flow/internal/testcomponents/module"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion internal/flow/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/stretchr/testify/require"
"golang.org/x/tools/txtar"

_ "github.com/grafana/agent/internal/component/module/string"
_ "github.com/grafana/agent/internal/flow/internal/testcomponents/module/string"
)

// The tests are using the .txtar files stored in the testdata folder.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/grafana/agent/internal/component"
"github.com/grafana/agent/internal/component/local/file"
"github.com/grafana/agent/internal/component/module"
"github.com/grafana/agent/internal/featuregate"
"github.com/grafana/agent/internal/flow/internal/testcomponents/module"
"github.com/grafana/river/rivertypes"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

"github.com/go-kit/log"
"github.com/grafana/agent/internal/component"
"github.com/grafana/agent/internal/component/module"
"github.com/grafana/agent/internal/featuregate"
"github.com/grafana/agent/internal/flow/internal/testcomponents/module"
"github.com/grafana/agent/internal/flow/logging/level"
"github.com/grafana/agent/internal/vcs"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"go.uber.org/atomic"

"github.com/grafana/agent/internal/component"
"github.com/grafana/agent/internal/component/module"
remote_http "github.com/grafana/agent/internal/component/remote/http"
"github.com/grafana/agent/internal/featuregate"
"github.com/grafana/agent/internal/flow/internal/testcomponents/module"
"github.com/grafana/river/rivertypes"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"

"github.com/grafana/agent/internal/component"
"github.com/grafana/agent/internal/component/module"
"github.com/grafana/agent/internal/featuregate"
"github.com/grafana/agent/internal/flow/internal/testcomponents/module"
"github.com/grafana/river/rivertypes"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/flow/module_eval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/stretchr/testify/require"
"go.uber.org/goleak"

_ "github.com/grafana/agent/internal/component/module/string"
_ "github.com/grafana/agent/internal/flow/internal/testcomponents/module/string"
)

func TestUpdates_EmptyModule(t *testing.T) {
Expand Down

0 comments on commit 0fba35c

Please sign in to comment.