Skip to content

Commit cb2fad3

Browse files
ayeshurunAlon YeshurunCopilot
authored
fix: fix support of cosmos db in ls command (#169)
Co-authored-by: Alon Yeshurun <alonyeshurun+microsoft@microsoft.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 5e6f5de commit cb2fad3

8 files changed

Lines changed: 1017 additions & 236 deletions

File tree

.github/workflows/create-release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ on:
44
workflow_dispatch:
55
inputs:
66
version:
7-
description: "The version to release (e.g., v1.2.0)"
7+
description: 'The version to release (e.g., v1.2.0)'
88
required: true
99
commit_sha:
10-
description: "Optional: Commit SHA to create the tag on. If not provided, the tag will be created on the latest commit of the current branch (HEAD)"
10+
description: 'Optional: Commit SHA to create the tag on. If not provided, the tag will be created on the latest commit of the current branch (HEAD)'
1111
required: false
12-
default: ""
12+
default: ''
1313

1414
jobs:
1515
create-release:
@@ -20,7 +20,7 @@ jobs:
2020
- name: Checkout code
2121
uses: actions/checkout@v4
2222
with:
23-
fetch-depth: 0 # Required to access full commit history for validation
23+
fetch-depth: 0 # Required to access full commit history for validation
2424

2525
- name: Display workflow information
2626
run: |
@@ -65,22 +65,22 @@ jobs:
6565
run: |
6666
VERSION="${{ github.event.inputs.version }}"
6767
COMMIT_SHA="${{ github.event.inputs.commit_sha }}"
68-
68+
6969
# Use provided commit SHA or default to HEAD
7070
if [ -n "$COMMIT_SHA" ]; then
7171
TARGET_COMMIT="$COMMIT_SHA"
7272
else
7373
TARGET_COMMIT="HEAD"
7474
fi
75-
75+
7676
echo "tag_name=$VERSION" >> $GITHUB_OUTPUT
7777
echo "changelog_file_path=.changes/${VERSION}.md" >> $GITHUB_OUTPUT
7878
echo "target_commit=$TARGET_COMMIT" >> $GITHUB_OUTPUT
79-
79+
8080
# Get the actual commit SHA for display
8181
ACTUAL_SHA=$(git rev-parse "$TARGET_COMMIT")
8282
echo "actual_sha=$ACTUAL_SHA" >> $GITHUB_OUTPUT
83-
83+
8484
echo "✅ Release variables set:"
8585
echo " - Tag name: $VERSION"
8686
echo " - Target commit: $ACTUAL_SHA"

src/fabric_cli/core/fab_types.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,12 @@ class SQLDatabaseFolders(Enum):
404404
FILES = "Files"
405405
CODE = "Code"
406406

407+
class CosmosDBDatabaseFolders(Enum):
408+
TABLES = "Tables"
409+
FILES = "Files"
410+
CODE = "Code"
411+
AUDIT = "Audit"
412+
407413

408414
# TODO validate MirroredWarehouse OneLake folders
409415
class MirroredDatabaseFolders(Enum):
@@ -422,6 +428,7 @@ class MirroredDatabaseFolders(Enum):
422428
ItemType.MIRRORED_DATABASE: [folder.value for folder in MirroredDatabaseFolders],
423429
ItemType.MIRRORED_WAREHOUSE: [folder.value for folder in MirroredDatabaseFolders],
424430
ItemType.SQL_DATABASE: [folder.value for folder in SQLDatabaseFolders],
431+
ItemType.COSMOS_DB_DATABASE: [folder.value for folder in CosmosDBDatabaseFolders],
425432
}
426433

427434
OnelakeWritableFolders = ["Files", "Libs", "Main"]

tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interactions:
1111
Content-Type:
1212
- application/json
1313
User-Agent:
14-
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
14+
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
1515
method: GET
1616
uri: https://api.fabric.microsoft.com/v1/workspaces
1717
response:
@@ -26,15 +26,15 @@ interactions:
2626
Content-Encoding:
2727
- gzip
2828
Content-Length:
29-
- '1517'
29+
- '2834'
3030
Content-Type:
3131
- application/json; charset=utf-8
3232
Date:
33-
- Sun, 16 Nov 2025 13:28:59 GMT
33+
- Thu, 05 Feb 2026 13:47:58 GMT
3434
Pragma:
3535
- no-cache
3636
RequestId:
37-
- a1ca655d-adf4-4a7a-8d2c-2dc3ab03e53b
37+
- 2008fda1-a5a1-4dc4-a215-75cd81a5aa58
3838
Strict-Transport-Security:
3939
- max-age=31536000; includeSubDomains
4040
X-Content-Type-Options:
@@ -60,7 +60,7 @@ interactions:
6060
Content-Type:
6161
- application/json
6262
User-Agent:
63-
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
63+
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
6464
method: GET
6565
uri: https://api.fabric.microsoft.com/v1/workspaces
6666
response:
@@ -75,15 +75,15 @@ interactions:
7575
Content-Encoding:
7676
- gzip
7777
Content-Length:
78-
- '1517'
78+
- '2834'
7979
Content-Type:
8080
- application/json; charset=utf-8
8181
Date:
82-
- Sun, 16 Nov 2025 13:29:00 GMT
82+
- Thu, 05 Feb 2026 13:47:58 GMT
8383
Pragma:
8484
- no-cache
8585
RequestId:
86-
- 4fb405d9-466a-4e9d-81f3-a61091331c8a
86+
- 1d8c3a58-af0b-4078-a948-12b40a0292bb
8787
Strict-Transport-Security:
8888
- max-age=31536000; includeSubDomains
8989
X-Content-Type-Options:
@@ -109,13 +109,13 @@ interactions:
109109
Content-Type:
110110
- application/json
111111
User-Agent:
112-
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
112+
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
113113
method: GET
114114
uri: https://api.fabric.microsoft.com/v1/capacities
115115
response:
116116
body:
117117
string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName":
118-
"mocked_fabriccli_capacity_name", "sku": "F2", "region": "Central US", "state":
118+
"mocked_fabriccli_capacity_name", "sku": "F16", "region": "Central US", "state":
119119
"Active"}]}'
120120
headers:
121121
Access-Control-Expose-Headers:
@@ -125,15 +125,15 @@ interactions:
125125
Content-Encoding:
126126
- gzip
127127
Content-Length:
128-
- '271'
128+
- '425'
129129
Content-Type:
130130
- application/json; charset=utf-8
131131
Date:
132-
- Sun, 16 Nov 2025 13:29:05 GMT
132+
- Thu, 05 Feb 2026 13:48:02 GMT
133133
Pragma:
134134
- no-cache
135135
RequestId:
136-
- 9a962d92-07ed-4680-97dc-c07909f25e22
136+
- af55f273-fdb0-41c9-bf85-607803366fb5
137137
Strict-Transport-Security:
138138
- max-age=31536000; includeSubDomains
139139
X-Content-Type-Options:
@@ -162,12 +162,12 @@ interactions:
162162
Content-Type:
163163
- application/json
164164
User-Agent:
165-
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
165+
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
166166
method: POST
167167
uri: https://api.fabric.microsoft.com/v1/workspaces
168168
response:
169169
body:
170-
string: '{"id": "7b82ecee-ed54-4d87-84dd-07511c5f5ad2", "displayName": "fabriccli_WorkspacePerTestclass_000001",
170+
string: '{"id": "ebe5f85c-0343-4508-9d2d-a8299cfea504", "displayName": "fabriccli_WorkspacePerTestclass_000001",
171171
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
172172
headers:
173173
Access-Control-Expose-Headers:
@@ -177,17 +177,17 @@ interactions:
177177
Content-Encoding:
178178
- gzip
179179
Content-Length:
180-
- '189'
180+
- '187'
181181
Content-Type:
182182
- application/json; charset=utf-8
183183
Date:
184-
- Sun, 16 Nov 2025 13:29:14 GMT
184+
- Thu, 05 Feb 2026 13:48:09 GMT
185185
Location:
186-
- https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2
186+
- https://api.fabric.microsoft.com/v1/workspaces/ebe5f85c-0343-4508-9d2d-a8299cfea504
187187
Pragma:
188188
- no-cache
189189
RequestId:
190-
- a9920ffb-8339-43a8-8f5b-ab313cafb507
190+
- 831b42b8-59e6-45bf-96b0-7985c7063e11
191191
Strict-Transport-Security:
192192
- max-age=31536000; includeSubDomains
193193
X-Content-Type-Options:
@@ -213,13 +213,13 @@ interactions:
213213
Content-Type:
214214
- application/json
215215
User-Agent:
216-
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
216+
- ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
217217
method: GET
218218
uri: https://api.fabric.microsoft.com/v1/workspaces
219219
response:
220220
body:
221221
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
222-
"My workspace", "description": "", "type": "Personal"}, {"id": "7b82ecee-ed54-4d87-84dd-07511c5f5ad2",
222+
"My workspace", "description": "", "type": "Personal"}, {"id": "ebe5f85c-0343-4508-9d2d-a8299cfea504",
223223
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
224224
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
225225
headers:
@@ -230,15 +230,15 @@ interactions:
230230
Content-Encoding:
231231
- gzip
232232
Content-Length:
233-
- '1551'
233+
- '2901'
234234
Content-Type:
235235
- application/json; charset=utf-8
236236
Date:
237-
- Sun, 16 Nov 2025 13:29:43 GMT
237+
- Thu, 05 Feb 2026 13:48:51 GMT
238238
Pragma:
239239
- no-cache
240240
RequestId:
241-
- 760e6315-8597-44fc-807f-62840e999e08
241+
- c3f8f00d-5ab2-48c3-813c-b155b598a7d0
242242
Strict-Transport-Security:
243243
- max-age=31536000; includeSubDomains
244244
X-Content-Type-Options:
@@ -264,14 +264,12 @@ interactions:
264264
Content-Type:
265265
- application/json
266266
User-Agent:
267-
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
267+
- ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
268268
method: GET
269-
uri: https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2/items
269+
uri: https://api.fabric.microsoft.com/v1/workspaces/ebe5f85c-0343-4508-9d2d-a8299cfea504/items
270270
response:
271271
body:
272-
string: '{"value": [{"id": "2d69f214-7721-41c3-a595-1ac4960a7215", "type": "Notebook",
273-
"displayName": "fabcli000001", "description": "Created by fab", "workspaceId":
274-
"7b82ecee-ed54-4d87-84dd-07511c5f5ad2"}]}'
272+
string: '{"value": []}'
275273
headers:
276274
Access-Control-Expose-Headers:
277275
- RequestId
@@ -280,15 +278,15 @@ interactions:
280278
Content-Encoding:
281279
- gzip
282280
Content-Length:
283-
- '176'
281+
- '32'
284282
Content-Type:
285283
- application/json; charset=utf-8
286284
Date:
287-
- Sun, 16 Nov 2025 13:29:44 GMT
285+
- Thu, 05 Feb 2026 13:48:51 GMT
288286
Pragma:
289287
- no-cache
290288
RequestId:
291-
- 8f711d74-2ab1-4d92-9c00-f90f31843fe1
289+
- c4c73c19-cae6-4865-b3b9-86e803fdf296
292290
Strict-Transport-Security:
293291
- max-age=31536000; includeSubDomains
294292
X-Content-Type-Options:
@@ -316,9 +314,9 @@ interactions:
316314
Content-Type:
317315
- application/json
318316
User-Agent:
319-
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
317+
- ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
320318
method: DELETE
321-
uri: https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2
319+
uri: https://api.fabric.microsoft.com/v1/workspaces/ebe5f85c-0343-4508-9d2d-a8299cfea504
322320
response:
323321
body:
324322
string: ''
@@ -334,11 +332,11 @@ interactions:
334332
Content-Type:
335333
- application/octet-stream
336334
Date:
337-
- Sun, 16 Nov 2025 13:29:45 GMT
335+
- Thu, 05 Feb 2026 13:48:51 GMT
338336
Pragma:
339337
- no-cache
340338
RequestId:
341-
- 87dce47d-17c3-48d7-8046-89b2600e75b1
339+
- 7af2a487-ebea-4831-a586-ab5259143e49
342340
Strict-Transport-Security:
343341
- max-age=31536000; includeSubDomains
344342
X-Content-Type-Options:

0 commit comments

Comments
 (0)