Skip to content

Conversation

@opieter-aws
Copy link
Contributor

@opieter-aws opieter-aws commented May 22, 2025

Problem

The cached/persisted Q Developer Profile selection is stored as a map of {connectionID: RegionProfile}, where connectionID is a randomUUID. When migrating to Flare auth, we move away from the concept of a connectionID, and we do not have access to the latest ID of a user. The result is that we cannot restore the user's last selected region profile, and always need users who update versions to make a profile selection.

Solution

To handle this more gracefully, we will:

  • Use regionProfile if matching auth profile name (existing logic)
  • If no match, check if there is only a single RegionProfile stored in lastUsed. If so, use that one
  • If no match, and multiple RegionProfiles are stored in lastUsed cache, make user select

Unit tests added


  • 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.

…state, default to single profile if only 1 available
@github-actions
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@opieter-aws opieter-aws changed the title fix(amazonq): If no matching Q developer profile in last-used global state, default to single profile if only 1 available fix(amazonq): Handle developer profile migration more gracefully May 22, 2025
@opieter-aws opieter-aws reopened this May 22, 2025
@opieter-aws opieter-aws marked this pull request as ready for review May 22, 2025 18:09
@opieter-aws opieter-aws requested review from a team as code owners May 22, 2025 18:09
@opieter-aws opieter-aws merged commit e411922 into aws:feature/flare-mega May 23, 2025
22 of 29 checks passed
tomcat323 pushed a commit to tomcat323/aws-toolkit-vscode that referenced this pull request Jun 5, 2025
…#7362)

## Problem
The cached/persisted Q Developer Profile selection is stored as a map of
`{connectionID: RegionProfile}`, where `connectionID` is a `randomUUID`.
When migrating to Flare auth, we move away from the concept of a
connectionID, and we do not have access to the latest ID of a user. The
result is that we cannot restore the user's last selected region
profile, and always need users who update versions to make a profile
selection.

## Solution
To handle this more gracefully, we will:
* Use regionProfile if matching auth profile name (existing logic)
* If no match, check if there is only a single RegionProfile stored in
lastUsed. If so, use that one
* If no match, and multiple RegionProfiles are stored in lastUsed cache,
make user select

Unit tests added

---

- 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](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.
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.

2 participants