CI/CD · fabric-cicd · part 6 of 6
Fabric-CICD v1.5.0 - Catching Up
Round-up of fabric-cicd changes from v0.3.0 to v1.5.0
fabric-cicd v1.5.0 came out on 2 December. My last round-up was v0.2.0 in February, and there have been eight releases since. For me the three biggest changes are:
- Org Apps: can now be deployed, so apps can be part of CI/CD
- Warehouses: can now be deployed from their SQL project instead of as empty shells
- Bulk publish: how fabric-cicd will run deployment plans
Changes¶
Org Apps, Warehouse SQL projects and strict binding
New Items
New Functionality
- Warehouse: SQL project deployment
- Lakehouse: Definition deployment
- Semantic Model Binding: Strict binding
- Parameterization:
$sqlendpointfqdn - Constants:
EXTRA_HEADERS
Graph Model, Cosmos DB and dynamic variables in bulk publish
New Items
New Functionality
- Bulk Publish: Dynamic variables
- Python:
3.14support
API duration limit and feature flag helpers
New Functionality
- Parameterization: Mirrored Database
$sqlendpoint - Feature Flags
- Environment Variables: API duration limit
Bulk publish, Map and Paginated Report
New Items
New Functionality
- Bulk Publish: Bulk import API
- Semantic Model Binding: Multiple connections
- Parameterization
dbt Job, workspace name variables and private links
New Items
New Functionality
- Parameterization:
$workspace.$name - Private Link:
configure_fabric_fqdn()
Explicit credentials, change detection and Ontology
Breaking Change
FabricWorkspaceanddeploy_with_config()
New Items
New Functionality
- Selective Deployment:
get_changed_items() deploy_with_config(): Success and failure reportingunpublish_all_orphan_items(): API response collection
Folder inclusion and .ipynb Notebooks
New Functionality
- Selective Deployment: Folder inclusion
- Notebook:
.ipynbformat - Logging: Logging options
- Environment Variables: Version check opt-out
Bug Fixes and Optimizations
The list above only has the headline features. I've left bug fixes and optimizations out, and v0.3.1 only had bug fixes. You can find them all in the changelog.
Explicit Authentication¶
v1.0.0 removed the automatic login fallback, which could pick "an unexpected identity". You now have to pass a token_credential, and FabricWorkspace and deploy_with_config() only accept keyword arguments. The authentication examples cover service principals and managed identities.
from azure.identity import AzureCliCredential
from fabric_cicd import FabricWorkspace
workspace = FabricWorkspace(
workspace_id="your-workspace-id",
environment="PPE",
repository_directory="your-repository-directory",
item_type_in_scope=["Notebook", "DataPipeline", "Environment"],
token_credential=AzureCliCredential(),
)
Bulk Publish¶
Bulk publish (v1.2.0, experimental) sends every item in one call to the Bulk Import Item Definitions API, instead of publishing them one at a time by item type. Fabric creates or updates each item and uses a dependency graph to work out the order, so fabric-cicd's item type order doesn't apply. It only covers publishing; unpublish works as before. It matters more now because it's how deployment plans will run; support for them is merged into main but isn't in v1.5.0.
Since v1.4.0 it also works with dynamic variables. An $items.* variable needs the ID of an item that might not exist yet, so fabric-cicd splits the deployment into batches. Referenced items go in an earlier batch, each batch is its own bulk call, and deployed items are refreshed between batches so later batches resolve against real IDs.
Things to watch for:
- References. Fabric only re-points references stored as logical IDs; the dependency binding matrix lists which. The rest still need
parameter.yml, which runs before the bulk call - Fallback. If bulk publish can't be used, fabric-cicd logs a
"Falling back to standard deployment..."warning and publishes the normal way. That includes unsupported item types, and a$items.*replace_valuewith noitem_type,item_nameorfile_pathfilter - Limits. fabric-cicd allows at most 1,000 items in a bulk call and raises an error above that, and the API caps the request at 128 MB
- Preview items. Supported item types that are still in preview, such as Ontology, may fail for some definitions
- All-or-nothing auth. If any item can't be deployed by a service principal, such as a GraphQL API reading from a SQL analytics endpoint, the whole call fails
- Logical IDs. Items exported with the Get Item Definition API have an all-zeros
logicalId, which bulk publish rejects
Selective Deployment¶
Selective deployment is an experimental feature that lets you publish part of the repository instead of all of it. There are two additions since v0.2.0:
-
folder_path_to_include(v0.3.0): only publish items in the listed workspace folders (needsenable_include_folder) -
get_changed_items()(v1.0.0): usesgit diffto list the items changed since a commit (HEAD~1by default), ready to pass toitems_to_include(needsenable_items_to_include)
append_feature_flag("enable_experimental_features")
append_feature_flag("enable_items_to_include")
changed = get_changed_items(workspace.repository_directory, git_compare_ref="main")
if changed:
publish_all_items(workspace, items_to_include=changed)
Empty lists
Keep the if changed check: an empty list means no filter, so a commit with no item changes would redeploy everything. And if git diff fails, for example because the pipeline only fetched one commit, you get an empty list and just a warning, so fetch enough history.
Parameterization¶
New dynamic replacement options:
-
$workspace.$nameand$workspace.$name_encodedfor the target workspace name (v1.1.0) -
$workspace.*variables infind_value, to find the dev workspace ID by name (v1.2.0) -
ignore_caseonfind_replace(v1.2.0) -
$sqlendpointand$sqlendpointidfor Mirrored Databases (v1.3.0) -
$sqlendpointfqdnfor a SQL Database server name without the,1433port (v1.5.0) - Variables are checked for typos before anything is published (
v1.4.0)
Pipeline Settings¶
-
enable_hard_deletemakes unpublish skip the recycle bin (v1.0.0) - Long-running operations time out; raise
FABRIC_CICD_RETRY_API_MAX_DURATION_SECONDS(default 300 seconds) for slow items such as Environments (v1.0.0,v1.3.0) -
fabric_cicd.error.logis only written if you setFABRIC_CICD_FILE_LOGGING_ENABLED(v1.2.0) - No PyPI version check on import (
v1.1.0) -
configure_fabric_fqdn()for workspaces behind private links (v1.1.0) -
EXTRA_HEADERSadds custom HTTP headers to every API call (v1.5.0) -
get_supported_feature_flags()andremove_feature_flag()(v1.3.0) - Python 3.13 (
v0.3.0) and 3.14 (v1.4.0)
New Item Types¶
| Item Type | Version |
|---|---|
| Ontology | v1.0.0 |
| dbt Job | v1.1.0 |
| Map | v1.2.0 |
| Paginated Report | v1.2.0 |
| Graph Model | v1.4.0 |
| Cosmos DB Database | v1.4.0 |
| Org App | v1.5.0 |
| Org App Audience | v1.5.0 |
v0.3.0 also added Notebooks in .ipynb format. Graph Models and Cosmos DB databases aren't deleted by unpublish unless you set enable_graphmodel_unpublish or enable_cosmosdbdatabase_unpublish.
Org Apps¶
Workspace apps belong to their workspace rather than being an item in it, so they can't be committed or deployed and have to be updated by hand. Org apps are items, so they can be committed and deployed like anything else. You can also have several per workspace, and include more content (such as notebooks, maps and real-time dashboards), and deploy them like anything else.
fabric-cicd first added Org Apps before the Fabric API supported them, so v0.2.0 removed them. v1.5.0 finally brings them back.
Warehouse SQL Projects¶
Until v1.5.0, fabric-cicd only created empty Warehouses, so the tables and views needed a separate dacpac and SqlPackage step. Git integration already saves the Warehouse as a SQL project, and now that the Warehouse item definition accepts sqlproj, fabric-cicd sends it straight to Fabric. Your pipeline doesn't need the .NET SDK or SqlPackage.
Testing
Before the feature shipped, I tested the API myself with a service principal:
- New Warehouse: the tables and views were created, and the pre- and post-deployment scripts (preview) ran
- Existing Warehouse: changes were applied, but any change that would lose data was blocked
- Objects not in the project: kept, not dropped, so removing a table or view from the repo doesn't remove it from the target
Still deployed empty
A Warehouse is still deployed empty, with only a warning, if it has no .sqlproj or its .platform file has a creationPayload. That's where a case-insensitive Warehouse stores its collation, so it's easy to miss. An empty Warehouse in scope also turns bulk publish off for the whole deployment.
Lakehouse Definitions¶
Lakehouses were also created empty until v1.5.0. enable_lakehouse_definition_publish now deploys the Lakehouse definition, its metadata and settings including data access roles, but not tables or data. It's missing from the changelog but covered in the item type docs.
Semantic Model Binding¶
semantic_model_binding connects deployed semantic models to existing connections. Since v1.2.0 it takes a list of connection IDs per environment, for models with more than one source. Failed bindings used to be only warnings; v1.5.0 adds a flag to fail the pipeline instead.
Nothing is rolled back
A failed binding stops the deployment after the semantic models are published, so later item types and unpublish are skipped. A model with no existing connections is skipped rather than failed, and only the first page of connections is checked.
v1.5.0 also adds enable_purge_data. Without it, a model change that would delete loaded data, such as removing a column, fails to deploy. With it, the change goes through but the data is dropped, so the model is empty until you refresh it. It applies to every semantic model in the deployment.