fix(amazonq): fix profile selection errors and EDT threading violations#6175
Open
amit-lulla wants to merge 2 commits intoaws:mainfrom
Open
fix(amazonq): fix profile selection errors and EDT threading violations#6175amit-lulla wants to merge 2 commits intoaws:mainfrom
amit-lulla wants to merge 2 commits intoaws:mainfrom
Conversation
Fixes aws#6039 This commit addresses two related issues: 1. IllegalStateException: "You don't have access to the resource" - Modified listRegionProfiles() to return null for empty profiles instead of throwing an IllegalStateException - Updated callers to handle null/empty profiles gracefully 2. EDT Threading Violation when selecting Q profile - Wrapped QRegionProfileDialog.show() in runInEdt to ensure dialog is shown on Event Dispatch Thread - Made AsyncComboBox.repaint() calls EDT-safe using invokeLater Files changed: - QRegionProfileManager.kt: Return null for empty profiles - ChatCommunicationManager.kt: Add runInEdt wrapper for dialog - CodeWhispererModelConfigurator.kt: Handle null profiles gracefully - QRegionProfileDialog.kt: Handle empty profiles with telemetry - AsyncComboBox.kt: EDT-safe repaint calls
cad66f4 to
61386c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #6039
This PR addresses two related issues in the Amazon Q plugin:
"You don't have access to the resource"thrown whenlistRegionProfiles()returns an empty list"Access is allowed from Event Dispatch Thread (EDT) only"when selecting a Q profile from the chat interfaceChanges
nullfor empty profiles instead of throwingIllegalStateExceptionQRegionProfileDialog.show()inrunInEdtto ensure dialog is shown on EDTrepaint()calls ininvokeLaterfor EDT safetyTest Plan