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

v.0.31.0 has an issue with module upgrade #1009

Closed
gowrisankar22 opened this issue Dec 24, 2020 · 4 comments
Closed

v.0.31.0 has an issue with module upgrade #1009

gowrisankar22 opened this issue Dec 24, 2020 · 4 comments
Labels
bug This issue is a bug.

Comments

@gowrisankar22
Copy link

Hello All,

I am unable to upgrade to v.0.31.0

go fmt ./...
go vet ./...
# github.com/aws/aws-sdk-go-v2/ec2imds
../../../go/pkg/mod/github.com/aws/aws-sdk-go-v2/[email protected]/api_client.go:56:29: cannot use "github.com/aws/aws-sdk-go-v2/aws/middleware".AddUserAgentKey("ec2imds") (type func(*"github.com/aws/smithy-go/middleware".Stack) error) as type func(*"github.com/awslabs/smithy-go/middleware".Stack) error in append
../../../go/pkg/mod/github.com/aws/aws-sdk-go-v2/[email protected]/api_client.go:102:21: cannot use cfg.APIOptions (type []func(*"github.com/aws/smithy-go/middleware".Stack) error) as type []func(*"github.com/awslabs/smithy-go/middleware".Stack) error in append
../../../go/pkg/mod/github.com/aws/aws-sdk-go-v2/[email protected]/request_middleware.go:48:48: cannot use stack (type *"github.com/awslabs/smithy-go/middleware".Stack) as type *"github.com/aws/smithy-go/middleware".Stack in argument to "github.com/aws/aws-sdk-go-v2/aws/middleware".AddUserAgentKey(ServiceID)
../../../go/pkg/mod/github.com/aws/aws-sdk-go-v2/[email protected]/request_middleware.go:87:34: cannot use stack (type *"github.com/awslabs/smithy-go/middleware".Stack) as type *"github.com/aws/smithy-go/middleware".Stack in argument to retry.AddRetryMiddlewares
make: *** [vet] Error 2
go get -u github.com/aws/aws-sdk-go-v2/ec2imds                                                                      8s
go: github.com/aws/aws-sdk-go-v2 upgrade => v0.31.0
go: github.com/awslabs/smithy-go upgrade => v0.5.0
go get: github.com/awslabs/[email protected] updating to
	github.com/awslabs/[email protected]: parsing go.mod:
	module declares its path as: github.com/aws/smithy-go
	        but was required as: github.com/awslabs/smithy-go
@gowrisankar22 gowrisankar22 added the bug This issue is a bug. label Dec 24, 2020
@gowrisankar22
Copy link
Author

Fixed..

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@shogo82148
Copy link
Contributor

A memo for who have same issue.

it is a breaking change of https://github.com/aws/aws-sdk-go-v2/releases/tag/v0.31.0

The module ec2imds moved to feature/ec2/imds path (#984)

So, I needed to change the import path.

-import "github.com/aws/aws-sdk-go-v2/ec2imds"
+import "github.com/aws/aws-sdk-go-v2/feature/ec2/imds"

@stevefchambers
Copy link

stevefchambers commented Jan 3, 2021

Upgraded to 0.31.0 from 0.30.0, ran into the following issue, not seen in 0.30.0

Can't run linter goanalysis_metalinter: bodyclose:
failed prerequisites:
analysis skipped:

could not import github.com/aws/aws-sdk-go-v2/config (/Users/user/go/pkg/mod/github.com/aws/aws-sdk-go-v2/[email protected]/provider.go:9:2: could not import github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds (/Users/user/go/pkg/mod/github.com/aws/aws-sdk-go-v2/[email protected]/ec2rolecreds/provider.go:13:2:
could not import github.com/aws/aws-sdk-go-v2/ec2imds (/Users/user/go/pkg/mod/github.com/aws/aws-sdk-go-v2/[email protected]/api_client.go:57:3: cannot use awsmiddleware.AddUserAgentKey("ec2imds") (value of type func("github.com/aws/smithy-go/middleware".Stack) error) as func("github.com/awslabs/smithy-go/middleware".Stack) error value in argument to append)))]]"

failed to load package ec2imds: could not load export data: no export data for "github.com/aws/aws-sdk-go-v2/ec2imds""
failed to load package ec2imds: could not load export data: no export data for "github.com/aws/aws-sdk-go-v2/ec2imds""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants