aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.41k stars 346 forks source link

fix(gumby): Do not check auth when initializing transformation hub UX #5252

Closed JuliaABurch closed 2 days ago

JuliaABurch commented 2 days ago

Problem

There was a bug that happened when VSCode is opened without having first been signed into Amazon Q and the user attempts a code transformation. The Transformation Hub window would open, but would not update, and Code Transform would appear to hang.

Solution

There is some initialization code that registers commands that other parts of Gumby uses to update the Transformation Hub, but this code was locked behind an auth check; if it fails, the commands are simply never registered, even if the user signs in again later.

This portion of the code is not necessary to lock behind an auth check (it doesn't save memory or make anything run faster to not have it run), so the check has been removed.

Testing:

  1. User opens VSCode without already being signed in; the user signs in and then transforms a project successfully
  2. User opens VSCode without already being signed in; the user signs in and then transforms a project unsuccessfully (partial success)
  3. User opens VSCode without already being signed in; the user signs in and then is not able to submit a project to be transformed (fails to build locally)
  4. User opens VSCode without already being signed in; the user signs in and then transforms a project that triggers HIL
  5. User opens VSCode already having been signed in; the user transforms a project successfully

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

dhasani23 commented 2 days ago

Can you also test the case where you open VS Code already signed in, then sign out, then sign in again and run /transform?

JuliaABurch commented 2 days ago

Can you also test the case where you open VS Code already signed in, then sign out, then sign in again and run /transform?

Yes, I just tested this and this works as well.

justinmk3 commented 2 days ago

Seems like this has user impact, do we need a changelog item?