-
Notifications
You must be signed in to change notification settings - Fork 736
fix(amazonq): do not trigger uninstall when extension auto-updates #5673
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
Conversation
|
This pull request modifies code in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required. |
98f3749 to
db04463
Compare
44a3594 to
ef119b7
Compare
packages/amazonq/.changes/next-release/Bug Fix-4d4e0aee-4811-4091-9962-752cafc35418.json
Outdated
Show resolved
Hide resolved
| async function handleUninstall(extensionFullName: string, callback: () => Promise<void>): Promise<void> { | ||
| await callback() | ||
| telemetry.aws_extensionUninstalled.run((span) => { | ||
| span.record({}) |
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 line necessary?
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.
Updated to telemetry.aws_extensionUninstalled.run(() => {})
| * This makes sure the callback is triggered only when an explicit extension with specific version is uninstalled. | ||
| */ | ||
| const extension = `${extensionName}-${extensionVersion}` | ||
| const extensionFullName = `${extensionId}-${extensionVersion}` |
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.
It seems inconsistent to pull extensionVersion from the environment, but you have to pass in the extension ID. The caller has the choice of what ID to pass but in reality since the version will only match to the running extension there is not actually a choice.
Why not pass in both or pull both from the env, e.g. vscode.ExtensionContext.extension.id.
ef119b7 to
86956ff
Compare
|
This pull request implements a feature or fix, so it must include a changelog entry. See CONTRIBUTING.md#changelog for instructions. |
86956ff to
defd582
Compare
Do not trigger uninstall when extension auto-updates
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.