Open ashi009 opened 10 months ago
I ran into this problem lately using Tekton. It came down that the credential-helper uses an older version of the aws-sdk and with v1.23.0
they introduced a breaking change. If you now use any depdendency using a version >v1.23.0
you will most likely run into this. See issue of aws-sdk https://github.com/aws/aws-sdk-go-v2/issues/2370 and the Tekton issue https://github.com/tektoncd/pipeline/issues/7698.
Hope I could help you identifing your problem a bit better.
We encountered a weird error, which seems from the generated code.
We did some initial analysis on this.
Our version is 0.70,
Git commit: cd92a7a
Failed to get authorization token:
leads us to https://github.com/awslabs/amazon-ecr-credential-helper/blob/cd92a7ab13759e6f4bf2170f0818ae45e93e8fd2/ecr-login/api/client.go#L229-L229Given the error message, it's clear that the err is from
c.ecrClient.GetAuthorizationToken
, https://github.com/awslabs/amazon-ecr-credential-helper/blob/cd92a7ab13759e6f4bf2170f0818ae45e93e8fd2/ecr-login/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/api_op_GetAuthorizationToken.go#L23-L36Following the invocations from the
c.invokeOperation
, https://github.com/awslabs/amazon-ecr-credential-helper/blob/cd92a7ab13759e6f4bf2170f0818ae45e93e8fd2/ecr-login/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/api_client.go#L71-L106, and it callsc.addOperationGetAuthorizationTokenMiddlewares
https://github.com/awslabs/amazon-ecr-credential-helper/blob/cd92a7ab13759e6f4bf2170f0818ae45e93e8fd2/ecr-login/vendor/github.com/aws/aws-sdk-go-v2/service/ecr/api_op_GetAuthorizationToken.go#L65-L139There are many return points of naked errors, we need to figure out which branch gives
not found, ResolveEndpointV2
. It turned out"not found, %v"
is from https://github.com/awslabs/amazon-ecr-credential-helper/blob/cd92a7ab13759e6f4bf2170f0818ae45e93e8fd2/ecr-login/vendor/github.com/aws/smithy-go/middleware/ordered_group.go#L178-L230 and 2 other functions in the same file. SearchResolveEndpointV2
gives us 3 results:However, this means the previously added
ResolveEndpointV2
is missing after a few invocations. Could you please take a look?