Arc and Azure CLI extensions GA + bug fix for SQL MIAA update (#18226)

* Changed instances of sql edit to sql update

* Updated az sql mi-arc edit to be update. Changed the params for indirect and direct mode.

* Removed preview from everywhere in arc and azcli extensions.

* Bumped version numbers for both extensions and removed preview bool in package.jsons
This commit is contained in:
Candice Ye
2022-02-07 10:32:37 -08:00
committed by GitHub
parent c3d8c37ed7
commit 5b3804c607
9 changed files with 67 additions and 22 deletions

View File

@@ -2,9 +2,8 @@
"name": "arc",
"displayName": "%arc.displayName%",
"description": "%arc.description%",
"version": "0.11.0",
"version": "0.12.0",
"publisher": "Microsoft",
"preview": true,
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
"icon": "images/extension.png",
"engines": {

View File

@@ -13,7 +13,7 @@
"command.estimateCostSqlMiaa.title": "Estimate Cost of SQL Managed Instance - Azure Arc",
"arc.openDashboard": "Manage",
"resource.type.azure.arc.display.name": "Azure Arc data controller (preview)",
"resource.type.azure.arc.display.name": "Azure Arc data controller",
"resource.type.azure.arc.description": "Creates an Azure Arc data controller",
"arc.data.controller.new.wizard.title": "Create Azure Arc data controller",
"arc.data.controller.cluster.environment.title": "What is your target existing Kubernetes cluster environment?",

View File

@@ -8,9 +8,9 @@ import { getErrorMessage } from './common/utils';
const localize = nls.loadMessageBundle();
export const arcDeploymentDeprecation = localize('arc.arcDeploymentDeprecation', "The Arc Deployment extension has been replaced by the Arc extension and has been uninstalled.");
export function arcControllerDashboard(name: string): string { return localize('arc.controllerDashboard', "Azure Arc Data Controller Dashboard (Preview) - {0}", name); }
export function miaaDashboard(name: string): string { return localize('arc.miaaDashboard', "SQL managed instance - Azure Arc Dashboard (Preview) - {0}", name); }
export function postgresDashboard(name: string): string { return localize('arc.postgresDashboard', "PostgreSQL Hyperscale - Azure Arc Dashboard (Preview) - {0}", name); }
export function arcControllerDashboard(name: string): string { return localize('arc.controllerDashboard', "Azure Arc Data Controller Dashboard - {0}", name); }
export function miaaDashboard(name: string): string { return localize('arc.miaaDashboard', "SQL managed instance - Azure Arc Dashboard - {0}", name); }
export function postgresDashboard(name: string): string { return localize('arc.postgresDashboard', "PostgreSQL Hyperscale - Azure Arc Dashboard - {0}", name); }
export const dataControllersType = localize('arc.dataControllersType', "Azure Arc Data Controller");
export const pgSqlType = localize('arc.pgSqlType', "PostgreSQL Hyperscale - Azure Arc");

View File

@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
import * as azdata from 'azdata';
import * as azExt from 'az-ext';
import * as loc from '../../../localizedConstants';
import { IconPathHelper, cssStyles } from '../../../constants';
import { IconPathHelper, cssStyles, ConnectionMode } from '../../../constants';
import { DashboardPage } from '../../components/dashboardPage';
import { MiaaModel, RPModel, DatabaseModel, systemDbs } from '../../../models/miaaModel';
import { ControllerModel } from '../../../models/controllerModel';
@@ -220,9 +220,23 @@ export class MiaaBackupsPage extends DashboardPage {
cancellable: false
},
async (_progress, _token): Promise<void> => {
await this._azApi.az.sql.miarc.edit(
this._miaaModel.info.name, this._saveArgs, this._miaaModel.controllerModel.info.namespace, this._miaaModel.controllerModel.azAdditionalEnvVars);
if (this._miaaModel.controllerModel.info.connectionMode === ConnectionMode.direct) {
await this._azApi.az.sql.miarc.update(
this._miaaModel.info.name,
this._saveArgs,
this._miaaModel.controllerModel.info.resourceGroup,
undefined, // Indirect mode argument - namespace
undefined, // Indirect mode argument - usek8s
this._miaaModel.controllerModel.azAdditionalEnvVars);
} else {
await this._azApi.az.sql.miarc.update(
this._miaaModel.info.name,
this._saveArgs,
undefined, // Direct mode argument - resourceGroup
this._miaaModel.controllerModel.info.namespace,
true,
this._miaaModel.controllerModel.azAdditionalEnvVars);
}
try {
await this._miaaModel.refresh();
} catch (error) {

View File

@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
import * as azdata from 'azdata';
import * as azExt from 'az-ext';
import * as loc from '../../../localizedConstants';
import { IconPathHelper, cssStyles } from '../../../constants';
import { IconPathHelper, cssStyles, ConnectionMode } from '../../../constants';
import { DashboardPage } from '../../components/dashboardPage';
import { convertToGibibyteString } from '../../../common/utils';
import { MiaaModel } from '../../../models/miaaModel';
@@ -130,8 +130,23 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
},
async (_progress, _token): Promise<void> => {
try {
await this._azApi.az.sql.miarc.edit(
this._miaaModel.info.name, this.saveArgs, this._miaaModel.controllerModel.info.namespace, this._miaaModel.controllerModel.azAdditionalEnvVars);
if (this._miaaModel.controllerModel.info.connectionMode === ConnectionMode.direct) {
await this._azApi.az.sql.miarc.update(
this._miaaModel.info.name,
this.saveArgs,
this._miaaModel.controllerModel.info.resourceGroup,
undefined, // Indirect mode argument - namespace
undefined, // Indirect mode argument - usek8s
this._miaaModel.controllerModel.azAdditionalEnvVars);
} else {
await this._azApi.az.sql.miarc.update(
this._miaaModel.info.name,
this.saveArgs,
undefined, // Direct mode argument - resourceGroup
this._miaaModel.controllerModel.info.namespace,
true,
this._miaaModel.controllerModel.azAdditionalEnvVars);
}
} catch (err) {
this.saveButton!.enabled = true;
throw err;