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

DefaultProfile inconsistent behavior #966

Open
jiaheng opened this issue Jan 15, 2025 · 0 comments
Open

DefaultProfile inconsistent behavior #966

jiaheng opened this issue Jan 15, 2025 · 0 comments

Comments

@jiaheng
Copy link

jiaheng commented Jan 15, 2025

  • Product and API: KMS, SecretManagerClient
  • Platform: Java
  • Mininum Code:
            DefaultProfile profile = DefaultProfile.getProfile(region);
            profile.setCloseTrace(true);
            SecretManagerClient secretManagerClient =
                    BaseSecretManagerClientBuilder.standard()
                            .withCredentialsProvider(
                                    createCredentialsProvider(assumeRoleArn, region))
                            .withRegion(region)
                            .build();
            return SecretCacheClientBuilder.newCacheClientBuilder(secretManagerClient).build();

I noticed a potential inconsistency in the DefaultProfile class, particularly in lines 70-72:

public synchronized static DefaultProfile getProfile(String regionId) {
return new DefaultProfile(regionId);
}

Most of the getProfile methods assign a new DefaultProfile instance to the profile variable, but one method does not follow this pattern. This discrepancy could impact clients relying on this profile, potentially leading to issues like inconsistent trace disabling behavior. Could you clarify if this is the intended behavior or if it might be a bug?

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

No branches or pull requests

1 participant