Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions .github/prompts/swap-to-feature.prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
description: Swap the repo's IDs to your feature workspace and create the value set for the current branch.
mode: agent
---
Run `python scripts/workspace_swap.py` from the repo root and report the output to me. The script will rewrite tracked Fabric files (semantic model, notebooks) so they point at your feature workspace instead of dev, create a feature value set, and update settings.json. It reads the feature workspace and lakehouse GUIDs from `.env` at the repo root — if `.env` is missing or empty, it will fall back to an interactive prompt.
The script `scripts/workspace_swap.py` rewrites tracked Fabric files (semantic model, notebooks) so they point at your feature workspace instead of dev, creates a feature value set, and updates settings.json. It reads `FEATURE_WORKSPACE_ID` and `FEATURE_LAKEHOUSE_ID` from `.env` at the repo root and asks for a `YES` confirmation before applying. When invoked through this prompt, that confirmation must happen here in chat — never in the terminal — to avoid live-prompt handling problems.

After the script finishes, summarize what changed and remind me to commit and push the changes, then sync the workspace from the Fabric UI.
Follow this exact sequence:

1. Read `.env` at the repo root and read the dev workspace + lakehouse IDs from `data/fabric/Patterns_Variables.VariableLibrary/variables.json`.
2. Show me the planned swap in chat (current branch, dev → feature workspace ID, dev → feature lakehouse ID).
3. Use the chat UI to ask me a single question with two options: `YES` and `NO` (uppercase, exact). Do not proceed until I answer.
4. If I answer `YES`, run `echo "YES" | python scripts/workspace_swap.py`. The piped `YES` satisfies the script's confirmation gate non-interactively, so the terminal never blocks. Report the full output.
5. If I answer `NO`, do nothing further and confirm in chat that the swap was not applied.
6. After a successful run only, summarize what changed and remind me to commit and push the changes, then sync the workspace from the Fabric UI.

Do not run the script directly without piping `YES` (it will block on the terminal prompt). Do not skip the chat confirmation — the in-script confirmation is bypassed by the pipe and the chat dialog is the gate.
6 changes: 3 additions & 3 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ permissions:
contents: read

jobs:
deploy-supported:
name: Deploy supported items
deploy-fabric-cicd:
name: Deploy via fabric-cicd
# Gated by the DEPLOY_METHOD repository variable. Runs when unset or set to
# 'fabric-cicd'. Set DEPLOY_METHOD='bulk' to route deployments through
# deploy-prod-bulk.yml instead. Any other value disables both workflows.
if: vars.DEPLOY_METHOD == '' || vars.DEPLOY_METHOD == 'fabric-cicd'
uses: ./.github/workflows/reusable-deploy-supported.yml
uses: ./.github/workflows/reusable-deploy-fabric-cicd.yml
with:
environment: Prod
item_type_in_scope: '["Lakehouse", "Ontology", "VariableLibrary", "Notebook", "SemanticModel", "Report", "DataAgent"]'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ permissions:
contents: read

jobs:
deploy-supported:
name: Deploy supported items
deploy-fabric-cicd:
name: Deploy via fabric-cicd
# Gated by the DEPLOY_METHOD repository variable. Runs when unset or set to
# 'fabric-cicd'. Set DEPLOY_METHOD='bulk' to route deployments through
# deploy-test-bulk.yml instead. Any other value disables both workflows.
if: vars.DEPLOY_METHOD == '' || vars.DEPLOY_METHOD == 'fabric-cicd'
uses: ./.github/workflows/reusable-deploy-supported.yml
uses: ./.github/workflows/reusable-deploy-fabric-cicd.yml
with:
environment: Test
item_type_in_scope: '["Lakehouse", "Ontology", "VariableLibrary", "Notebook", "SemanticModel", "Report", "DataAgent"]'
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/reusable-deploy-bulk.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reusable workflow: Deploy supported Fabric items via the Bulk Import Item Definitions API (Preview).
#
# Alternative deployment path to reusable-deploy-supported.yml. Uses the Fabric
# Alternative deployment path to reusable-deploy-fabric-cicd.yml. Uses the Fabric
# REST API's bulk import endpoint instead of the fabric-cicd Python library.
# Selected at orchestrator level via the DEPLOY_METHOD repository variable.
#
Expand All @@ -14,10 +14,19 @@
# - Every item type in the request payload must support service principals
# (the bulk API requires SPN support for ALL items in the request, not just some)
#
# Known gaps vs. reusable-deploy-supported.yml (fabric-cicd):
# - No parameter.yml find_replace / key_value_replace substitution
# - No orphan cleanup (Bulk Import API only supports Create/Update, not Delete)
# - No item_type_in_scope filter (deploys everything in repository_directory)
# Known gaps vs. reusable-deploy-fabric-cicd.yml (fabric-cicd):
# The Bulk Import API itself has no parameterization, no value-set
# activation, and no delete support. This repo bridges the first two in
# scripts/deploy_bulk.py + data/fabric/bulk-parameter.yml. The remaining
# gaps are intentionally not implemented:
# - No full parameter.yml feature coverage. bulk-parameter.yml supports
# find_replace + $items + $workspace + $environment placeholders only.
# fabric-cicd's key_value_replace, spark_pool, semantic_model_binding
# are not implemented here.
# - No orphan cleanup. The Bulk Import API only supports Create/Update,
# not Delete; deletes would need a separate per-item DELETE call loop.
# - No item_type_in_scope filter. Deploys everything under
# repository_directory.
#
# API references:
# - Bulk import: https://learn.microsoft.com/en-us/rest/api/fabric/core/items/bulk-import-item-definitions(beta)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# - Fabric Admin must enable "Service principals can use Fabric APIs"
# - parameter.yml in repository_directory for environment-specific replacements

name: "Reusable: Deploy Supported Items"
name: "Reusable: Deploy via fabric-cicd"

on:
workflow_call:
Expand All @@ -38,7 +38,7 @@ permissions:

jobs:
deploy:
name: Deploy supported items (${{ inputs.environment }})
name: Deploy via fabric-cicd (${{ inputs.environment }})
runs-on: ubuntu-latest
timeout-minutes: 30
environment: ${{ inputs.environment }}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ Branch protection (PR required, source-branch restrictions, status checks) is en
| Document | Description |
|---|---|
| [CI/CD Release Options](fabric-cicd-release-options.md) | Evaluates all CI/CD release options for Fabric (Deployment Pipelines, Git-based, Build-based, Hybrid) and recommends the Hybrid approach. Includes a [comparison of fabric-cicd vs the new Bulk Import / Export APIs](fabric-cicd-release-options.md#tooling-within-option-3-fabric-cicd-vs-bulk-apis) (Preview) within Option 3. **Start here** if you're deciding on a strategy. |
| [Hybrid CI/CD Implementation Guide](fabric-hybrid-cicd-guide.md) | Deep dive into the implementation: workflow structure, configuration strategy, prerequisites, setup steps, and gotchas. |
| [Hybrid CI/CD Implementation Guide](fabric-hybrid-cicd-guide.md) | Deep dive into the recommended fabric-cicd implementation: workflow structure, configuration strategy, prerequisites, setup steps, and gotchas. |
| [Bulk CI/CD Implementation Guide](fabric-bulk-cicd-guide.md) | Implementation guide for the alternative Bulk Import API (Preview) deploy path. Covers the gap-bridging workarounds (substitution, value-set activation), the two-deploy decision, extension patterns, and limitations not bridged. |
| [Development Process](fabric-development-process.md) | How developers work day-to-day: branch-out workflow, the workspace swap script, and PR readiness check. |
| [CI/CD Governance Considerations](fabric-cicd-governance-considerations.md) | Considerations on identities, RBAC, branch protection, and approval gates for the CI/CD pipeline. Includes pointers to adjacent controls owned outside the pipeline (security/compliance topics). |

Expand Down
Loading