Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a9c1621
Add benchmark script for CLI startup performance
ayeshurun Mar 17, 2026
6c7e06e
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Mar 19, 2026
7a563ff
Delete scripts/benchmark_startup.py
ayeshurun Mar 22, 2026
28ea374
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Mar 22, 2026
273a7eb
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Mar 23, 2026
e71de12
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Mar 25, 2026
e53d848
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Mar 31, 2026
d0964ca
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Apr 14, 2026
5ed9635
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Apr 19, 2026
68551a3
Merge branch 'microsoft:main' into main
ayeshurun Jun 2, 2026
00fae8e
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Jun 3, 2026
8747b30
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Jun 21, 2026
1688ef8
Merge branch 'microsoft:main' into main
ayeshurun Jun 26, 2026
39eb787
Add deploy_bulk_publish_enabled config setting and bump fabric-cicd t…
Copilot Jul 1, 2026
9791cca
Move TestDeployBulkPublish to test_utils and trim docs claim
Copilot Jul 1, 2026
1517597
Add e2e deploy test with bulk publish enabled (config restored via mo…
Copilot Jul 1, 2026
69933d0
Add and record test
ayeshurun Jul 2, 2026
20645c9
Add deploy_bulk_publish_enabled config setting
ayeshurun Jul 2, 2026
d15d839
Convert deploy_bulk_publish_enabled config setting to --bulk_publish …
Copilot Jul 2, 2026
21d4549
record test
ayeshurun Jul 2, 2026
2524581
Merge branch 'main' into copilot/update-fabric-cicd-dependency
ayeshurun Jul 2, 2026
69e7d3a
update test processors
ayeshurun Jul 5, 2026
c84e9e7
Merge branch 'copilot/update-fabric-cicd-dependency' of https://githu…
ayeshurun Jul 6, 2026
e450cb6
Potential fix for pull request finding
ayeshurun Jul 6, 2026
ec6be0c
test: use mock_fab_set_state_config fixture and add success suffix in…
Jul 6, 2026
cb0e55d
docs: fix deploy help examples to use --config instead of --config_file
Jul 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/added-20260701-121400.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: added
body: Adds the `--bulk_publish` flag to the `deploy` command to opt into experimental bulk publish
time: 2026-07-01T12:14:00.000000+00:00
custom:
Author: ayeshurun
AuthorLink: https://github.com/ayeshurun
19 changes: 19 additions & 0 deletions docs/commands/fs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,25 @@ The deployment to the Fabric workspaces is executed via the Fabric REST APIs.

---

### Bulk Publish (Experimental)

By default, `deploy` publishes items **one at a time**. You can optionally enable
**bulk publish**, which deploys all items in a **single bulk import API call**.

Enable it with the `--bulk_publish` flag:

```bash
fab deploy --config config.yml --target_env dev --bulk_publish
```

Notes:

- This feature is **experimental** in the underlying [`fabric-cicd`](https://microsoft.github.io/fabric-cicd/latest/how_to/optional_feature/) library and uses its bulk import (beta) API. It may change or fail; omit the `--bulk_publish` flag to use the standard per-item publish behavior.
- It is **disabled by default**, so existing deployments keep the standard per-item publish behavior.
- When enabled, the CLI turns on the required `enable_experimental_features` and `enable_bulk_publish` fabric-cicd feature flags for you.

---

### Configuration Behavior

- The configuration file controls what is published and unpublished.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies = [
"psutil==7.0.0",
"requests",
"cryptography",
"fabric-cicd>=0.3.1",
"fabric-cicd>=1.2.0",
]

[project.scripts]
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ argcomplete>=3.6.2
psutil==7.0.0
requests
cryptography
fabric-cicd>=0.3.1
fabric-cicd>=1.2.0

# Testing and Building Requirements
tox>=4.20.0
Expand Down
23 changes: 23 additions & 0 deletions src/fabric_cli/commands/fs/deploy/fab_fs_deploy_config_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def deploy_with_config_file(args: Namespace) -> None:
# feature flags to avoid printing identity info in logs
append_feature_flag("disable_print_identity")

# opt-in experimental bulk publish (single bulk import API call)
_apply_bulk_publish_feature_flags(args)

deploy_config_file = args.config
deploy_parameters = get_dict_from_params(args.params, max_depth=1)
for param in deploy_parameters:
Expand All @@ -54,3 +57,23 @@ def deploy_with_config_file(args: Namespace) -> None:
raise FabricCLIError(
f"Deployment failed: {str(e)}",
fab_constant.ERROR_IN_DEPLOYMENT)


def _apply_bulk_publish_feature_flags(args: Namespace) -> None:
"""Enable fabric-cicd bulk publish when the --bulk_publish flag is set.

Bulk publish deploys all items in a single bulk import API call instead of
one item at a time. It is experimental in fabric-cicd and requires both the
'enable_experimental_features' and 'enable_bulk_publish' feature flags, so
the CLI appends both. Disabled by default to preserve backward-compatible
standard (per-item) publish behavior.
"""
if getattr(args, "bulk_publish", False):
Comment thread
ayeshurun marked this conversation as resolved.
append_feature_flag("enable_experimental_features")
append_feature_flag("enable_bulk_publish")
fab_ui.print_warning(
"Experimental bulk publish is enabled: items will be deployed in a "
"single bulk import API call. This feature is experimental in "
"fabric-cicd and may change or fail; omit the '--bulk_publish' flag "
"to use standard per-item publish."
)
13 changes: 11 additions & 2 deletions src/fabric_cli/parsers/fab_fs_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,11 @@ def register_import_parser(subparsers: _SubParsersAction) -> None:
def register_deploy_parser(subparsers: _SubParsersAction) -> None:
deploy_examples = [
"# deploy fabric items to a workspace using a configuration file and target environment",
"$ deploy --config_file config.yml --target_env dev\n",
"$ deploy --config config.yml --target_env dev\n",
"# deploy with config file, environment, and optional parameters",
"$ deploy --config_file config.yml --target_env prod -P '[{\"param1\":\"value1\"}]' -f",
"$ deploy --config config.yml --target_env prod -P '[{\"param1\":\"value1\"}]' -f\n",
"# deploy using experimental bulk publish (single bulk import API call)",
"$ deploy --config config.yml --target_env dev --bulk_publish",
]

deploy_parser = subparsers.add_parser(
Expand Down Expand Up @@ -492,6 +494,13 @@ def register_deploy_parser(subparsers: _SubParsersAction) -> None:
"-f", "--force", required=False, action="store_true", help="Force. Optional"
)

deploy_parser.add_argument(
Comment thread
ayeshurun marked this conversation as resolved.
"--bulk_publish",
required=False,
action="store_true",
help="Experimental. Deploy all items in a single bulk import API call instead of one at a time. Optional",
)

deploy_parser.set_defaults(func=lazy_command(
_fs_module_path, 'deploy_command'))
deploy_parser.usage = f"{utils_error_parser.get_usage_prog(deploy_parser)}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@


class WorkspaceAPIProcessor(BaseAPIProcessor):
WORKSPACE_URI = "https://api.fabric.microsoft.com/v1/workspaces"
WORKSPACE_URI = [
"https://api.fabric.microsoft.com/v1/workspaces",
"https://api.powerbi.com/v1/workspaces",
]

def __init__(self, generated_name_mapping):
self.generated_name_mapping = generated_name_mapping
Expand All @@ -19,7 +22,7 @@ def try_process_response(self, request, response) -> bool:
uri = request.uri

# Handle list workspaces
if uri.lower() == self.WORKSPACE_URI.lower():
if uri.lower() in self.WORKSPACE_URI:
method = request.method
if method == "GET":
"""https://learn.microsoft.com/en-us/rest/api/fabric/core/workspaces/list-workspaces?tabs=HTTP"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.5.0 (None; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
- ms-fabric-cli/1.6.1 (None; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -26,15 +26,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '2308'
- '3497'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 23 Apr 2026 12:10:26 GMT
- Sun, 05 Jul 2026 10:01:59 GMT
Pragma:
- no-cache
RequestId:
- 75f98b6b-0435-4f24-9c78-1a9295e15538
- 1a6436ae-5d95-42ad-ab3e-2fe3bea576dd
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -60,7 +60,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.5.0 (None; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
- ms-fabric-cli/1.6.1 (None; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -75,15 +75,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '2308'
- '3497'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 23 Apr 2026 12:10:26 GMT
- Sun, 05 Jul 2026 10:02:00 GMT
Pragma:
- no-cache
RequestId:
- 22096648-c949-4423-8f86-de319415decb
- 9af59919-2aa4-4277-bb78-87d257471f92
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -109,7 +109,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.5.0 (None; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
- ms-fabric-cli/1.6.1 (None; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
method: GET
uri: https://api.fabric.microsoft.com/v1/capacities
response:
Expand All @@ -125,15 +125,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '424'
- '462'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 23 Apr 2026 12:10:32 GMT
- Sun, 05 Jul 2026 10:02:06 GMT
Pragma:
- no-cache
RequestId:
- bd057165-8274-4a6c-829c-98a985e6b765
- 74ad9216-2c8f-406a-b2c6-408513d2c05b
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -162,13 +162,14 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.5.0 (None; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
- ms-fabric-cli/1.6.1 (None; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
method: POST
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"id": "e4f479cd-1e74-4479-bede-829ed8b44206", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
string: '{"id": "dfbc98b6-1fac-4969-b12a-0c05046310ee", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004",
"capacityRegion": "Central US"}'
headers:
Access-Control-Expose-Headers:
- RequestId,Location
Expand All @@ -177,17 +178,17 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '175'
- '196'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 23 Apr 2026 12:10:40 GMT
- Sun, 05 Jul 2026 10:02:13 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/e4f479cd-1e74-4479-bede-829ed8b44206
- https://api.fabric.microsoft.com/v1/workspaces/dfbc98b6-1fac-4969-b12a-0c05046310ee
Pragma:
- no-cache
RequestId:
- 03e03164-a3ed-4451-b4c4-1455f5d05371
- 04a080b4-989e-4e71-960e-e1e93e7e6aea
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -213,15 +214,16 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.5.0 (deploy; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
- ms-fabric-cli/1.6.1 (deploy; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
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": "e4f479cd-1e74-4479-bede-829ed8b44206",
"My workspace", "description": "", "type": "Personal"}, {"id": "dfbc98b6-1fac-4969-b12a-0c05046310ee",
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "",
"type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
"type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004",
"capacityRegion": "Central US"}]}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -230,15 +232,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '2343'
- '3534'
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 23 Apr 2026 12:17:02 GMT
- Sun, 05 Jul 2026 10:04:11 GMT
Pragma:
- no-cache
RequestId:
- efb7b8f5-2068-4796-bdfe-58f6191cb283
- c5b6c8ab-de5a-4a3a-89ea-ae99007c7fdd
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -264,9 +266,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.5.0 (deploy; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
- ms-fabric-cli/1.6.1 (deploy; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/e4f479cd-1e74-4479-bede-829ed8b44206/items
uri: https://api.fabric.microsoft.com/v1/workspaces/dfbc98b6-1fac-4969-b12a-0c05046310ee/items
response:
body:
string: '{"value": []}'
Expand All @@ -282,11 +284,11 @@ interactions:
Content-Type:
- application/json; charset=utf-8
Date:
- Thu, 23 Apr 2026 12:17:02 GMT
- Sun, 05 Jul 2026 10:04:12 GMT
Pragma:
- no-cache
RequestId:
- c4855104-64c9-487b-954d-205d6989532c
- b5ddfe65-25bc-48f0-b137-9088d284ac16
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -314,9 +316,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.5.0 (deploy; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
- ms-fabric-cli/1.6.1 (deploy; Linux/6.6.87.2-microsoft-standard-WSL2; Python/3.12.11)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/e4f479cd-1e74-4479-bede-829ed8b44206
uri: https://api.fabric.microsoft.com/v1/workspaces/dfbc98b6-1fac-4969-b12a-0c05046310ee
response:
body:
string: ''
Expand All @@ -332,11 +334,11 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Thu, 23 Apr 2026 12:17:03 GMT
- Sun, 05 Jul 2026 10:04:13 GMT
Pragma:
- no-cache
RequestId:
- f63d5336-33e7-434c-9609-ef62f604a919
- 37e9ad69-f538-4d17-98f1-9713c5abcba3
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down
Loading
Loading