-
Notifications
You must be signed in to change notification settings - Fork 747
feat(amazonq): Use new auth class using flare identity server for Amazon Q #7062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(amazonq): Use new auth class using flare identity server for Amazon Q #7062
Conversation
|
|
|
||
| // Create status bar and reference log UI elements | ||
| void Commands.tryExecute('aws.amazonq.refreshStatusBar') | ||
| void Commands.tryExecute('aws.amazonq.updateReferenceLog') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume it's acceptable that this might be racey?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if you have a better suggestion let me know!
Co-authored-by: Justin M. Keyes <[email protected]>
| export const amazonQScopes = [...codeWhispererChatScopes, ...scopesGumby, ...scopesFeatureDev] | ||
|
|
||
| /** AuthProvider interface for the auth functionality needed by RegionProfileManager */ | ||
| export interface IAuthProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? RegionProfileManager is only used for Q. Why not just pass the Q specific utility class for it to use? AuthUtil.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC that's what I attempted initially, but it introduces a circular dependency. See b381d0d#diff-b1c252677272c2b57d62cc5d3da2ee04c060e1db7432c3ea40ab00f9ab26558aR41-R59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can revisit the implementation as a follow-up, merging the PR to unblock next PR with references
b896e4f
into
aws:feature/amazonqLSP-auth
…dentity server for Amazon Q (#7088) ## Problem The business logic of auth-related features is complex and implemented separately for all IDEs. Flare/DEXP LSP server has implemented auth that can be reused for all IDEs. The source code was introduced already introduced in #6958 with activation and client updates in #7062. But the references to `AuthUtil` through the codebase weren't updated yet. ## Solution * Update all remaining references to `AuthUtil` in the codebase * All `toolkits` unit tests are passing * Disable telemetry and existing AuthUtil unit tests, to be updated in follow-up PR * `amazonq` and `web` unit tests still failing, to be addressed in follow-up PR **Note that CI is expected to fail for amazonq and web unit tests** --- - 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. --------- Co-authored-by: Justin M. Keyes <[email protected]>
Problem
The business logic of auth-related features is complex and implemented separately for all IDEs. Flare/DEXP LSP server has implemented auth that can be reused for all IDEs. The source code was introduced, but not yet instantiated upon activation.
Follow up for #6958
Solution
"amazonqLSP"experiment flagauthProviderthroughIAuthProviderinterface to remove circular dependency withAuthUtilgetChatAuthState()API in favor of newgetAuthState()NOTE: CI is expected to fail, since the reference updates for AuthUtil in the rest of code and unit tests have not been committed yet
feature/xbranches will not be squash-merged at release time.