Skip to content
1 change: 1 addition & 0 deletions src/upgrade/display/notificationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class NotificationManager implements IUpgradeIssuesRenderer {
sendInfo(operationId, {
operationName: "java.dependency.upgradeNotification.show",
extensionState,
source: hasCVEIssue ? Upgrade.SOURCE_CVE : Upgrade.SOURCE_JAVA_UPGRADE,
});

const buttons = hasCVEIssue
Expand Down
15 changes: 8 additions & 7 deletions src/upgrade/utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ export async function checkOrInstallAppModExtensionForUpgrade(
}

await commands.executeCommand("workbench.extensions.installExtension", ExtensionName.APP_MODERNIZATION_FOR_JAVA);
sendInfo(operationId, {
operationName: "java.dependency.upgradeFlow.installSucceeded",
Comment thread
frankliu20 marked this conversation as resolved.
Outdated
extensionState: state,
});
Comment thread
frankliu20 marked this conversation as resolved.

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

await checkOrPromptToEnableAppModExtension("upgrade");

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

// Re-check if the newly installed extension is active and meets version requirement
const newState = getExtensionState(extensionIdToCheck);
const canProceed = newState === "up-to-date";
sendInfo(operationId, {
operationName: "java.dependency.upgradeFlow.result",
upgradeFlowResult: canProceed ? "proceeded" : "activation-timeout",
upgradeFlowResult: "proceeded",
});
return canProceed;
return true;
Comment thread
frankliu20 marked this conversation as resolved.
Comment thread
frankliu20 marked this conversation as resolved.
Outdated
})();
}
}
Loading