Skip to content
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

Add extension name to the private preview terms and conditions popup #1144

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions packages/databricks-vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,22 @@ export async function activate(
customWhenContext.setDeploymentState("idle");

const stateStorage = new StateStorage(context);
const packageMetadata = await PackageJsonUtils.getMetadata(context);

await stateStorage.set("databricks.preview-tnc.accepted", false);

if (
!stateStorage.get("databricks.preview-tnc.accepted") &&
!isIntegrationTest()
) {
const acceptTnc = await window.showInformationMessage(
`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.`,
`Databricks Extension v${packageMetadata.version} is in private preview`,
{
modal: true,
detail: `In order to enroll in the private preview please contact us and we will get you added`,
detail:
`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.` +
`In order to enroll in the private preview please contact us and we will get you added`,
},
"Contact us",
"Continue if you are already enrolled"
Expand All @@ -109,15 +115,6 @@ export async function activate(
}
}

if (extensions.getExtension("databricks.databricks-vscode") !== undefined) {
await commands.executeCommand(
"workbench.extensions.uninstallExtension",
"databricks.databricks-vscode"
);

await commands.executeCommand("workbench.action.reloadWindow");
}

if (!(await PackageJsonUtils.checkArchCompat(context))) {
return undefined;
}
Expand Down Expand Up @@ -175,7 +172,6 @@ export async function activate(
`${path.delimiter}${context.asAbsolutePath("./bin")}`
);

const packageMetadata = await PackageJsonUtils.getMetadata(context);
logging.NamedLogger.getOrCreate(Loggers.Extension).debug("Metadata", {
metadata: packageMetadata,
});
Expand Down
Loading