Skip to content

Commit 447c880

Browse files
FrankLiu4138Copilot
andcommitted
Add source/install telemetry and drop unreliable activation check
Follow-up to v0.27.5 telemetry analysis (devdiv-azure-service-dmitryr/azure-java-migration-copilot-vscode-extension#5979): - Add a source field (SOURCE_CVE / SOURCE_JAVA_UPGRADE) to the upgradeNotification.show event so NOTIFY-level data can be split by CVE vs upgrade and aligned with downstream funnel stages. - Emit an installSucceeded event right after installExtension resolves. - Drop the post-install getExtensionState re-check that produced false activation-timeout results; the not-installed path now reports proceeded and returns true after install completes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4db30ab commit 447c880

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/upgrade/display/notificationManager.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class NotificationManager implements IUpgradeIssuesRenderer {
9393
sendInfo(operationId, {
9494
operationName: "java.dependency.upgradeNotification.show",
9595
extensionState,
96+
source: hasCVEIssue ? Upgrade.SOURCE_CVE : Upgrade.SOURCE_JAVA_UPGRADE,
9697
});
9798

9899
const buttons = hasCVEIssue

src/upgrade/utility.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ export async function checkOrInstallAppModExtensionForUpgrade(
197197
}
198198

199199
await commands.executeCommand("workbench.extensions.installExtension", ExtensionName.APP_MODERNIZATION_FOR_JAVA);
200+
sendInfo(operationId, {
201+
operationName: "java.dependency.upgradeFlow.installSucceeded",
202+
});
200203

201204
if (state === "outdated") {
202205
// Extension was updated (not freshly installed) — reload required
@@ -221,16 +224,13 @@ export async function checkOrInstallAppModExtensionForUpgrade(
221224

222225
await checkOrPromptToEnableAppModExtension("upgrade");
223226

224-
// Wait briefly for the newly installed extension to activate
227+
// Give the newly installed extension a moment to activate before proceeding
225228
await new Promise(resolve => setTimeout(resolve, 2000));
226229

227-
// Re-check if the newly installed extension is active and meets version requirement
228-
const newState = getExtensionState(extensionIdToCheck);
229-
const canProceed = newState === "up-to-date";
230230
sendInfo(operationId, {
231231
operationName: "java.dependency.upgradeFlow.result",
232-
upgradeFlowResult: canProceed ? "proceeded" : "activation-timeout",
232+
upgradeFlowResult: "proceeded",
233233
});
234-
return canProceed;
234+
return true;
235235
})();
236-
}
236+
}

0 commit comments

Comments
 (0)