Skip to content

Commit 8b49371

Browse files
authored
Merge branch 'main' into sai/vscodePublishDialog_1Target_ImageTagFix
2 parents e8f1268 + e357716 commit 8b49371

File tree

10 files changed

+697
-81
lines changed

10 files changed

+697
-81
lines changed

localization/l10n/bundle.l10n.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,9 @@
658658
"Processing include or exclude all differences operation.": "Processing include or exclude all differences operation.",
659659
"Select Profile": "Select Profile",
660660
"Save As...": "Save As...",
661+
"Advanced Publish Options": "Advanced Publish Options",
662+
"Ignore Options": "Ignore Options",
663+
"Exclude Object Types": "Exclude Object Types",
661664
"Create New Connection Group": "Create New Connection Group",
662665
"Edit Connection Group: {0}/{0} is the name of the connection group being edited": {
663666
"message": "Edit Connection Group: {0}",
@@ -1513,7 +1516,8 @@
15131516
"Failed to load publish profile": "Failed to load publish profile",
15141517
"Publish profile saved to: {0}": "Publish profile saved to: {0}",
15151518
"Failed to save publish profile": "Failed to save publish profile",
1516-
"DacFx service is not available": "DacFx service is not available",
1519+
"DacFx service is not available. Publish and generate script operations cannot be performed.": "DacFx service is not available. Publish and generate script operations cannot be performed.",
1520+
"DacFx service is not available. Profile loaded without deployment options. Publish and generate script operations cannot be performed.": "DacFx service is not available. Profile loaded without deployment options. Publish and generate script operations cannot be performed.",
15171521
"Failed to list databases": "Failed to list databases",
15181522
"Failed to fetch Docker container tags: {0}": "Failed to fetch Docker container tags: {0}",
15191523
"Schema Compare": "Schema Compare",

localization/xliff/vscode-mssql.xlf

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@
138138
<trans-unit id="++CODE++dfa2817fb2221c8b89c47c4fe8326d07c119b7c32e89e509d1061fc596fdf801">
139139
<source xml:lang="en">Advanced Options</source>
140140
</trans-unit>
141+
<trans-unit id="++CODE++fe80d12c71bbc300158260094cf676c1a9f3546b792f027c84e7a91d9fc75b20">
142+
<source xml:lang="en">Advanced Publish Options</source>
143+
</trans-unit>
141144
<trans-unit id="++CODE++08d0861fba87c9910b6c76342c1783be7d5504ff5248fbacd869963a7322992d">
142145
<source xml:lang="en">All permissions for extensions to access your connections have been cleared.</source>
143146
</trans-unit>
@@ -982,8 +985,11 @@
982985
<trans-unit id="++CODE++3cc30692596cf10ca4319a818741998997632cce895dbf138cb3299b1314d37f">
983986
<source xml:lang="en">Custom Zoom</source>
984987
</trans-unit>
985-
<trans-unit id="++CODE++ef695e4c384e9b231d25ba5d0160913f31f4153f460e645129860fa611a52b27">
986-
<source xml:lang="en">DacFx service is not available</source>
988+
<trans-unit id="++CODE++02b435f9a4c73633bef7d3b2b6548de6bb7ec5414c63e0bb6db520a4ca4d1004">
989+
<source xml:lang="en">DacFx service is not available. Profile loaded without deployment options. Publish and generate script operations cannot be performed.</source>
990+
</trans-unit>
991+
<trans-unit id="++CODE++7ca6d6b94c100c4f405187f90cd8ed2b66402f6b47804856b75931feccf9b9f4">
992+
<source xml:lang="en">DacFx service is not available. Publish and generate script operations cannot be performed.</source>
987993
</trans-unit>
988994
<trans-unit id="++CODE++68cd154732021d9684d0dcad6276e99d675f962c9b08774f23f5de9398e19290">
989995
<source xml:lang="en">Data Type</source>
@@ -1360,6 +1366,9 @@
13601366
<trans-unit id="++CODE++48d53635551c8fd4564251d49f4e6eba58c2774469144e4346310955fbadbf4c">
13611367
<source xml:lang="en">Excel</source>
13621368
</trans-unit>
1369+
<trans-unit id="++CODE++01ae099f23b8fe85d27a9e26613eb2624bd76e11505385e3493f316afde824c2">
1370+
<source xml:lang="en">Exclude Object Types</source>
1371+
</trans-unit>
13631372
<trans-unit id="++CODE++e3a67d9540e9a204f7dc4aa9d44a0ec652856cfa932a21196bf9df23aa0e4cd1">
13641373
<source xml:lang="en">Execute</source>
13651374
</trans-unit>
@@ -1824,6 +1833,9 @@
18241833
<trans-unit id="++CODE++d8d462ddc91939459ae107d47fee7a34b3601b20fcd01615f98e1941674f14ea">
18251834
<source xml:lang="en">I&apos;m sorry, I can only assist with SQL-related questions.</source>
18261835
</trans-unit>
1836+
<trans-unit id="++CODE++b37cea142b959c4f6c75754d7b3d56bc41d1a2d6667600c748d7a168f10c8818">
1837+
<source xml:lang="en">Ignore Options</source>
1838+
</trans-unit>
18271839
<trans-unit id="++CODE++1d59e3e131d04ce9ba04c0f297dbd4eddb83c0bfe977b2a6bf19bdeb73f2d5c3">
18281840
<source xml:lang="en">Ignore Tenant</source>
18291841
</trans-unit>

src/constants/locConstants.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,12 @@ export class PublishProject {
13531353
return l10n.t("Publish profile saved to: {0}", path);
13541354
};
13551355
public static PublishProfileSaveFailed = l10n.t("Failed to save publish profile");
1356-
public static DacFxServiceNotAvailable = l10n.t("DacFx service is not available");
1356+
public static DacFxServiceNotAvailable = l10n.t(
1357+
"DacFx service is not available. Publish and generate script operations cannot be performed.",
1358+
);
1359+
public static DacFxServiceNotAvailableProfileLoaded = l10n.t(
1360+
"DacFx service is not available. Profile loaded without deployment options. Publish and generate script operations cannot be performed.",
1361+
);
13571362
public static FailedToListDatabases = l10n.t("Failed to list databases");
13581363
public static FailedToFetchContainerTags = (errorMessage: string) => {
13591364
return l10n.t("Failed to fetch Docker container tags: {0}", errorMessage);

src/publishProject/publishProjectWebViewController.ts

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ export class PublishProjectWebViewController extends FormWebviewController<
7171
lastPublishResult: undefined,
7272
hasFormErrors: true,
7373
deploymentOptions: deploymentOptions,
74+
defaultDeploymentOptions: deploymentOptions
75+
? structuredClone(deploymentOptions)
76+
: undefined,
7477
waitingForNewConnection: false,
7578
} as PublishDialogState,
7679
{
@@ -91,18 +94,15 @@ export class PublishProjectWebViewController extends FormWebviewController<
9194
},
9295
);
9396

97+
// Clear default excludeObjectTypes for publish dialog, no default exclude options should exist
98+
if (deploymentOptions?.excludeObjectTypes !== undefined) {
99+
deploymentOptions.excludeObjectTypes.value = [];
100+
}
101+
94102
this._sqlProjectsService = sqlProjectsService;
95103
this._dacFxService = dacFxService;
96104
this._connectionManager = connectionManager;
97105

98-
// Clear default excludeObjectTypes for publish dialog, no default exclude options should exist
99-
if (
100-
this.state.deploymentOptions &&
101-
this.state.deploymentOptions.excludeObjectTypes !== undefined
102-
) {
103-
this.state.deploymentOptions.excludeObjectTypes.value = [];
104-
}
105-
106106
this.registerRpcHandlers();
107107

108108
// Listen for successful connections
@@ -209,6 +209,22 @@ export class PublishProjectWebViewController extends FormWebviewController<
209209
return state;
210210
});
211211

212+
this.registerReducer(
213+
"updateDeploymentOptions",
214+
async (
215+
state: PublishDialogState,
216+
payload: { deploymentOptions: mssql.DeploymentOptions },
217+
) => {
218+
// Update deployment options and regenerate grouped options for UI
219+
const newState = {
220+
...state,
221+
deploymentOptions: payload.deploymentOptions,
222+
};
223+
224+
return newState;
225+
},
226+
);
227+
212228
this.registerReducer("selectPublishProfile", async (state: PublishDialogState) => {
213229
// Derive project folder path from the project file path
214230
const projectFolderPath = state.projectFilePath
@@ -243,7 +259,6 @@ export class PublishProjectWebViewController extends FormWebviewController<
243259
TelemetryActions.PublishProfileLoaded,
244260
);
245261

246-
// Update state with all parsed values - UI components will consume when available
247262
return {
248263
...state,
249264
formState: {
@@ -257,6 +272,12 @@ export class PublishProjectWebViewController extends FormWebviewController<
257272
connectionString: parsedProfile.connectionString || state.connectionString,
258273
deploymentOptions:
259274
parsedProfile.deploymentOptions || state.deploymentOptions,
275+
formMessage: !this._dacFxService
276+
? {
277+
message: Loc.DacFxServiceNotAvailableProfileLoaded,
278+
intent: "error" as const,
279+
}
280+
: undefined,
260281
};
261282
} catch (error) {
262283
return {

src/reactviews/common/locConstants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -931,6 +931,11 @@ export class LocConstants {
931931
SaveAs: l10n.t("Save As..."),
932932
generateScript: l10n.t("Generate Script"),
933933
publish: l10n.t("Publish"),
934+
advancedOptions: l10n.t("Advanced"),
935+
advancedPublishSettings: l10n.t("Advanced Publish Options"),
936+
generalOptions: l10n.t("General Options"),
937+
ignoreOptions: l10n.t("Ignore Options"),
938+
excludeObjectTypes: l10n.t("Exclude Object Types"),
934939
};
935940
}
936941

0 commit comments

Comments
 (0)