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

Undefined endpoints.MapFIPSRegion in ssooidc/endpoints.go #2386

Closed
digitalandrew opened this issue Nov 21, 2023 · 7 comments
Closed

Undefined endpoints.MapFIPSRegion in ssooidc/endpoints.go #2386

digitalandrew opened this issue Nov 21, 2023 · 7 comments
Labels
closed-for-staleness guidance Question that needs advice or information.

Comments

@digitalandrew
Copy link

Describe the bug

After the large recent update to the sdk-go-v2 module builds importing the module have been failing with the error:

external/com_github_aws_aws_sdk_go_v2_service_sso/endpoints.go:464:39: undefined: endpoints.MapFIPSRegion

Based on @lucix-aws suggestion I have checked to roll ahead all of the dependencies and am still facing the issue. If I roll back the sdk packages to previous versions the builds work.

Expected Behavior

Able to build Go application using the external packages without error.

Current Behavior

Trying to use the most up to date aws-sdk-go-v2 packages breaks builds with error:

external/com_github_aws_aws_sdk_go_v2_service_sso/endpoints.go:464:39: undefined: endpoints.MapFIPSRegion

Reproduction Steps

Create a simple go application that uses the packages listed below and try to build.

Possible Solution

No response

Additional Information/Context

These versions of SDK modules do not fail to build:

require (
github.com/aws/aws-sdk-go-v2 v1.22.2
github.com/aws/aws-sdk-go-v2/config v1.19.1
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.12.1
github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression v1.6.1
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.25.1
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.21.6
)

require (
github.com/aws/aws-sdk-go-v2/credentials v1.13.43 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.2 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.17.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.8.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect
github.com/aws/smithy-go v1.16.0 // indirect
)

AWS Go SDK V2 Module Versions Used

require (
github.com/aws/aws-sdk-go-v2 v1.23.1
github.com/aws/aws-sdk-go-v2/config v1.25.5
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.12.3
github.com/aws/aws-sdk-go-v2/feature/dynamodb/expression v1.6.3
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.25.3
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.23.3
)

require (
github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect
github.com/aws/smithy-go v1.17.0 // indirect
)

Compiler and Version used

go1.20.5 linux/amd64

Operating System and version

linux 5.15.49-linuxkit

@digitalandrew digitalandrew added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 21, 2023
@lucix-aws lucix-aws added guidance Question that needs advice or information. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 21, 2023
@lucix-aws
Copy link
Contributor

I'm unable to reproduce this. The only thing I can do is advise you to potentially clear your go module cache. MAPFIPSRegion is definitively present in the source of the aws-sdk-go-v2 module at v1.23.1, which is what you're depending on.

@lucix-aws lucix-aws added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Nov 21, 2023
Copy link

This issue has not received a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Nov 24, 2023
@lucix-aws lucix-aws removed response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. closing-soon This issue will automatically close in 4 days unless further comments are made. labels Nov 28, 2023
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.

@DonghanYang
Copy link

DonghanYang commented Nov 30, 2023

I am also seeing this issue

INFO: Analyzed target //:gazelle (0 packages loaded, 470 targets configured).
INFO: Found 1 target...
Aspect @mypy_integration//:mypy.bzl%mypy_aspect of //:gazelle up-to-date (nothing to build)
INFO: Elapsed time: 1.320s, Critical Path: 0.07s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
INFO: Analyzed 245 targets (0 packages loaded, 0 targets configured).
INFO: Found 175 targets and 70 test targets...
ERROR: /private/var/tmp/_bazel_donghan/8ffa4d0170f667e2a6400bf9e628c151/external/com_github_aws_aws_sdk_go_v2_service_sso/BUILD.bazel:5:11: GoCompilePkg external/com_github_aws_aws_sdk_go_v2_service_sso/sso.a failed: (Exit 1): builder failed: error executing command bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix darwin_amd64 -src external/com_github_aws_aws_sdk_go_v2_service_sso/api_client.go -src ... (remaining 93 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
external/com_github_aws_aws_sdk_go_v2_service_sso/endpoints.go:464:39: undefined: endpoints.MapFIPSRegion
compilepkg: error running subcommand external/go_sdk/pkg/tool/darwin_amd64/compile: exit status 2
ERROR: /private/var/tmp/_bazel_donghan/8ffa4d0170f667e2a6400bf9e628c151/external/com_github_aws_aws_sdk_go_v2_service_ssooidc/BUILD.bazel:5:11: GoCompilePkg external/com_github_aws_aws_sdk_go_v2_service_ssooidc/ssooidc.a failed: (Exit 1): builder failed: error executing command bazel-out/darwin-opt-exec-2B5CBBC6/bin/external/go_sdk/builder compilepkg -sdk external/go_sdk -installsuffix darwin_amd64 -src external/com_github_aws_aws_sdk_go_v2_service_ssooidc/api_client.go -src ... (remaining 95 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox
external/com_github_aws_aws_sdk_go_v2_service_ssooidc/endpoints.go:464:39: undefined: endpoints.MapFIPSRegion
compilepkg: error running subcommand external/go_sdk/pkg/tool/darwin_amd64/compile: exit status 2
INFO: Elapsed time: 1.694s, Critical Path: 1.30s
INFO: 16 processes: 12 internal, 4 processwrapper-sandbox.
FAILED: Build did NOT complete successfully
go 1.19

require (
	github.com/aws/aws-sdk-go-v2 v1.23.4
	github.com/aws/aws-sdk-go-v2/config v1.25.10
	github.com/aws/aws-sdk-go-v2/service/ec2 v1.138.1
	github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.26.1
	github.com/aws/aws-sdk-go-v2/service/kms v1.27.1
	github.com/aws/aws-sdk-go-v2/service/opensearch v1.26.1
	github.com/aws/aws-sdk-go-v2/service/rds v1.64.1
	github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1
	github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.25.1
	github.com/aws/aws-sdk-go-v2/service/sqs v1.29.1
)

require (
	github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 // indirect
	github.com/aws/aws-sdk-go-v2/credentials v1.16.8 // indirect
	github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect
	github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33 // indirect
	github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect
	github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect
	github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect
	github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7 // indirect
	github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect
	github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 // indirect
	github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect
	github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 // indirect
	github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect
	github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect
	github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 // indirect
)

@digitalandrew
Copy link
Author

For anyone that stumbles on this looking for a solution, this was fixed for me by updating go_rules in bazel.

@ashleydavies
Copy link

Thanks for replying saying what helped @digitalandrew 😄 saved me a lot of pain

@hnoshab75
Copy link

@digitalandrew what was the version of rules_go you were using earlier and which one did you upgrade to which fixed the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

5 participants