Skip to content

Commit fe9f2c2

Browse files
committed
chore: post-merge cleanup with main
Resolves residual diffs after merging main into the supporting-fabric branch. No behavior changes intended; touches imports, types, and minor refactors carried over from main. Validation: npm run l10n, npm run prettier-fix, npm run lint (oxlint + eslint) all pass with 0 errors.
1 parent e8e1cee commit fe9f2c2

55 files changed

Lines changed: 196 additions & 130 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

l10n/bundle.l10n.json

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@
151151
"Are you sure you want to reset this migration? All progress will be lost.": "Are you sure you want to reset this migration? All progress will be lost.",
152152
"Are you sure?": "Are you sure?",
153153
"Array is too large to be shown": "Array is too large to be shown",
154+
"Artifact name is required": "Artifact name is required",
155+
"Artifact not found for id {0}": "Artifact not found for id {0}",
154156
"Assessment results already exist. Re-running will overwrite them.": "Assessment results already exist. Re-running will overwrite them.",
155157
"Assign Role": "Assign Role",
156158
"Assigning RBAC data plane permissions…": "Assigning RBAC data plane permissions…",
@@ -238,7 +240,6 @@
238240
"Create database": "Create database",
239241
"Create database, containers, and insert AI-generated sample data based on your converted schema.": "Create database, containers, and insert AI-generated sample data based on your converted schema.",
240242
"Create Database…": "Create Database…",
241-
"Create graph": "Create graph",
242243
"Create New": "Create New",
243244
"Create new {0}...": "Create new {0}...",
244245
"Create resource group \"{0}\"": "Create resource group \"{0}\"",
@@ -262,6 +263,7 @@
262263
"Database field help": "Database field help",
263264
"Database name cannot be longer than 255 characters": "Database name cannot be longer than 255 characters",
264265
"Database name cannot contain the characters '\\', '/', '#', '?', '='": "Database name cannot contain the characters '\\', '/', '#', '?', '='",
266+
"Database name is missing in artifact connection info": "Database name is missing in artifact connection info",
265267
"Database name is required.": "Database name is required.",
266268
"Database schema files help": "Database schema files help",
267269
"Database Schema Files:": "Database Schema Files:",
@@ -277,7 +279,6 @@
277279
"Delete current schema": "Delete current schema",
278280
"Delete database \"{databaseId}\" and its contents?": "Delete database \"{databaseId}\" and its contents?",
279281
"Delete Database Account \"{0}\"": "Delete Database Account \"{0}\"",
280-
"Delete graph \"{containerId}\" and its contents?": "Delete graph \"{containerId}\" and its contents?",
281282
"Delete item": "Delete item",
282283
"Delete item and its contents?": "Delete item and its contents?",
283284
"Delete item?": "Delete item?",
@@ -333,7 +334,8 @@
333334
"Endpoint must use HTTPS.": "Endpoint must use HTTPS.",
334335
"Enter a container name for {databaseId}": "Enter a container name for {databaseId}",
335336
"Enter a database name": "Enter a database name",
336-
"Enter a graph name for {databaseId}": "Enter a graph name for {databaseId}",
337+
"Enter a master key": "Enter a master key",
338+
"Enter a master key...": "Enter a master key...",
337339
"Enter a name for the new user-assigned identity.": "Enter a name for the new user-assigned identity.",
338340
"Enter a project name": "Enter a project name",
339341
"Enter a stored procedure name for {containerId}": "Enter a stored procedure name for {containerId}",
@@ -346,7 +348,9 @@
346348
"Entities": "Entities",
347349
"Error": "Error",
348350
"Error creating resource: {0}": "Error creating resource: {0}",
351+
"Error getting item for workspace {0}": "Error getting item for workspace {0}",
349352
"Error occurred while trying to verify whether the given resource group already exists: ": "Error occurred while trying to verify whether the given resource group already exists: ",
353+
"Error while querying databases": "Error while querying databases",
350354
"Error: {0}": "Error: {0}",
351355
"Errors found in document {path}. Please fix these.": "Errors found in document {path}. Please fix these.",
352356
"Est. Tokens": "Est. Tokens",
@@ -363,6 +367,7 @@
363367
"Export selected items": "Export selected items",
364368
"Extend RBAC permissions": "Extend RBAC permissions",
365369
"Extension dependency with id \"{0}\" must be updated.": "Extension dependency with id \"{0}\" must be updated.",
370+
"Fabric Service is not initialized": "Fabric Service is not initialized",
366371
"Failed to acquire token for {endpoint}: {errors}": "Failed to acquire token for {endpoint}: {errors}",
367372
"Failed to acquire token: {errors}": "Failed to acquire token: {errors}",
368373
"Failed to assign the RBAC role. You may not have sufficient permissions. Please ask the account owner to assign the \"Cosmos DB Built-in Data Contributor\" role to your identity.": "Failed to assign the RBAC role. You may not have sufficient permissions. Please ask the account owner to assign the \"Cosmos DB Built-in Data Contributor\" role to your identity.",
@@ -378,6 +383,7 @@
378383
"Failed to delete item \"{0}\".": "Failed to delete item \"{0}\".",
379384
"Failed to delete secrets for item \"{0}\".": "Failed to delete secrets for item \"{0}\".",
380385
"Failed to deploy LLM instruction files: {0}": "Failed to deploy LLM instruction files: {0}",
386+
"Failed to determine connection information for the selected item.": "Failed to determine connection information for the selected item.",
381387
"Failed to extract the account endpoint from the selected node.": "Failed to extract the account endpoint from the selected node.",
382388
"Failed to extract the connection string from the selected account.": "Failed to extract the connection string from the selected account.",
383389
"Failed to find a matching Azure Resources API for version \"{0}\".": "Failed to find a matching Azure Resources API for version \"{0}\".",
@@ -515,6 +521,7 @@
515521
"Invalid input.": "Invalid input.",
516522
"Invalid LLM response: could not parse JSON payload": "Invalid LLM response: could not parse JSON payload",
517523
"Invalid LLM response: missing query": "Invalid LLM response: missing query",
524+
"Invalid name for {currentName}. Value must be 1-265 characters, cannot contain '/', '?', '#', or '\\', and cannot end with a space or any of those characters.": "Invalid name for {currentName}. Value must be 1-265 characters, cannot contain '/', '?', '#', or '\\', and cannot end with a space or any of those characters.",
518525
"Invalid semver \"{0}\".": "Invalid semver \"{0}\".",
519526
"Invalid: {count}": "Invalid: {count}",
520527
"Item content is undefined": "Item content is undefined",
@@ -561,13 +568,15 @@
561568
"Location": "Location",
562569
"Locked": "Locked",
563570
"Manually set column width": "Manually set column width",
571+
"Master key was not entered. Connection will be interrupted.": "Master key was not entered. Connection will be interrupted.",
564572
"Metric": "Metric",
565573
"Migrate your application from a relational database (RDBMS) to Azure Cosmos DB NoSQL with AI-assisted analysis. Follow the phases below to inventory your schema, analyze your application, and configure your target environment.": "Migrate your application from a relational database (RDBMS) to Azure Cosmos DB NoSQL with AI-assisted analysis. Follow the phases below to inventory your schema, analyze your application, and configure your target environment.",
566574
"Migration Configuration": "Migration Configuration",
567575
"Model": "Model",
568576
"More items": "More items",
569577
"More…": "More…",
570578
"my-cosmosdb-account": "my-cosmosdb-account",
579+
"Name cannot be more than {maxLength} characters": "Name cannot be more than {maxLength} characters",
571580
"New Connection": "New Connection",
572581
"New connection has been added to your workspace.": "New connection has been added to your workspace.",
573582
"New Connection…": "New Connection…",
@@ -737,6 +746,7 @@
737746
"Resize Column": "Resize Column",
738747
"Resource Group": "Resource Group",
739748
"Resource group \"{0}\" already exists in subscription \"{1}\".": "Resource group \"{0}\" already exists in subscription \"{1}\".",
749+
"Resource key not recognized: {resourceIdObj}": "Resource key not recognized: {resourceIdObj}",
740750
"Result": "Result",
741751
"Results for page {pageNumber} already exists": "Results for page {pageNumber} already exists",
742752
"Retrieved document count": "Retrieved document count",
@@ -879,7 +889,6 @@
879889
"The generated Bicep template \"main.bicep\" has been modified since the last schema conversion. Replace it with a freshly generated version?": "The generated Bicep template \"main.bicep\" has been modified since the last schema conversion. Replace it with a freshly generated version?",
880890
"The generated Bicep template was not found. It will be regenerated the next time you run schema conversion.": "The generated Bicep template was not found. It will be regenerated the next time you run schema conversion.",
881891
"The generated schema is {0} MB, which is very large and may impact performance. Do you want to save it?": "The generated schema is {0} MB, which is very large and may impact performance. Do you want to save it?",
882-
"The graph \"{containerId}\" has been deleted.": "The graph \"{containerId}\" has been deleted.",
883892
"The insertion failed with status code {0}": "The insertion failed with status code {0}",
884893
"The insertion of document {number} failed with error: {error}": "The insertion of document {number} failed with error: {error}",
885894
"The issue text was copied to the clipboard. Please paste it into this window.": "The issue text was copied to the clipboard. Please paste it into this window.",
@@ -901,6 +910,9 @@
901910
"The running Cosmos DB Shell was started without MCP. Please close it and try again.": "The running Cosmos DB Shell was started without MCP. Please close it and try again.",
902911
"The selected connection has been removed from your workspace.": "The selected connection has been removed from your workspace.",
903912
"The selected folder is outside the workspace. Would you like to copy its contents to the migration project?": "The selected folder is outside the workspace. Would you like to copy its contents to the migration project?",
913+
"The selected item does not have experience information.": "The selected item does not have experience information.",
914+
"The selected item is not a Cosmos DB container.": "The selected item is not a Cosmos DB container.",
915+
"The selected item is not a Cosmos DB database.": "The selected item is not a Cosmos DB database.",
904916
"The source relational database system you are migrating from. Examples: PostgreSQL, SQL Server, Oracle": "The source relational database system you are migrating from. Examples: PostgreSQL, SQL Server, Oracle",
905917
"The stored procedure \"{name}\" already exists in the container \"{containerId}\".": "The stored procedure \"{name}\" already exists in the container \"{containerId}\".",
906918
"The stored procedure {procedureId} has been deleted.": "The stored procedure {procedureId} has been deleted.",
@@ -944,6 +956,7 @@
944956
"Total time spent executing user-defined functions": "Total time spent executing user-defined functions",
945957
"Total: {count}": "Total: {count}",
946958
"Tracking migration progress in Git is recommended. Only exclude the .cosmosdb-migration folder if you prefer not to commit AI-generated migration artifacts to your repository.": "Tracking migration progress in Git is recommended. Only exclude the .cosmosdb-migration folder if you prefer not to commit AI-generated migration artifacts to your repository.",
959+
"Trailing space is not allowed": "Trailing space is not allowed",
947960
"Transform your RDBMS schema into optimized Cosmos DB NoSQL data models. This phase designs containers, partition keys, embedding strategies, access patterns, and indexing policies for each domain.": "Transform your RDBMS schema into optimized Cosmos DB NoSQL data models. This phase designs containers, partition keys, embedding strategies, access patterns, and indexing policies for each domain.",
948961
"Tree": "Tree",
949962
"Tree view": "Tree view",
@@ -959,6 +972,7 @@
959972
"Unable to extract account name from connection string": "Unable to extract account name from connection string",
960973
"Unable to find database \"{0}\" and container \"{1}\" in resource \"{2}\". Please ensure the resource exists and try again.": "Unable to find database \"{0}\" and container \"{1}\" in resource \"{2}\". Please ensure the resource exists and try again.",
961974
"Unable to find resource \"{0}\". Please ensure the resource exists and try again.": "Unable to find resource \"{0}\". Please ensure the resource exists and try again.",
975+
"Unable to get credential type for artifact type {artifactType}": "Unable to get credential type for artifact type {artifactType}",
962976
"Unable to parse execution result": "Unable to parse execution result",
963977
"Unable to reach emulator. Please ensure it is started and connected to the port specified by the 'cosmosDB.emulator.port' setting, then try again.": "Unable to reach emulator. Please ensure it is started and connected to the port specified by the 'cosmosDB.emulator.port' setting, then try again.",
964978
"Unable to sample the container schema. Query generation will continue without schema information, which may affect accuracy.": "Unable to sample the container schema. Query generation will continue without schema information, which may affect accuracy.",
@@ -971,6 +985,7 @@
971985
"Unknown operation: {0}": "Unknown operation: {0}",
972986
"Unsupported Account": "Unsupported Account",
973987
"Unsupported account type": "Unsupported account type",
988+
"Unsupported artifact type": "Unsupported artifact type",
974989
"Unsupported credential type: {type}": "Unsupported credential type: {type}",
975990
"Unsupported resource provider: {0}. This extension only supports Cosmos DB resources.": "Unsupported resource provider: {0}. This extension only supports Cosmos DB resources.",
976991
"Unsupported resource type": "Unsupported resource type",
@@ -1011,8 +1026,8 @@
10111026
"WARNING: Cannot create resource group \"{0}\" because the selected subscription is a concierge subscription. Using resource group \"{1}\" instead.": "WARNING: Cannot create resource group \"{0}\" because the selected subscription is a concierge subscription. Using resource group \"{1}\" instead.",
10121027
"WARNING: Provider \"{0}\" does not support location \"{1}\". Using \"{2}\" instead.": "WARNING: Provider \"{0}\" does not support location \"{1}\". Using \"{2}\" instead.",
10131028
"WARNING: Resource does not support extended location \"{0}\". Using \"{1}\" instead.": "WARNING: Resource does not support extended location \"{0}\". Using \"{1}\" instead.",
1014-
"Working…": "Working…",
10151029
"Workspace": "Workspace",
1030+
"Workspace not found for id {0}": "Workspace not found for id {0}",
10161031
"Yes": "Yes",
10171032
"You are not signed in to an Azure account. Please sign in.": "You are not signed in to an Azure account. Please sign in.",
10181033
"You do not have permission to create a resource group in subscription \"{0}\".": "You do not have permission to create a resource group in subscription \"{0}\".",

packages/nosql-language-service/scripts/demo.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
// Usage: node scripts/demo.mjs (requires prior `pnpm run build`)
1212
// ---------------------------------------------------------------------------
1313

14-
// eslint-disable-next-line import/no-internal-modules
1514
import { getCompletions } from '../dist/esm/completion/SqlCompletion.js';
16-
// eslint-disable-next-line import/no-internal-modules
1715
import { parse } from '../dist/esm/index.js';
1816

1917
const schema = {

src/__mocks__/vscode.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@
88
// correctly. An ESM `export default` would wrap everything under `.default` and break tests.
99
// The file is excluded from all linters via ignorePatterns ("**/__mocks__/**/*").
1010

11-
// eslint-disable-next-line @typescript-eslint/no-require-imports
1211
const { createVSCodeMock } = require('jest-mock-vscode');
1312

1413
// With globals: true in vitest.config.ts, `vi` is injected as a global in the test environment.
1514
// jest-mock-vscode is framework-agnostic: it only calls testFramework.fn() internally,
1615
// so passing `vi` works perfectly with Vitest.
17-
// eslint-disable-next-line no-undef
1816
const vsCodeMock = createVSCodeMock(vi);
1917

20-
// eslint-disable-next-line no-undef
2118
vsCodeMock.l10n = {
22-
// eslint-disable-next-line no-undef
2319
t: vi.fn((msg) => msg),
2420
};
2521

src/chat/cosmosDbChatParticipant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ export class CosmosDbChatParticipant {
332332
if (extReq.model) {
333333
return extReq.model;
334334
}
335-
return await getSelectedModel().catch(() => null);
335+
return getSelectedModel().catch(() => null);
336336
}
337337

338338
/**

src/commands/copyConnectionString/copyConnectionString.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ import { type IActionContext } from '@microsoft/vscode-azext-utils';
77
import { AzExtResourceType } from '@microsoft/vscode-azureresources-api';
88
import * as l10n from '@vscode/l10n';
99
import * as vscode from 'vscode';
10-
import { ext } from '../../extensionVariables';
10+
import { type CosmosDBAccountResourceItemBase } from '../../tree/azure-resources-view/cosmosdb/CosmosDBAccountResourceItemBase';
11+
import { isFabricTreeElement, type FabricTreeElement } from '../../tree/fabric-resources-view/FabricTreeElement';
1112
import { isTreeElement, type TreeElement } from '../../tree/TreeElement';
1213
import { isTreeElementWithContextValue } from '../../tree/TreeElementWithContextValue';
1314
import { isTreeElementWithExperience } from '../../tree/TreeElementWithExperience';
14-
import { type CosmosDBAccountResourceItemBase } from '../../tree/azure-resources-view/cosmosdb/CosmosDBAccountResourceItemBase';
15-
import { isFabricTreeElement, type FabricTreeElement } from '../../tree/fabric-resources-view/FabricTreeElement';
1615
import { pickAppResource } from '../../utils/pickItem/pickAppResource';
1716

1817
export async function copyConnectionString(
@@ -32,17 +31,15 @@ export async function copyConnectionString(
3231
return undefined;
3332
}
3433

35-
const connectionString = await ext.state.runWithTemporaryDescription(element.id, l10n.t('Working…'), async () => {
36-
if (isTreeElementWithExperience(element)) {
37-
context.telemetry.properties.experience = element.experience.api;
38-
}
39-
40-
if (isTreeElementWithContextValue(element) && element.contextValue.includes('treeItem.account')) {
41-
return (element as CosmosDBAccountResourceItemBase).getConnectionString();
42-
}
34+
if (isTreeElementWithExperience(element)) {
35+
context.telemetry.properties.experience = element.experience.api;
36+
}
4337

38+
if (!isTreeElementWithContextValue(element) || !element.contextValue.includes('treeItem.account')) {
4439
return undefined;
45-
});
40+
}
41+
42+
const connectionString = await (element as CosmosDBAccountResourceItemBase).getConnectionString();
4643

4744
if (!connectionString) {
4845
void vscode.window.showErrorMessage(

src/commands/createContainer/CosmosDBExecuteStep.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class CosmosDBExecuteStep extends AzureWizardExecuteStep<CreateContainerW
1313
public priority: number = 100;
1414

1515
public async execute(context: CreateContainerWizardContext): Promise<void> {
16-
const { containerName, partitionKey, throughput, databaseId, nodeId } = context;
16+
const { containerName, partitionKey, throughput, maxThroughput, databaseId, nodeId } = context;
1717

1818
return ext.state.showCreatingChild(
1919
nodeId,
@@ -28,6 +28,7 @@ export class CosmosDBExecuteStep extends AzureWizardExecuteStep<CreateContainerW
2828
partitionKey,
2929
},
3030
throughput,
31+
maxThroughput,
3132
);
3233
},
3334
);

src/commands/createContainer/CosmosDBPartitionKeyStep.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import { AzureWizardPromptStep } from '@microsoft/vscode-azext-utils';
77
import * as l10n from '@vscode/l10n';
8+
import { API } from '../../AzureDBExperiences';
89
import { type CreateContainerWizardContext } from './CreateContainerWizardContext';
910

1011
const partitionKeyLearnMoreLink = 'https://learn.microsoft.com/azure/cosmos-db/partitioning-overview';
@@ -63,6 +64,16 @@ export class CosmosDBPartitionKeyStep extends AzureWizardPromptStep<CreateContai
6364
}
6465

6566
public shouldPrompt(context: CreateContainerWizardContext): boolean {
67+
// If experience does NOT support hierarchical partition key
68+
if (
69+
this.hierarchyStep !== 'first' &&
70+
context.experience.api !== API.Core &&
71+
context.experience.api !== API.FabricNative &&
72+
context.experience.api !== API.FabricMirrored
73+
) {
74+
return false;
75+
}
76+
6677
if (this.hierarchyStep === 'first' || this.hierarchyStep === 'second') {
6778
return true;
6879
}

0 commit comments

Comments
 (0)