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

Add AWS region to the AWS Config Cache key #6134

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

maxbog
Copy link

@maxbog maxbog commented Sep 4, 2024

The PR adds the AWS region to the key used by the AWS config cache

Checklist

Fixes #6128

@maxbog maxbog requested a review from a team as a code owner September 4, 2024 09:37
@maxbog maxbog force-pushed the region_in_aws_config_cache branch 4 times, most recently from e025102 to a67350c Compare September 4, 2024 13:49
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build is broken

Signed-off-by: Maksymilian Boguń <[email protected]>
@maxbog
Copy link
Author

maxbog commented Sep 18, 2024

@zroubalik I fixed the build

@zroubalik
Copy link
Member

zroubalik commented Sep 18, 2024

/run-e2e aws
Update: You can check the progress here

@zroubalik
Copy link
Member

zroubalik commented Sep 19, 2024

/run-e2e aws
Update: You can check the progress here

@maxbog
Copy link
Author

maxbog commented Sep 24, 2024

@zroubalik Is something wrong with the e2e tests? I see they failed twice now :(

@zroubalik
Copy link
Member

@zroubalik Is something wrong with the e2e tests? I see they failed twice now :(

yeah, issue on our side, will rerun once it is fixed

@ndlanier
Copy link

ndlanier commented Oct 4, 2024

@zroubalik any updates on the e2e testing?

@JorTurFer
Copy link
Member

JorTurFer commented Oct 6, 2024

/run-e2e aws
Update: You can check the progress here

@maxbog
Copy link
Author

maxbog commented Oct 9, 2024

@JorTurFer I rebased the PR
Now the tests failed, but it looks like some random crash, can you please rerun the failing job and the e2e tests?

@JorTurFer
Copy link
Member

JorTurFer commented Oct 16, 2024

/run-e2e aws
Update: You can check the progress here

Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL @kedacore/keda-core-contributors

@JorTurFer JorTurFer enabled auto-merge (squash) October 16, 2024 18:00
@ndlanier
Copy link

ndlanier commented Oct 28, 2024

Any insight into why it paniced/failed on the amd64 validation?

@ndlanier
Copy link

@JorTurFer is the validate - amd64 stage failure an issue with the action or an issue with the code changes in this pr?

@JorTurFer
Copy link
Member

@JorTurFer is the validate - amd64 stage failure an issue with the action or an issue with the code changes in this pr?

I've triggered it again because probably it was a transient error

@JorTurFer
Copy link
Member

@zroubalik @wozniakjan PTAL

auto-merge was automatically disabled November 6, 2024 23:44

Head branch was pushed to by a user without write access

@JorTurFer
Copy link
Member

Do you agree?

yeah, makes sense!

@maxbog
Copy link
Author

maxbog commented Nov 6, 2024

@JorTurFer @ThaSami please take another look

pkg/scalers/aws/aws_common.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@JorTurFer
Copy link
Member

Unit test are failing, could you take a look?

@maxbog
Copy link
Author

maxbog commented Nov 7, 2024

Unit test are failing, could you take a look?

The failing tests are for prometheus scaler, and the error message is: "HTTP transport must be Google OAuth2"
TBH, I'm not sure how this is related to the changes in the PR.

@JorTurFer
Copy link
Member

JorTurFer commented Nov 7, 2024

Prometheus scaler uses multiple auth providers, maybe the region change of the latest commit has had a side effect here:

// could be the case of azure managed prometheus. Try and get the round-tripper.
// If it's not the case of azure managed prometheus, we will get both transport and err as nil and proceed assuming no auth.
azureTransport, err := azure.TryAndGetAzureManagedPrometheusHTTPRoundTripper(logger, config.PodIdentity, config.TriggerMetadata)
if err != nil {
logger.V(1).Error(err, "error while init Azure Managed Prometheus client http transport")
return nil, err
}
// transport should not be nil if its a case of azure managed prometheus
if azureTransport != nil {
httpClient.Transport = azureTransport
}
gcpTransport, err := gcp.GetGCPOAuth2HTTPTransport(config, httpClient.Transport, gcp.GcpScopeMonitoringRead)
if err != nil && !errors.Is(err, gcp.ErrGoogleApplicationCrendentialsNotFound) {
logger.V(1).Error(err, "failed to get GCP client HTTP transport (either using Google application credentials or workload identity)")
return nil, err
}
if err == nil && gcpTransport != nil {
httpClient.Transport = gcpTransport
}
awsTransport, err := aws.NewSigV4RoundTripper(config)
if err != nil {
logger.V(1).Error(err, "failed to get AWS client HTTP transport ")
return nil, err
}
if err == nil && awsTransport != nil {
httpClient.Transport = awsTransport
}
}

In any case, I've triggered the tests again

@JorTurFer
Copy link
Member

Most probably it's returning an error here:

awsTransport, err := aws.NewSigV4RoundTripper(config)
if err != nil {
logger.V(1).Error(err, "failed to get AWS client HTTP transport ")
return nil, err
}

An error in that line will make fail the test although is GCP because it returns error and not the GCP transport

@maxbog
Copy link
Author

maxbog commented Nov 7, 2024

Unit tests are passing now

CHANGELOG.md Outdated Show resolved Hide resolved
@zroubalik
Copy link
Member

zroubalik commented Nov 11, 2024

/run-e2e aws
Update: You can check the progress here

@maxbog
Copy link
Author

maxbog commented Nov 12, 2024

Can we merge the PR? I'd rather not be stuck in the conflict -> merge -> e2e test -> conflict death spiral ;)

@votzest
Copy link

votzest commented Nov 19, 2024

it seems e2e tests got stuck again? otherwise can you merge this pr @zroubalik, please?

@JorTurFer
Copy link
Member

@zroubalik @wozniakjan , PTAL

@maxbog
Copy link
Author

maxbog commented Nov 27, 2024

@JorTurFer @zroubalik Please take a look at this PR. It's waiting for approval for 3 weeks now. The change is ready, waiting to be merged.

@zroubalik
Copy link
Member

@maxbog there are some conflicts, please fix them and then I think we can merge this.

@maxbog
Copy link
Author

maxbog commented Nov 28, 2024

@zroubalik done, no conflicts now

Signed-off-by: Maksymilian Boguń <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS credentials cache key needs to include the region
6 participants