You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Q Code Transform: Fix failed uploads and downloads when credentials expire (#4573)
~11% of API failures in May are due to expired credentials being used (InvalidGrantException). The most common places in the code where this happens is when users are about to upload their code or when about to download the code. This is due to at these points customers may have been inactive for a substantial amount of time (>15 min) either due to long running `mvn` builds or due to being afk before downloading results.
This PR fixes this by forcing a refresh through chat when token is marked as NEED_REFRESH or if we get a SssOidcException. Additionally in the case of downloading an archive we need to resume the job after credential refresh such that users can reattempt the download. Detailed flow for the two cases detailed below:
### Flow when token expired when calling CreateUpload:
1. Chat asks user to reauthenticate
2. Notification asks user to reauthenticate
3. Clicking either causes reauthentication flow to run
4. When user successfully authenticates then the user is requested to start a new flow
### Flow when token expired before calling ExportResultArchive
1. Chat asks user to reauthenticate
2. Notification asks user to reauth
3. Clicking either causes reauthentication flow to run
4. When user authenticates successfully then the job is resumed
6. When job fully resumes users are notified to download the results again as normal
### Misc changes (bugfixes / supporting changes)
1. [Supporting change] - Tab opens on resume without user needing to enter /transform
2. [Supporting change] - Added BearerToken listener to listen for authentication successes so that chat could be informed when user reauthenticates
3. [Bug fix / Supporting change] - Removed notification “Job completed when you were away” as it was a duplicate and messes up resume flow (as users can click while we are attempting to resume job which causes issues in chat)
4. [Bug fix / Supporting change] - Removed notification “Job failed when you were away” as it was a duplicate and messes up resume flow (as users can click while we are attempting to resume job which causes issues in chat)
5. [Bug fix] - Removed notification when job failed during download when more specific error notifications are already shown.
Copy file name to clipboardExpand all lines: plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/ArtifactHandler.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerManager.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerSession.kt
0 commit comments