Skip to content

Commit 5370f04

Browse files
Add extension name to the private preview terms and conditions popup (#1144)
## Changes <!-- Summary of your changes that are easy to understand --> ## Tests <!-- How is this tested? -->
1 parent 3153117 commit 5370f04

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

packages/databricks-vscode/src/extension.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,22 @@ export async function activate(
7373
customWhenContext.setDeploymentState("idle");
7474

7575
const stateStorage = new StateStorage(context);
76+
const packageMetadata = await PackageJsonUtils.getMetadata(context);
77+
78+
await stateStorage.set("databricks.preview-tnc.accepted", false);
7679

7780
if (
7881
!stateStorage.get("databricks.preview-tnc.accepted") &&
7982
!isIntegrationTest()
8083
) {
8184
const acceptTnc = await window.showInformationMessage(
82-
`Please note that you should only be using this functionality if you are part of our private preview and have accepted our terms and conditions regarding this preview.`,
85+
`Databricks Extension v${packageMetadata.version} is in private preview`,
8386
{
8487
modal: true,
85-
detail: `In order to enroll in the private preview please contact us and we will get you added`,
88+
detail:
89+
`Please note that you should only be using this functionality if you are part of our private` +
90+
`preview and have accepted our terms and conditions regarding this preview.` +
91+
`In order to enroll in the private preview please contact us and we will get you added`,
8692
},
8793
"Contact us",
8894
"Continue if you are already enrolled"
@@ -109,15 +115,6 @@ export async function activate(
109115
}
110116
}
111117

112-
if (extensions.getExtension("databricks.databricks-vscode") !== undefined) {
113-
await commands.executeCommand(
114-
"workbench.extensions.uninstallExtension",
115-
"databricks.databricks-vscode"
116-
);
117-
118-
await commands.executeCommand("workbench.action.reloadWindow");
119-
}
120-
121118
if (!(await PackageJsonUtils.checkArchCompat(context))) {
122119
return undefined;
123120
}
@@ -175,7 +172,6 @@ export async function activate(
175172
`${path.delimiter}${context.asAbsolutePath("./bin")}`
176173
);
177174

178-
const packageMetadata = await PackageJsonUtils.getMetadata(context);
179175
logging.NamedLogger.getOrCreate(Loggers.Extension).debug("Metadata", {
180176
metadata: packageMetadata,
181177
});

0 commit comments

Comments
 (0)