Skip to content

Commit 13103fa

Browse files
authored
fix(settings): only migrate telemtry setting if we are in amazon q (#4896)
We attempt to migrate in both extensions, even though we should only do so in the amazon q setting. The toolkit attempt fails, but it still pollutes the state with the stored keys. This isn't expected to have an effect because the states of the 2 exts are presumed to be separate, but maybe there is a subtle bug revolving around stating here.
1 parent 905915f commit 13103fa

File tree

1 file changed

+1
-1
lines changed
  • packages/core/src/shared/telemetry

1 file changed

+1
-1
lines changed

packages/core/src/shared/telemetry/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class TelemetryConfig {
5959
}
6060

6161
public async initAmazonQSetting() {
62-
if (globals.context.globalState.get<boolean>(this.amazonQSettingMigratedKey)) {
62+
if (!isAmazonQ() || globals.context.globalState.get<boolean>(this.amazonQSettingMigratedKey)) {
6363
return
6464
}
6565
// aws.telemetry isn't deprecated, we are just initializing amazonQ.telemetry with its value.

0 commit comments

Comments
 (0)