Skip to content

Conversation

sriram1998
Copy link

Problem

When a connection is changed, the awsClientBuilderV3 is used to get the service details, and a cache is being used to cache the service. However, in the cache key only region is cached along with other service details, so on profile switch it is still returning the same cached service of previous profile.

Solution

Retrieved current profile using global aws context, and added it to the cache key, so when profile is switched, cache is updated and service from new profile is retrieved.

This approach resolves the node refresh issue by including the profile in the cache key. I'd appreciate feedback on whether there are any edge cases or alternative approaches I should consider.

I'm also looking for guidance on writing tests for this change. What would be the recommended approach for writing unit/integration tests to verify profile switches?

Thank you.

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

## Problem
When a connection is changed, the awsClientBuilderV3 is used to get the service details, and a cache is being used to cache the service. However, in the cache key only region is cached along with other service details, so on profile switch it is still returning the same cached service of previous profile.

## Solution
Retrieved current profile using global aws context, and added it to the cache key, so when profile is switched, cache is updated and service from new profile is retrieved.
@sriram1998 sriram1998 requested a review from a team as a code owner August 20, 2025 05:57
Copy link

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

Copy link

✅ I finished the code review, and didn't find any security or code quality issues.

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.

1 participant