Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error compiling with go workspace #29899

Closed
codeboten opened this issue Dec 14, 2023 · 4 comments
Closed

error compiling with go workspace #29899

codeboten opened this issue Dec 14, 2023 · 4 comments
Labels

Comments

@codeboten
Copy link
Contributor

Component(s)

No response

Describe the issue you're reporting

When enabling go workspaces in the repo (go work init && go work use -r .), compiling otelcontribcol (make otelcontribcol) fails with the following:

cd ./cmd/otelcontribcol && GO111MODULE=on CGO_ENABLED=0 go build -trimpath -o ../../bin/otelcontribcol_linux_arm64 \
        -tags "" .
go: downloading github.com/open-telemetry/opamp-go v0.10.0
go: downloading github.com/oklog/ulid/v2 v2.1.0
go: downloading github.com/oklog/ulid v1.3.1
# github.com/aws/aws-sdk-go-v2/feature/s3/manager
/go/pkg/mod/github.com/aws/aws-sdk-go-v2/feature/s3/[email protected]/download.go:439:27: invalid operation: resp.ContentLength > 0 (mismatched types *int64 and untyped int)
/go/pkg/mod/github.com/aws/aws-sdk-go-v2/feature/s3/[email protected]/download.go:440:19: cannot use resp.ContentLength (variable of type *int64) as int64 value in assignment
/go/pkg/mod/github.com/aws/aws-sdk-go-v2/feature/s3/[email protected]/upload.go:504:25: cannot use out.BucketKeyEnabled (variable of type *bool) as bool value in struct literal
/go/pkg/mod/github.com/aws/aws-sdk-go-v2/feature/s3/[email protected]/upload.go:573:54: invalid operation: a[i].PartNumber < a[j].PartNumber (operator < not defined on pointer)
/go/pkg/mod/github.com/aws/aws-sdk-go-v2/feature/s3/[email protected]/upload.go:642:25: cannot use completeOut.BucketKeyEnabled (variable of type *bool) as bool value in struct literal
/go/pkg/mod/github.com/aws/aws-sdk-go-v2/feature/s3/[email protected]/upload.go:725:15: cannot use c.num (variable of type int32) as *int32 value in struct literal
/go/pkg/mod/github.com/aws/aws-sdk-go-v2/feature/s3/[email protected]/upload.go:737:25: cannot use c.num (variable of type int32) as *int32 value in assignment
make: *** [Makefile:275: otelcontribcol] Error 1
@codeboten codeboten added needs triage New item requiring triage help wanted Extra attention is needed and removed needs triage New item requiring triage labels Dec 14, 2023
@codeboten
Copy link
Contributor Author

i believe the issue is caused by a much newer import of the aws-sdk-go-v2/service/s3 library in the s3provider:

Screenshot 2023-12-14 at 3 55 14 PM

A workaround is to edit go.work to not include confmap/provider/s3provider

@bryan-aguilar
Copy link
Contributor

bryan-aguilar commented Dec 15, 2023

I'm hoping this isn't another aws-sdk-go-v2 breaking change. We recently ran into an issue in our distro with this. aws/aws-sdk-go-v2#2370 (comment)

Fixed with updating dependencies in ADOT distro aws-observability/aws-otel-collector#2524

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label Feb 14, 2024
Copy link
Contributor

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants