Skip to content

Commit

Permalink
[chore] re-enable impi (open-telemetry#13376)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>

Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu committed Aug 16, 2022
1 parent 8c173f6 commit ebdb228
Show file tree
Hide file tree
Showing 49 changed files with 57 additions and 95 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
run: make checkdoc
- name: Porto
run: |
make goporto
make -j2 goporto
git diff --exit-code || (echo 'Porto links are out of date, please run "make goporto" and commit the changes in this PR.' && exit 1)
- name: Check for go mod dependency changes
run: |
Expand All @@ -151,6 +151,9 @@ jobs:
run: |
make generate
git diff --exit-code ':!*go.sum' || (echo 'Generated code is out of date, please run "make generate" and commit the changes in this PR.' && exit 1)
- name: Impi
run: |
make -j2 goimpi
- name: MultimodVerify
run: make multimod-verify
unittest-matrix:
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ gofmt:
golint:
$(MAKE) $(FOR_GROUP_TARGET) TARGET="lint"

.PHONY: goimpi
goimpi:
@$(MAKE) $(FOR_GROUP_TARGET) TARGET="impi"

.PHONY: goporto
goporto:
porto -w --include-internal --skip-dirs "^cmd$$" ./
Expand Down
4 changes: 2 additions & 2 deletions Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fmt:
goimports -w -local github.com/open-telemetry/opentelemetry-collector-contrib ./

.PHONY: lint
lint: checklicense impi misspell
lint: checklicense misspell
$(LINT) run --allow-parallel-runners

.PHONY: tidy
Expand All @@ -127,7 +127,7 @@ misspell-correction:

.PHONY: impi
impi:
@$(IMPI) --local github.com/open-telemetry/opentelemetry-collector-contrib --scheme stdThirdPartyLocal $(ALL_PKGS)
@$(IMPI) --local github.com/open-telemetry/opentelemetry-collector-contrib --scheme stdThirdPartyLocal ./...

.PHONY: moddownload
moddownload:
Expand Down
3 changes: 1 addition & 2 deletions cmd/tracegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ import (
"fmt"
"time"

"go.opentelemetry.io/otel/attribute"

grpcZap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import (

"github.com/DataDog/datadog-agent/pkg/otlp/model/source"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure"
)

var _ source.Provider = (*Provider)(nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ import (
"testing"

"github.com/DataDog/datadog-agent/pkg/otlp/model/source"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure"
)

func TestProvider(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ import (
"github.com/aws/aws-sdk-go/service/ec2"
"go.uber.org/zap"

ec2provider "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider"
ec2provider "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

"github.com/DataDog/datadog-agent/pkg/otlp/model/source"

"github.com/stretchr/testify/assert"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"testing"

"github.com/DataDog/datadog-agent/pkg/otlp/model/source"

"github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ package gohai
import (
"testing"

"go.uber.org/zap"

"github.com/stretchr/testify/assert"
"go.uber.org/zap"
)

func TestGetPayload(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ import (
"testing"

"github.com/DataDog/datadog-agent/pkg/otlp/model/source"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider"

"github.com/stretchr/testify/assert"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider"
)

var _ provider.ClusterNameProvider = (*StringProvider)(nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"sync"

"github.com/DataDog/datadog-agent/pkg/otlp/model/source"

"go.uber.org/zap"
)

Expand Down
3 changes: 1 addition & 2 deletions exporter/datadogexporter/traces_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"sync"
"time"

"github.com/DataDog/datadog-agent/pkg/otlp/model/source"
"github.com/DataDog/datadog-agent/pkg/trace/agent"
traceconfig "github.com/DataDog/datadog-agent/pkg/trace/config"
tracelog "github.com/DataDog/datadog-agent/pkg/trace/log"
Expand All @@ -32,8 +33,6 @@ import (
"go.uber.org/zap"
"gopkg.in/zorkian/go-datadog-api.v2"

"github.com/DataDog/datadog-agent/pkg/otlp/model/source"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics"
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/scrub"
Expand Down
3 changes: 1 addition & 2 deletions exporter/dynatraceexporter/internal/serialization/gauge.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ package serialization // import "github.com/open-telemetry/opentelemetry-collect
import (
"fmt"

"go.uber.org/zap"

dtMetric "github.com/dynatrace-oss/dynatrace-metric-utils-go/metric"
"github.com/dynatrace-oss/dynatrace-metric-utils-go/metric/dimensions"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.uber.org/zap"
)

func serializeGaugePoint(name, prefix string, dims dimensions.NormalizedDimensionList, dp pmetric.NumberDataPoint) (string, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ import (
"testing"
"time"

"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"github.com/dynatrace-oss/dynatrace-metric-utils-go/metric/dimensions"
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"
)

func Test_serializeGaugePoint(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
package serialization // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter/internal/serialization"

import (
"go.uber.org/zap"

dtMetric "github.com/dynatrace-oss/dynatrace-metric-utils-go/metric"
"github.com/dynatrace-oss/dynatrace-metric-utils-go/metric/dimensions"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.uber.org/zap"
)

func serializeHistogramPoint(name, prefix string, dims dimensions.NormalizedDimensionList, dp pmetric.HistogramDataPoint) (string, error) {
Expand Down
3 changes: 1 addition & 2 deletions exporter/dynatraceexporter/internal/serialization/sum.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ package serialization // import "github.com/open-telemetry/opentelemetry-collect
import (
"fmt"

"go.uber.org/zap"

dtMetric "github.com/dynatrace-oss/dynatrace-metric-utils-go/metric"
"github.com/dynatrace-oss/dynatrace-metric-utils-go/metric/dimensions"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/ttlmap"
)
Expand Down
5 changes: 2 additions & 3 deletions exporter/dynatraceexporter/internal/serialization/sum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ import (
"testing"
"time"

"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"github.com/dynatrace-oss/dynatrace-metric-utils-go/metric/dimensions"
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/ttlmap"
)
Expand Down
7 changes: 3 additions & 4 deletions exporter/logzioexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ import (
"testing"
"time"

"go.opentelemetry.io/collector/config/configcompression"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/exporter/exporterhelper"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/config/configcompression"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/exporter/exporterhelper"
"go.opentelemetry.io/collector/service/servicetest"
)

Expand Down
3 changes: 1 addition & 2 deletions exporter/logzioexporter/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ import (
"path/filepath"
"testing"

"go.opentelemetry.io/collector/config/confighttp"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/config/confighttp"
"go.opentelemetry.io/collector/config/configtest"
"go.opentelemetry.io/collector/service/servicetest"
)
Expand Down
4 changes: 2 additions & 2 deletions extension/headerssetter/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
"fmt"
"net/http"

"github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetter/internal/source"

"go.opentelemetry.io/collector/config/configauth"
"google.golang.org/grpc/credentials"

"github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetter/internal/source"
)

type Header struct {
Expand Down
5 changes: 2 additions & 3 deletions extension/jaegerremotesampling/internal/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ import (
"github.com/jaegertracing/jaeger/cmd/collector/app/sampling"
"github.com/jaegertracing/jaeger/cmd/collector/app/sampling/strategystore"
"github.com/jaegertracing/jaeger/proto-gen/api_v2"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configgrpc"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/health"
"google.golang.org/grpc/health/grpc_health_v1"
"google.golang.org/grpc/reflection"

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/config/configgrpc"
)

var _ component.Component = (*SamplingGRPCServer)(nil)
Expand Down
1 change: 0 additions & 1 deletion extension/jaegerremotesampling/internal/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config/configgrpc"
"go.opentelemetry.io/collector/config/confignet"
Expand Down
4 changes: 2 additions & 2 deletions pkg/stanza/fileconsumer/reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"testing"
"time"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil"

"github.com/stretchr/testify/require"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil"
)

func TestTokenization(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/stanza/operator/input/tcp/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ import (
"sync"
"time"

"go.opentelemetry.io/collector/config/configtls"

"github.com/jpillora/backoff"
"go.opentelemetry.io/collector/config/configtls"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator"
Expand Down
4 changes: 1 addition & 3 deletions pkg/stanza/testutil/operator.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions processor/attributesprocessor/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ import (
"path/filepath"
"testing"

"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/processor/filterconfig"
Expand Down
3 changes: 1 addition & 2 deletions processor/cumulativetodeltaprocessor/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ import (
"testing"
"time"

"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/processor/filterset"
)
Expand Down
5 changes: 2 additions & 3 deletions processor/cumulativetodeltaprocessor/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ import (
"path/filepath"
"testing"

"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/config/configtest"
"go.opentelemetry.io/collector/confmap/confmaptest"
"go.opentelemetry.io/collector/consumer/consumertest"
)

Expand Down
3 changes: 1 addition & 2 deletions processor/deltatorateprocessor/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ import (
"path/filepath"
"testing"

"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/confmap/confmaptest"
)

func TestLoadConfig(t *testing.T) {
Expand Down
Loading

0 comments on commit ebdb228

Please sign in to comment.