Skip to content

typecheck error: resourcedetectionprocessor #42895

@mjnowen

Description

@mjnowen

Component(s)

processor/resourcedetection

What happened?

Description

"golangci-lint" reports the following typecheck error:

<redacted>/components.go:33:2: could not import github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor (/home/ubuntu/go/pkg/mod/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor@v0.136.0/config.go:23:2: could not import github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor/internal/k8snode (/home/ubuntu/go/pkg/mod/github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor@v0.136.0/internal/k8snode/config.go:10:2: could not import github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig (/home/ubuntu/go/pkg/mod/github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig@v0.136.0/config.go:15:17: could not import github.com/openshift/client-go/quota/clientset/versioned (/home/ubuntu/go/pkg/mod/github.com/openshift/client-go@v0.0.0-20250922201106-dd37bfd2e597/quota/clientset/versioned/clientset.go:9:10: could not import github.com/openshift/client-go/quota/clientset/versioned/typed/quota/v1 (/home/ubuntu/go/pkg/mod/github.com/openshift/client-go@v0.0.0-20250922201106-dd37bfd2e597/quota/clientset/versioned/typed/quota/v1/clusterresourcequota.go:9:29: could not import github.com/openshift/client-go/quota/applyconfigurations/quota/v1 (-: # github.com/openshift/client-go/quota/applyconfigurations/quota/v1
/home/ubuntu/go/pkg/mod/github.com/openshift/client-go@v0.0.0-20250922201106-dd37bfd2e597/quota/applyconfigurations/quota/v1/clusterresourcequota.go:57:57: cannot use internal.Parser().Type("com.github.openshift.api.quota.v1.ClusterResourceQuota") (value of struct type "sigs.k8s.io/structured-merge-diff/v4/typed".ParseableType) as "sigs.k8s.io/structured-merge-diff/v6/typed".ParseableType value in argument to managedfields.ExtractInto)))))) (typecheck)
        "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor"

Steps to Reproduce

Execute:

~/go/bin/golangci-lint run --color always --verbose

Expected Result

No typecheck error when I run golangci-lint on my golang project

Actual Result

Collector version

v0.136.0

Environment information

Environment

OS: Ubuntu 24.04
Compiler(if manually compiled): go 1.25.1

OpenTelemetry Collector configuration

Log output

Additional context

Previously this typecheck error was being disguised by another issue in golangci-lint, which has just been fixed as of golangci-lint release a few days ago: v2.5.0. More background here: #41402

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions