You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #34 made .env mandatory for swap-to-feature, removed the interactive
prompt fallback, removed the value-set-priority shortcut, and added a
case-sensitive YES confirmation. PR #35 moved that confirmation into the
chat UI for slash-command invocations. fabric-development-process.md still
described the old behavior in three spots.
Updates:
- Step 4 (swap-to-feature): drop the 'or prompts if .env is missing'
claim; add the YES confirmation step; add the recovery pass step.
- Local .env Setup section: replace 'falls back to interactive prompt'
+ 'value set is source of truth' with the new model (.env always
authoritative for swap-to-feature; value set used by swap-to-dev
and the recovery pass; YES confirmation gate).
- Copilot Chat section: note that /swap-to-feature moves the YES
confirmation into the chat UI.
Tests: 185 pass (no script changes).
Copy file name to clipboardExpand all lines: fabric-development-process.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,11 +93,13 @@ A Python script at `scripts/workspace_swap.py` handles the full lifecycle of fea
93
93
The script automatically:
94
94
- Detects the current branch name (no arguments needed).
95
95
- Reads dev IDs from `variables.json` (the default value set).
96
-
- Reads feature workspace/lakehouse IDs from `.env` (or prompts if `.env` is missing).
96
+
- Reads feature workspace/lakehouse IDs from `.env`. If `.env` is missing or has empty/missing keys, the script exits with an error pointing at `.env.sample` — there is no interactive fallback.
97
+
- Displays the planned swap and asks `Type YES (uppercase) to apply, anything else to abort.` Type `YES` (case-sensitive) to proceed; the run is dry only when `--dry-run` is also passed.
97
98
- Creates a feature branch value set (e.g., `valueSets/<branch-name>.json`).
98
99
- Adds the value set to `settings.json`.
99
100
- Rewrites the semantic model Direct Lake connection in `expressions.tmdl`.
100
101
- Rewrites notebook META dependency blocks in all `notebook-content.py` files.
102
+
- Sweeps stale feature IDs from a previous swap if `.env` was changed since the last run (recovery pass).
101
103
- Validates no dev IDs remain in critical files.
102
104
5.**Commit and push** the changes to the feature branch:
103
105
```
@@ -155,7 +157,7 @@ The repo ships slash commands in `.github/prompts/` that wrap the CLI. In Copilo
155
157
-`/swap-to-dev-dryrun` — preview the revert without writing files
156
158
-`/check-pr-ready` — run the CI-style readiness check locally
157
159
158
-
Copilot will execute the script in the VS Code integrated terminal and show you the output. This is useful when you are already working in Copilot Chat and want to stay in the same workflow without switching to the terminal.
160
+
Copilot will execute the script in the VS Code integrated terminal and show you the output. The `/swap-to-feature` slash command moves the `YES` confirmation into the chat UI — you click `YES` or `NO` in chat and Copilot pipes the answer to the script so the terminal never blocks. This is useful when you are already working in Copilot Chat and want to stay in the same workflow without switching to the terminal.
159
161
160
162
Note: Copilot cannot auto-trigger the script on branch checkout. You still need to invoke a slash command or run it yourself after pulling a feature branch.
161
163
@@ -170,7 +172,9 @@ Note: Copilot cannot auto-trigger the script on branch checkout. You still need
170
172
3. Paste both into `.env`.
171
173
4. Run `python scripts/workspace_swap.py` (or `/swap-to-feature` in Copilot Chat).
172
174
173
-
If `.env` is missing or empty, the script falls back to an interactive prompt. After the first run, the value set on disk is the source of truth for that branch — `.env` is no longer consulted for it.
175
+
If `.env` is missing, has empty values, or is missing either key, the script exits with a clear error pointing at `.env.sample`. There is no interactive fallback — `.env` is the single source of truth for swap-to-feature.
176
+
177
+
For swap-to-feature, the script always reads `.env` (the existing value-set file does not override it). The value set on disk is read by swap-to-dev (to know which feature IDs to revert) and by the recovery pass (to detect previously-applied stale IDs that need rewriting). Before any rewrite happens, the script displays the planned dev → feature change and waits for the user to type literal `YES` to confirm.
174
178
175
179
The script intentionally does **not** auto-discover IDs via the Fabric REST API. An earlier implementation matched workspaces by display name, which could silently pick the wrong workspace (e.g. matching the dev workspace itself), causing the swap to abort with no value set written. Explicit `.env` config avoids that class of bug.
0 commit comments