File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -774,8 +774,21 @@ func deleteCloudFormationStack(prov client.ConfigProvider, t *cfn_bootstrap.Temp
774774}
775775
776776func ensureTestImageUploaded (e2eCtx * E2EContext ) error {
777+ By ("ensureTestImageUploaded: Creating AWS session for ECR Public" )
777778 sessionForRepo := NewAWSSessionRepoWithKey (e2eCtx .Environment .BootstrapAccessKey )
778779
780+ if sess , ok := sessionForRepo .(* session.Session ); ok {
781+ creds , err := sess .Config .Credentials .Get ()
782+ if err != nil {
783+ By (fmt .Sprintf ("ensureTestImageUploaded: Failed to get credentials from session: %v" , err ))
784+ return fmt .Errorf ("failed to get credentials: %w" , err )
785+ }
786+ By (fmt .Sprintf ("ensureTestImageUploaded: Session credentials - AccessKeyId: %s, ProviderName: %s" ,
787+ creds .AccessKeyID , creds .ProviderName ))
788+ } else {
789+ By ("ensureTestImageUploaded: WARNING: Session is not *session.Session type" )
790+ }
791+
779792 ecrSvc := ecrpublic .New (sessionForRepo )
780793 repoName := ""
781794 if err := wait .WaitForWithRetryable (wait .NewBackoff (), func () (bool , error ) {
Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ func Node1BeforeSuite(e2eCtx *E2EContext) []byte {
158158 e2eCtx .Environment .BootstrapAccessKey = newUserAccessKey (context .TODO (), e2eCtx .AWSSessionV2 , bootstrapTemplate .Spec .BootstrapUser .UserName )
159159 e2eCtx .BootstrapUserAWSSession = NewAWSSessionWithKey (e2eCtx .Environment .BootstrapAccessKey )
160160 e2eCtx .BootstrapUserAWSSessionV2 = NewAWSSessionWithKeyV2 (e2eCtx .Environment .BootstrapAccessKey )
161+
162+ By ("Waiting for access key to propagate..." )
163+ time .Sleep (10 * time .Second )
164+
161165 Expect (ensureTestImageUploaded (e2eCtx )).NotTo (HaveOccurred ())
162166
163167 // Image ID is needed when using a CI Kubernetes version. This is used in conformance test and upgrade to main test.
You can’t perform that action at this time.
0 commit comments