diff --git a/.changes/unreleased/optimization-20260203-163440.yaml b/.changes/unreleased/optimization-20260203-163440.yaml new file mode 100644 index 00000000..2b0e3974 --- /dev/null +++ b/.changes/unreleased/optimization-20260203-163440.yaml @@ -0,0 +1,6 @@ +kind: optimization +body: Add visual divider between folders and items in `ls` command on workspaces with text output format +time: 2026-02-03T16:34:40.477661885Z +custom: + Author: ayeshurun + AuthorLink: https://github.com/ayeshurun diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 026a334d..fbaa15b3 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -4,12 +4,12 @@ on: workflow_dispatch: inputs: version: - description: "The version to release (e.g., v1.2.0)" + description: 'The version to release (e.g., v1.2.0)' required: true commit_sha: - 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)" + 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)' required: false - default: "" + default: '' jobs: create-release: @@ -20,7 +20,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - fetch-depth: 0 # Required to access full commit history for validation + fetch-depth: 0 # Required to access full commit history for validation - name: Display workflow information run: | @@ -65,22 +65,22 @@ jobs: run: | VERSION="${{ github.event.inputs.version }}" COMMIT_SHA="${{ github.event.inputs.commit_sha }}" - + # Use provided commit SHA or default to HEAD if [ -n "$COMMIT_SHA" ]; then TARGET_COMMIT="$COMMIT_SHA" else TARGET_COMMIT="HEAD" fi - + echo "tag_name=$VERSION" >> $GITHUB_OUTPUT echo "changelog_file_path=.changes/${VERSION}.md" >> $GITHUB_OUTPUT echo "target_commit=$TARGET_COMMIT" >> $GITHUB_OUTPUT - + # Get the actual commit SHA for display ACTUAL_SHA=$(git rev-parse "$TARGET_COMMIT") echo "actual_sha=$ACTUAL_SHA" >> $GITHUB_OUTPUT - + echo "✅ Release variables set:" echo " - Tag name: $VERSION" echo " - Target commit: $ACTUAL_SHA" diff --git a/src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py b/src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py index f2e1e19a..11393b67 100644 --- a/src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py +++ b/src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py @@ -10,12 +10,68 @@ from fabric_cli.utils import fab_cmd_fs_utils as utils_fs from fabric_cli.utils import fab_cmd_ls_utils as utils_ls +# Divider used to separate folders and items in workspace listings +_DIVIDER = "------------------------------" + + +def _sort_ws_elements_with_seperation( + ws_elements: list[Union[Item, Folder]], show_details: bool +) -> list[dict]: + """ + Groups elements by type (Folders first, then Items), sorts each group using sort_ws_elements, + and inserts a divider between non-empty groups. + + Args: + ws_elements: List of workspace elements (Items and Folders) + show_details: Whether to include detailed columns + + Returns: + list: Single list with folders first, divider, then items + """ + if not ws_elements: + return [] + + result = [] + first_group = True + type_order = [Folder, Item] + + for typ in type_order: + group = [el for el in ws_elements if isinstance(el, typ)] + if group: + group_dicts = utils_fs.sort_ws_elements(group, show_details) + if not first_group: + divider = {"name": _DIVIDER} + if show_details: + divider["id"] = "" + result.append(divider) + result.extend(group_dicts) + first_group = False + + return result + def exec(workspace: Workspace, args): show_details = bool(args.long) show_all = bool(args.all) ws_elements: list[Union[Item, Folder]] = utils_fs.get_ws_elements(workspace) - sorted_elements_dict = utils_fs.sort_ws_elements(ws_elements, show_details) + + # Check if folder listing is enabled + folder_listing_enabled = ( + fab_state_config.get_config(fab_constant.FAB_FOLDER_LISTING_ENABLED) == "true" + ) + + # Get output format from args or config + output_format = getattr(args, "output_format", None) or fab_state_config.get_config( + fab_constant.FAB_OUTPUT_FORMAT + ) + + # Use separation if folder listing is enabled, output is text format, and --long is not provided + if folder_listing_enabled and output_format == "text" and not show_details: + sorted_elements_dict = _sort_ws_elements_with_seperation( + ws_elements, show_details + ) + else: + sorted_elements_dict = utils_fs.sort_ws_elements(ws_elements, show_details) show_hidden = ( show_all or fab_state_config.get_config(fab_constant.FAB_SHOW_HIDDEN) == "true" diff --git a/tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml b/tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml index d7e759d0..3d2ee1e7 100644 --- a/tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml +++ b/tests/test_commands/recordings/test_commands/test_ls/class_setup.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: @@ -26,15 +26,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '1517' + - '2096' Content-Type: - application/json; charset=utf-8 Date: - - Sun, 16 Nov 2025 13:28:59 GMT + - Tue, 06 Jan 2026 13:09:57 GMT Pragma: - no-cache RequestId: - - a1ca655d-adf4-4a7a-8d2c-2dc3ab03e53b + - 0ec0d210-30ae-4090-85e2-325c932f8c3a Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -60,7 +60,7 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: @@ -75,15 +75,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '1517' + - '2096' Content-Type: - application/json; charset=utf-8 Date: - - Sun, 16 Nov 2025 13:29:00 GMT + - Tue, 06 Jan 2026 13:09:57 GMT Pragma: - no-cache RequestId: - - 4fb405d9-466a-4e9d-81f3-a61091331c8a + - b8741740-c7ed-4a13-9a48-3e7e9433efa2 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -109,13 +109,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/capacities response: body: string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName": - "mocked_fabriccli_capacity_name", "sku": "F2", "region": "Central US", "state": + "mocked_fabriccli_capacity_name", "sku": "F32", "region": "Central US", "state": "Active"}]}' headers: Access-Control-Expose-Headers: @@ -125,15 +125,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '271' + - '425' Content-Type: - application/json; charset=utf-8 Date: - - Sun, 16 Nov 2025 13:29:05 GMT + - Tue, 06 Jan 2026 13:10:01 GMT Pragma: - no-cache RequestId: - - 9a962d92-07ed-4680-97dc-c07909f25e22 + - 47895aad-73fd-49c2-b5f1-6242b5c9b3d8 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -162,12 +162,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: POST uri: https://api.fabric.microsoft.com/v1/workspaces response: body: - string: '{"id": "7b82ecee-ed54-4d87-84dd-07511c5f5ad2", "displayName": "fabriccli_WorkspacePerTestclass_000001", + string: '{"id": "b86e9b69-16a9-4078-aff8-922ba052431e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}' headers: Access-Control-Expose-Headers: @@ -177,17 +177,17 @@ interactions: Content-Encoding: - gzip Content-Length: - - '189' + - '188' Content-Type: - application/json; charset=utf-8 Date: - - Sun, 16 Nov 2025 13:29:14 GMT + - Tue, 06 Jan 2026 13:10:08 GMT Location: - - https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2 + - https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e Pragma: - no-cache RequestId: - - a9920ffb-8339-43a8-8f5b-ab313cafb507 + - 4611b486-ee97-401f-bc7f-d686e34ee3b1 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -213,13 +213,13 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET uri: https://api.fabric.microsoft.com/v1/workspaces response: body: string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "7b82ecee-ed54-4d87-84dd-07511c5f5ad2", + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' headers: @@ -230,15 +230,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '1551' + - '2130' Content-Type: - application/json; charset=utf-8 Date: - - Sun, 16 Nov 2025 13:29:43 GMT + - Tue, 06 Jan 2026 13:10:51 GMT Pragma: - no-cache RequestId: - - 760e6315-8597-44fc-807f-62840e999e08 + - 8a1402e0-38c2-4bb2-89d0-eb8582dbd688 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -264,14 +264,12 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2/items + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items response: body: - string: '{"value": [{"id": "2d69f214-7721-41c3-a595-1ac4960a7215", "type": "Notebook", - "displayName": "fabcli000001", "description": "Created by fab", "workspaceId": - "7b82ecee-ed54-4d87-84dd-07511c5f5ad2"}]}' + string: '{"value": []}' headers: Access-Control-Expose-Headers: - RequestId @@ -280,15 +278,15 @@ interactions: Content-Encoding: - gzip Content-Length: - - '176' + - '32' Content-Type: - application/json; charset=utf-8 Date: - - Sun, 16 Nov 2025 13:29:44 GMT + - Tue, 06 Jan 2026 13:10:51 GMT Pragma: - no-cache RequestId: - - 8f711d74-2ab1-4d92-9c00-f90f31843fe1 + - 60a90680-1baf-41a3-b15e-9be0bad4932d Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: @@ -316,9 +314,9 @@ interactions: Content-Type: - application/json User-Agent: - - ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) + - ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2) method: DELETE - uri: https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2 + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e response: body: string: '' @@ -334,11 +332,11 @@ interactions: Content-Type: - application/octet-stream Date: - - Sun, 16 Nov 2025 13:29:45 GMT + - Tue, 06 Jan 2026 13:10:51 GMT Pragma: - no-cache RequestId: - - 87dce47d-17c3-48d7-8046-89b2600e75b1 + - 4a7ae808-9baa-4b36-9657-a1ea8f286ae3 Strict-Transport-Security: - max-age=31536000; includeSubDomains X-Content-Type-Options: diff --git a/tests/test_commands/recordings/test_commands/test_ls/test_ls_workspace_with_folders_and_items_divider.yaml b/tests/test_commands/recordings/test_commands/test_ls/test_ls_workspace_with_folders_and_items_divider.yaml new file mode 100644 index 00000000..1bd889e8 --- /dev/null +++ b/tests/test_commands/recordings/test_commands/test_ls/test_ls_workspace_with_folders_and_items_divider.yaml @@ -0,0 +1,1828 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:09 GMT + Pragma: + - no-cache + RequestId: + - dc956bd6-9bf7-4afb-b80c-555fc38cc8b2 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders?recursive=True + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:09 GMT + Pragma: + - no-cache + RequestId: + - cfc2c0b3-1649-420f-bb46-c60dd540c061 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders?recursive=True + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:10 GMT + Pragma: + - no-cache + RequestId: + - 6a9c9dce-09b2-4e55-b766-80daad5fa69e + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: '{"description": "Created by fab", "displayName": "fabcli000001"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '68' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders + response: + body: + string: '{"id": "73215121-da61-4ea8-9be7-ab29ebcb3b52", "displayName": "fabcli000001", + "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '131' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:11 GMT + Location: + - https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders/73215121-da61-4ea8-9be7-ab29ebcb3b52 + Pragma: + - no-cache + RequestId: + - 733b50d1-06ff-4e35-b9e0-568cb7c7cd31 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:11 GMT + Pragma: + - no-cache + RequestId: + - 1a19c016-9c53-4fa2-9ab0-7fbf99cd4286 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders?recursive=True + response: + body: + string: '{"value": [{"id": "73215121-da61-4ea8-9be7-ab29ebcb3b52", "displayName": + "fabcli000001", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '144' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:12 GMT + Pragma: + - no-cache + RequestId: + - 8db3d7e9-8225-45da-9d64-eb96f189273c + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders?recursive=True + response: + body: + string: '{"value": [{"id": "73215121-da61-4ea8-9be7-ab29ebcb3b52", "displayName": + "fabcli000001", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '144' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:12 GMT + Pragma: + - no-cache + RequestId: + - c2af5dc2-4e4e-4580-ad89-6d407c86c14f + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: '{"description": "Created by fab", "displayName": "fabcli000002"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '68' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders + response: + body: + string: '{"id": "109bfca1-736b-4860-8dcb-51254b0b43a0", "displayName": "fabcli000002", + "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '133' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:12 GMT + Location: + - https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders/109bfca1-736b-4860-8dcb-51254b0b43a0 + Pragma: + - no-cache + RequestId: + - 9f10c962-e15d-422f-b0af-0bb18a5a44bb + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:13 GMT + Pragma: + - no-cache + RequestId: + - d1251b37-72fd-4326-a8e4-59515e361341 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:14 GMT + Pragma: + - no-cache + RequestId: + - 593ceb8a-6605-4b92-8790-a2875a943e80 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items + response: + body: + string: '{"value": []}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '32' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:14 GMT + Pragma: + - no-cache + RequestId: + - 303aa9f6-4073-4624-a73d-93b385e0480f + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: '{"description": "Created by fab", "displayName": "fabcli000003", "type": + "Notebook", "folderId": null, "definition": {"parts": [{"path": "notebook-content.py", + "payload": "IyBGYWJyaWMgbm90ZWJvb2sgc291cmNlCgojIE1FVEFEQVRBICoqKioqKioqKioqKioqKioqKioqCgojIE1FVEEgewojIE1FVEEgICAia2VybmVsX2luZm8iOiB7CiMgTUVUQSAgICAgIm5hbWUiOiAic3luYXBzZV9weXNwYXJrIgojIE1FVEEgICB9LAojIE1FVEEgICAiZGVwZW5kZW5jaWVzIjoge30KIyBNRVRBIH0KCiMgQ0VMTCAqKioqKioqKioqKioqKioqKioqKgoKIyBXZWxjb21lIHRvIHlvdXIgbmV3IG5vdGVib29rCiMgVHlwZSBoZXJlIGluIHRoZSBjZWxsIGVkaXRvciB0byBhZGQgY29kZSEKCgojIE1FVEFEQVRBICoqKioqKioqKioqKioqKioqKioqCgojIE1FVEEgewojIE1FVEEgICAibGFuZ3VhZ2UiOiAicHl0aG9uIiwKIyBNRVRBICAgImxhbmd1YWdlX2dyb3VwIjogInN5bmFwc2VfcHlzcGFyayIKIyBNRVRBIH0K", + "payloadType": "InlineBase64"}]}}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '764' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/notebooks + response: + body: + string: 'null' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,Retry-After,ETag,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '24' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:16 GMT + ETag: + - '""' + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a5db9047-3105-4316-a76c-b1e308a775b7 + Pragma: + - no-cache + RequestId: + - ca2727f1-2a56-465a-adb6-68669fff2953 + Retry-After: + - '20' + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + x-ms-operation-id: + - a5db9047-3105-4316-a76c-b1e308a775b7 + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a5db9047-3105-4316-a76c-b1e308a775b7 + response: + body: + string: '{"status": "Succeeded", "createdTimeUtc": "2026-01-06T13:10:15.6422085", + "lastUpdatedTimeUtc": "2026-01-06T13:10:17.4077736", "percentComplete": 100, + "error": null}' + headers: + Access-Control-Expose-Headers: + - RequestId,Location,x-ms-operation-id + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:36 GMT + Location: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a5db9047-3105-4316-a76c-b1e308a775b7/result + Pragma: + - no-cache + RequestId: + - 8f5cd8c3-98a0-48e8-bfe9-ed7ba9dc6db6 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + x-ms-operation-id: + - a5db9047-3105-4316-a76c-b1e308a775b7 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://wabi-us-central-b-primary-redirect.analysis.windows.net/v1/operations/a5db9047-3105-4316-a76c-b1e308a775b7/result + response: + body: + string: '{"id": "b4f51569-39f9-4fe4-bf61-25acf8c12a08", "type": "Notebook", + "displayName": "fabcli000003", "description": "Created by fab", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Type: + - application/json + Date: + - Tue, 06 Jan 2026 13:10:37 GMT + Pragma: + - no-cache + RequestId: + - 0581a749-f2ea-40bd-9464-6c0abb4d8ef0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Transfer-Encoding: + - chunked + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:37 GMT + Pragma: + - no-cache + RequestId: + - 913023f2-4bde-4700-8fbf-5be0d03b8b47 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items + response: + body: + string: '{"value": [{"id": "b4f51569-39f9-4fe4-bf61-25acf8c12a08", "type": "Notebook", + "displayName": "fabcli000003", "description": "Created by fab", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '178' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:38 GMT + Pragma: + - no-cache + RequestId: + - a8177d62-369e-4ec7-908a-0d01bc2656cf + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items + response: + body: + string: '{"value": [{"id": "b4f51569-39f9-4fe4-bf61-25acf8c12a08", "type": "Notebook", + "displayName": "fabcli000003", "description": "Created by fab", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '178' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:38 GMT + Pragma: + - no-cache + RequestId: + - 484dae85-3bcf-4b95-8584-3b2490dd8bff + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: '{"description": "Created by fab", "displayName": "fabcli000004", "type": + "Lakehouse", "folderId": null}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: POST + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/lakehouses + response: + body: + string: '{"id": "1a181355-da9b-4664-a767-ac7474da12bb", "type": "Lakehouse", + "displayName": "fabcli000004", "description": "Created by fab", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}' + headers: + Access-Control-Expose-Headers: + - RequestId,ETag + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '168' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:42 GMT + ETag: + - '""' + Pragma: + - no-cache + RequestId: + - 212a0de6-08b4-4f72-b32a-cb4d1010cfeb + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:43 GMT + Pragma: + - no-cache + RequestId: + - c7375d43-00a2-44c9-b9a6-d688c709bdcb + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items + response: + body: + string: '{"value": [{"id": "b4f51569-39f9-4fe4-bf61-25acf8c12a08", "type": "Notebook", + "displayName": "fabcli000003", "description": "Created by fab", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}, {"id": "1a181355-da9b-4664-a767-ac7474da12bb", + "type": "Lakehouse", "displayName": "fabcli000004", "description": "Created + by fab", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '230' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:43 GMT + Pragma: + - no-cache + RequestId: + - ca16d17a-e059-468e-90a2-2104b34ed24e + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders?recursive=True + response: + body: + string: '{"value": [{"id": "109bfca1-736b-4860-8dcb-51254b0b43a0", "displayName": + "fabcli000002", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}, {"id": + "73215121-da61-4ea8-9be7-ab29ebcb3b52", "displayName": "fabcli000001", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '184' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:44 GMT + Pragma: + - no-cache + RequestId: + - fb5d8ef6-ea3d-4c66-a628-c79842812652 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:44 GMT + Pragma: + - no-cache + RequestId: + - 2ae1e5a0-e31e-4bb9-85a5-54aad678cc01 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items + response: + body: + string: '{"value": [{"id": "b4f51569-39f9-4fe4-bf61-25acf8c12a08", "type": "Notebook", + "displayName": "fabcli000003", "description": "Created by fab", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}, {"id": "1a181355-da9b-4664-a767-ac7474da12bb", + "type": "Lakehouse", "displayName": "fabcli000004", "description": "Created + by fab", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '230' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:44 GMT + Pragma: + - no-cache + RequestId: + - 79f98290-d56d-4871-ba78-0e83c15e58eb + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders?recursive=True + response: + body: + string: '{"value": [{"id": "109bfca1-736b-4860-8dcb-51254b0b43a0", "displayName": + "fabcli000002", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}, {"id": + "73215121-da61-4ea8-9be7-ab29ebcb3b52", "displayName": "fabcli000001", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '184' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:45 GMT + Pragma: + - no-cache + RequestId: + - 24a3aa03-10ba-4099-a2e4-bfa1b87bb40a + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:46 GMT + Pragma: + - no-cache + RequestId: + - ffc30702-57a2-4275-841e-2e0ffbc488eb + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items + response: + body: + string: '{"value": [{"id": "b4f51569-39f9-4fe4-bf61-25acf8c12a08", "type": "Notebook", + "displayName": "fabcli000003", "description": "Created by fab", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}, {"id": "1a181355-da9b-4664-a767-ac7474da12bb", + "type": "Lakehouse", "displayName": "fabcli000004", "description": "Created + by fab", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '230' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:46 GMT + Pragma: + - no-cache + RequestId: + - 0f92d121-a8b8-4716-a975-91e5100f690f + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items/1a181355-da9b-4664-a767-ac7474da12bb + response: + body: + string: '' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '0' + Content-Type: + - application/octet-stream + Date: + - Tue, 06 Jan 2026 13:10:46 GMT + Pragma: + - no-cache + RequestId: + - 9f9c84bf-083f-4692-8424-6539d00ad28a + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:47 GMT + Pragma: + - no-cache + RequestId: + - dc4f5d2f-efc5-43b5-b1b0-d86b7dec36cc + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items + response: + body: + string: '{"value": [{"id": "b4f51569-39f9-4fe4-bf61-25acf8c12a08", "type": "Notebook", + "displayName": "fabcli000003", "description": "Created by fab", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '178' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:48 GMT + Pragma: + - no-cache + RequestId: + - 75584e77-a5ff-4b24-8a9f-97a99c24e6cf + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items/b4f51569-39f9-4fe4-bf61-25acf8c12a08 + response: + body: + string: '' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '0' + Content-Type: + - application/octet-stream + Date: + - Tue, 06 Jan 2026 13:10:48 GMT + Pragma: + - no-cache + RequestId: + - a7816e2f-d510-44a8-b4d2-5e65425df34d + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:48 GMT + Pragma: + - no-cache + RequestId: + - 2361fcf9-c2b5-4d4a-a0c0-192946dc968a + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders?recursive=True + response: + body: + string: '{"value": [{"id": "109bfca1-736b-4860-8dcb-51254b0b43a0", "displayName": + "fabcli000002", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}, {"id": + "73215121-da61-4ea8-9be7-ab29ebcb3b52", "displayName": "fabcli000001", "workspaceId": + "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '184' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:49 GMT + Pragma: + - no-cache + RequestId: + - c7a360d9-4576-456f-9d6d-d6f91b410caf + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders/109bfca1-736b-4860-8dcb-51254b0b43a0 + response: + body: + string: '' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '0' + Content-Type: + - application/octet-stream + Date: + - Tue, 06 Jan 2026 13:10:49 GMT + Pragma: + - no-cache + RequestId: + - e7ea3180-56e0-4c0c-913c-5233e3b5a89a + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces + response: + body: + string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": + "My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e", + "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created + by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '2130' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:49 GMT + Pragma: + - no-cache + RequestId: + - 6520def6-3c02-45c9-9856-fcc1c3aa9bd2 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: GET + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders?recursive=True + response: + body: + string: '{"value": [{"id": "73215121-da61-4ea8-9be7-ab29ebcb3b52", "displayName": + "fabcli000001", "workspaceId": "b86e9b69-16a9-4078-aff8-922ba052431e"}]}' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '144' + Content-Type: + - application/json; charset=utf-8 + Date: + - Tue, 06 Jan 2026 13:10:50 GMT + Pragma: + - no-cache + RequestId: + - e68ce844-acc5-49a8-ac61-8547d59aa835 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - ms-fabric-cli-test/1.3.1 + method: DELETE + uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/folders/73215121-da61-4ea8-9be7-ab29ebcb3b52 + response: + body: + string: '' + headers: + Access-Control-Expose-Headers: + - RequestId + Cache-Control: + - no-store, must-revalidate, no-cache + Content-Encoding: + - gzip + Content-Length: + - '0' + Content-Type: + - application/octet-stream + Date: + - Tue, 06 Jan 2026 13:10:50 GMT + Pragma: + - no-cache + RequestId: + - 533e8da4-b54e-48be-ad3a-ef2de62e48e4 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - deny + home-cluster-uri: + - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ + request-redirected: + - 'true' + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_commands/recordings/test_commands/test_set/test_set_sparkpool_success[autoScale.enabled-True].yaml b/tests/test_commands/recordings/test_commands/test_set/test_set_sparkpool_success[autoScale.enabled-True].yaml deleted file mode 100644 index a54bcae5..00000000 --- a/tests/test_commands/recordings/test_commands/test_set/test_set_sparkpool_success[autoScale.enabled-True].yaml +++ /dev/null @@ -1,670 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces - response: - body: - string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "619e9877-6a58-4dc2-9589-bd4d8ee36bd2", - "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created - by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Cache-Control: - - no-store, must-revalidate, no-cache - Content-Encoding: - - gzip - Content-Length: - - '2301' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:39 GMT - Pragma: - - no-cache - RequestId: - - cc316c46-f24f-4610-8517-11f8afd012ae - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools - response: - body: - string: '{"value": [{"id": "00000000-0000-0000-0000-000000000000", "type": "Workspace", - "name": "Starter Pool", "nodeFamily": "MemoryOptimized", "nodeSize": "Medium", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 10}, "dynamicExecutorAllocation": - {"enabled": true, "minExecutors": 1, "maxExecutors": 9}}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '460' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:40 GMT - RequestId: - - ddb19f16-dbb0-4c53-b284-e62b7d8bda4c - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools - response: - body: - string: '{"value": [{"id": "00000000-0000-0000-0000-000000000000", "type": "Workspace", - "name": "Starter Pool", "nodeFamily": "MemoryOptimized", "nodeSize": "Medium", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 10}, "dynamicExecutorAllocation": - {"enabled": true, "minExecutors": 1, "maxExecutors": 9}}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '460' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:41 GMT - RequestId: - - bc252167-4fea-406d-9fdd-07ff17314965 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: '{"name": "fabcli000001", "nodeFamily": "MemoryOptimized", "nodeSize": "Small", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 3}, "dynamicExecutorAllocation": - {"enabled": false, "minExecutors": 1, "maxExecutors": 1}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '239' - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: POST - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools - response: - body: - string: '{"id": "cfb27133-1062-435e-a41d-b1c55786490b", "type": "Workspace", - "name": "fabcli000001", "nodeFamily": "MemoryOptimized", "nodeSize": "Small", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 3}, "dynamicExecutorAllocation": - {"enabled": false}}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '322' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:42 GMT - RequestId: - - 7d679caa-2f2e-4a81-ab33-9f84f5e8a033 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces - response: - body: - string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "619e9877-6a58-4dc2-9589-bd4d8ee36bd2", - "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created - by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Cache-Control: - - no-store, must-revalidate, no-cache - Content-Encoding: - - gzip - Content-Length: - - '2301' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:43 GMT - Pragma: - - no-cache - RequestId: - - 3ccadaf1-a797-4d1b-bacf-70f9292da326 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools - response: - body: - string: '{"value": [{"id": "00000000-0000-0000-0000-000000000000", "type": "Workspace", - "name": "Starter Pool", "nodeFamily": "MemoryOptimized", "nodeSize": "Medium", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 10}, "dynamicExecutorAllocation": - {"enabled": true, "minExecutors": 1, "maxExecutors": 9}}, {"id": "cfb27133-1062-435e-a41d-b1c55786490b", - "type": "Workspace", "name": "fabcli000001", "nodeFamily": "MemoryOptimized", - "nodeSize": "Small", "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": - 3}, "dynamicExecutorAllocation": {"enabled": false}}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '845' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:43 GMT - RequestId: - - 13ac80a3-1bb1-4ef2-845d-9c9a9be1061c - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools/cfb27133-1062-435e-a41d-b1c55786490b - response: - body: - string: '{"id": "cfb27133-1062-435e-a41d-b1c55786490b", "type": "Workspace", - "name": "fabcli000001", "nodeFamily": "MemoryOptimized", "nodeSize": "Small", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 3}, "dynamicExecutorAllocation": - {"enabled": false}}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '322' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:44 GMT - RequestId: - - 9bc3ba0e-798a-43cf-b16d-97d2c97fffe9 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: '{"autoScale": {"enabled": "True", "minNodeCount": 1, "maxNodeCount": 3}}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '72' - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: PATCH - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools/cfb27133-1062-435e-a41d-b1c55786490b - response: - body: - string: '{"id": "cfb27133-1062-435e-a41d-b1c55786490b", "type": "Workspace", - "name": "fabcli000001", "nodeFamily": "MemoryOptimized", "nodeSize": "Small", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 3}, "dynamicExecutorAllocation": - {"enabled": false}}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '322' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:46 GMT - RequestId: - - 952c362c-bcae-431e-bf94-7295afb639eb - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces - response: - body: - string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "619e9877-6a58-4dc2-9589-bd4d8ee36bd2", - "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created - by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Cache-Control: - - no-store, must-revalidate, no-cache - Content-Encoding: - - gzip - Content-Length: - - '2301' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:45 GMT - Pragma: - - no-cache - RequestId: - - 5acc3a3f-0f4c-42e2-9bdf-168108712000 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools - response: - body: - string: '{"value": [{"id": "00000000-0000-0000-0000-000000000000", "type": "Workspace", - "name": "Starter Pool", "nodeFamily": "MemoryOptimized", "nodeSize": "Medium", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 10}, "dynamicExecutorAllocation": - {"enabled": true, "minExecutors": 1, "maxExecutors": 9}}, {"id": "cfb27133-1062-435e-a41d-b1c55786490b", - "type": "Workspace", "name": "fabcli000001", "nodeFamily": "MemoryOptimized", - "nodeSize": "Small", "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": - 3}, "dynamicExecutorAllocation": {"enabled": false}}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '845' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:47 GMT - RequestId: - - ba76493d-d3e6-4c87-bd95-0c801bd5bd63 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools/cfb27133-1062-435e-a41d-b1c55786490b - response: - body: - string: '{"id": "cfb27133-1062-435e-a41d-b1c55786490b", "type": "Workspace", - "name": "fabcli000001", "nodeFamily": "MemoryOptimized", "nodeSize": "Small", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 3}, "dynamicExecutorAllocation": - {"enabled": false}}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '322' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:47 GMT - RequestId: - - 22b447a0-e6a4-4b52-aa44-b25ea720d792 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces - response: - body: - string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName": - "My workspace", "description": "", "type": "Personal"}, {"id": "619e9877-6a58-4dc2-9589-bd4d8ee36bd2", - "displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created - by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Cache-Control: - - no-store, must-revalidate, no-cache - Content-Encoding: - - gzip - Content-Length: - - '2301' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:48 GMT - Pragma: - - no-cache - RequestId: - - 6fab1f36-2b80-4139-814e-5bbc07264250 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: GET - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools - response: - body: - string: '{"value": [{"id": "00000000-0000-0000-0000-000000000000", "type": "Workspace", - "name": "Starter Pool", "nodeFamily": "MemoryOptimized", "nodeSize": "Medium", - "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": 10}, "dynamicExecutorAllocation": - {"enabled": true, "minExecutors": 1, "maxExecutors": 9}}, {"id": "cfb27133-1062-435e-a41d-b1c55786490b", - "type": "Workspace", "name": "fabcli000001", "nodeFamily": "MemoryOptimized", - "nodeSize": "Small", "autoScale": {"enabled": true, "minNodeCount": 1, "maxNodeCount": - 3}, "dynamicExecutorAllocation": {"enabled": false}}]}' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '845' - Content-Type: - - application/json; charset=utf-8 - Date: - - Thu, 22 Jan 2026 11:31:49 GMT - RequestId: - - 6677f225-2b43-477c-9294-c129e9ccf080 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - ms-fabric-cli-test/1.3.1 - method: DELETE - uri: https://api.fabric.microsoft.com/v1/workspaces/619e9877-6a58-4dc2-9589-bd4d8ee36bd2/spark/pools/cfb27133-1062-435e-a41d-b1c55786490b - response: - body: - string: '' - headers: - Access-Control-Expose-Headers: - - RequestId - Content-Length: - - '0' - Content-Type: - - application/octet-stream - Date: - - Thu, 22 Jan 2026 11:31:50 GMT - RequestId: - - 4eee107c-7a1d-4ec9-9861-2d2b281fbd14 - Strict-Transport-Security: - - max-age=31536000; includeSubDomains - X-Content-Type-Options: - - nosniff - X-Frame-Options: - - deny - home-cluster-uri: - - https://wabi-us-central-b-primary-redirect.analysis.windows.net/ - request-redirected: - - 'true' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/test_commands/test_ls.py b/tests/test_commands/test_ls.py index 9cf2aa94..b2135ada 100644 --- a/tests/test_commands/test_ls.py +++ b/tests/test_commands/test_ls.py @@ -213,7 +213,7 @@ def test_ls_query_filter_success( notebook3 = item_factory(ItemType.NOTEBOOK) # Test 1: Basic JMESPath syntax - cli_executor.exec_command(f'ls {workspace.full_path} -q [].name') + cli_executor.exec_command(f"ls {workspace.full_path} -q [].name") mock_questionary_print.assert_called() _assert_strings_in_mock_calls( [notebook1.display_name, notebook2.display_name, notebook3.display_name], @@ -238,13 +238,13 @@ def test_ls_query_filter_success( ["displayName", "itemID"], True, mock_questionary_print.mock_calls, - require_all_in_same_args=True + require_all_in_same_args=True, ) mock_questionary_print.reset_mock() # Test 3: JMESPath list syntax - here there are not keys so will be printed as list of arrays - cli_executor.exec_command(f'ls {workspace.full_path} -q [].[name]') + cli_executor.exec_command(f"ls {workspace.full_path} -q [].[name]") _assert_strings_in_mock_calls( [f"['{notebook1.name}']", f"['{notebook2.name}']", f"['{notebook3.name}']"], @@ -273,13 +273,13 @@ def test_ls_query_filter_success( ) mock_questionary_print.assert_called() _assert_strings_in_mock_calls( - [f'{notebook1.name}'], + [f"{notebook1.name}"], True, mock_questionary_print.mock_calls, ) _assert_strings_in_mock_calls( - [f'{notebook2.name}', f'{notebook3.name}'], + [f"{notebook2.name}", f"{notebook3.name}"], False, mock_questionary_print.mock_calls, ) @@ -1200,6 +1200,69 @@ def test_ls_folder_content_success( require_all_in_same_args=True, ) + def test_ls_workspace_with_folders_and_items_divider( + self, + workspace, + folder_factory, + item_factory, + mock_questionary_print, + cli_executor: CLIExecutor, + ): + """Test that a divider appears between folders and items when folder_listing_enabled=true""" + # Setup: Create folders and items in workspace root + folder1 = folder_factory() + folder2 = folder_factory() + notebook = item_factory(ItemType.NOTEBOOK, path=workspace.full_path) + lakehouse = item_factory(ItemType.LAKEHOUSE, path=workspace.full_path) + + # Test 1: List workspace (folder_listing_enabled is true by default in tests) + cli_executor.exec_command(f"ls {workspace.full_path}") + + # Assert: Check that the divider is present + mock_questionary_print.assert_called() + + # Verify divider appears in output + _assert_strings_in_mock_calls( + ["------------------------------"], True, mock_questionary_print.mock_calls + ) + + # Verify folders and items are present + _assert_strings_in_mock_calls( + [ + folder1.display_name, + folder2.display_name, + notebook.display_name, + lakehouse.display_name, + ], + True, + mock_questionary_print.mock_calls, + ) + + mock_questionary_print.reset_mock() + + # Test 2: with long flag + cli_executor.exec_command(f"ls {workspace.full_path} --long") + + # Assert + mock_questionary_print.assert_called() + + # Verify divider appears with long format + _assert_strings_in_mock_calls( + ["------------------------------"], True, mock_questionary_print.mock_calls + ) + + # Verify all items are present + _assert_strings_in_mock_calls( + [ + folder1.display_name, + folder2.display_name, + notebook.display_name, + lakehouse.display_name, + ], + True, + mock_questionary_print.mock_calls, + ) + def test_ls_workspace_items_no_list_folders_support_success( self, workspace,