feat(org-import): add spawning:false field to skip workspace + descendants #135
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/org-import-spawning-false"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
spawning *boolto OrgWorkspace + a guard at the top of createWorkspaceTree that returns early when explicitly false. Skips THIS workspace AND its entire subtree at /org/import time without touching the canonical template structure.Why
Dev-tree org template ships the full role taxonomy (27 personas in 5 sub-teams). Some setups want a smaller set — local dev on a memory-constrained machine, demo runs, leadership-only trials. Pre-fix options were all wrong-shaped: edit canonical template (mutates shared state), author parallel slimmer template (duplicates structure), or manually deprovision after full import (wasteful — paid the docker pull/build cost).
spawning: falseis the per-workspace knob.Semantics
spawning: true→ explicitly spawn (same as unset)spawning: false→ skip workspace AND every descendant. Guard sits BEFORE any side effect in createWorkspaceTree — no DB row, no docker provision, no children recursion.countWorkspacesstill counts the subtree (so /org/templates numbers reflect full structure).Stage A — verified
Local dev-only template wrapping
teams/dev.yaml(Dev Lead) withchildren: []on the 5 sub-team yaml files + 3 floater personas (Release Manager / Integration Tester / Fullstack Engineer)./org/importreturned 9 workspaces, all containerised. Drop-in: same result later viaspawning: falseon each sub-tree root.Stage B — N/A
Pure additive feature on the org-template handler. No SaaS deploy chain implications.
Refs
ws.FilesDirlookup fix) for full /org/import correctness on the dev-tree shapespawningas a customer-facingenabledtoggle in the UI