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

fix: iamAsyncClient without endpointOverride #492

Conversation

ronjaquensel
Copy link
Contributor

What this PR changes/adds

Defines a default key that will be used by the AwsClientProviderImpl to cache a created IamAsyncClient if no endpointOverride property is supplied in the client request. The default key is only used for IAM clients, as all other client types are region-bound and for them, a combination of region and endpointOverride properties is used as the key, thus no NullPointerException is raised there on a missing endpointOverride.

Why it does that

Previously only the endpointOverride property was used as the key for storing IamAsyncClients, causing a NullPointerException if no endpointOverride was supplied.

Further notes

I noticed that we do not yet have any tests for the AwsClientProviderImpl. I added only the relevant tests for the fix for now, but we should create a follow-up issue to add additional tests for this class.

Linked Issue(s)

Closes #490

@ronjaquensel ronjaquensel added the bug Something isn't working label Nov 26, 2024
@ronjaquensel ronjaquensel self-assigned this Nov 26, 2024
@ronjaquensel ronjaquensel force-pushed the fix/490-iam-client-without-endpoint-override branch from 8102c07 to 15d6f70 Compare November 26, 2024 15:15
@ronjaquensel ronjaquensel merged commit 0f4cf76 into eclipse-edc:main Nov 28, 2024
8 checks passed
@ronjaquensel ronjaquensel deleted the fix/490-iam-client-without-endpoint-override branch November 28, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot obtain IAM client without endpoint override
2 participants