-
Notifications
You must be signed in to change notification settings - Fork 111
Add workspace creation functionality #636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Implemented workspace creation, assignment to capacity, and role assignment functions in `workspace_management.py`. - Added a YAML configuration example for bulk workspace creation in `workspace_config_example.yml`. - Developed unit tests for workspace management functions in `test_workspace_management.py`, covering various scenarios including invalid inputs and role assignments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive workspace management functionality to enable programmatic workspace creation, capacity assignment, and role management - particularly designed for ISV scenarios requiring large-scale deployments (e.g., 500+ workspaces).
- Implements four main functions:
create_workspace,assign_workspace_to_capacity,add_workspace_role_assignment, andcreate_workspaces_from_config - Adds GUID validation utility and workspace-related constants
- Includes comprehensive test coverage with 499 lines of tests covering various scenarios
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/fabric_cicd/workspace_management.py | Core implementation of workspace management functions with API integration |
| tests/test_workspace_management.py | Comprehensive unit tests covering all functions and edge cases |
| src/fabric_cicd/constants.py | Adds workspace role and principal type constants |
| src/fabric_cicd/_common/_check_utils.py | Adds GUID validation utility function |
| src/fabric_cicd/init.py | Exports new workspace management functions |
| sample/workspace_config_example.yml | Provides example YAML configuration for bulk workspace creation |
| docs/how_to/workspace_management.md | Detailed documentation with usage examples and best practices |
docs/how_to/workspace_management.md
Outdated
| For detailed API documentation, see the [Code Reference](../code_reference.md#workspace-management) section. | ||
|
|
||
| ### Related Functions | ||
|
|
||
| - [`create_workspace`](../code_reference.md#create_workspace): Create a single workspace | ||
| - [`create_workspaces_from_config`](../code_reference.md#create_workspaces_from_config): Create multiple workspaces from YAML config | ||
| - [`assign_workspace_to_capacity`](../code_reference.md#assign_workspace_to_capacity): Assign workspace to capacity | ||
| - [`add_workspace_role_assignment`](../code_reference.md#add_workspace_role_assignment): Add user/group/SP to workspace | ||
| - [`FabricWorkspace`](../code_reference.md#fabricworkspace): Initialize workspace for deployment | ||
| - [`publish_all_items`](../code_reference.md#publish_all_items): Deploy items to workspace |
Copilot
AI
Nov 18, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation references a 'Code Reference' section with anchor links to the new functions (e.g., #workspace-management, #create_workspace), but these anchors likely don't exist yet in the code_reference.md file. Either remove these specific anchor references or ensure the corresponding API reference documentation is added to code_reference.md.
| For detailed API documentation, see the [Code Reference](../code_reference.md#workspace-management) section. | |
| ### Related Functions | |
| - [`create_workspace`](../code_reference.md#create_workspace): Create a single workspace | |
| - [`create_workspaces_from_config`](../code_reference.md#create_workspaces_from_config): Create multiple workspaces from YAML config | |
| - [`assign_workspace_to_capacity`](../code_reference.md#assign_workspace_to_capacity): Assign workspace to capacity | |
| - [`add_workspace_role_assignment`](../code_reference.md#add_workspace_role_assignment): Add user/group/SP to workspace | |
| - [`FabricWorkspace`](../code_reference.md#fabricworkspace): Initialize workspace for deployment | |
| - [`publish_all_items`](../code_reference.md#publish_all_items): Deploy items to workspace | |
| For detailed API documentation, see the [Code Reference](../code_reference.md) section. | |
| ### Related Functions | |
| - [`create_workspace`](../code_reference.md): Create a single workspace | |
| - [`create_workspaces_from_config`](../code_reference.md): Create multiple workspaces from YAML config | |
| - [`assign_workspace_to_capacity`](../code_reference.md): Assign workspace to capacity | |
| - [`add_workspace_role_assignment`](../code_reference.md): Add user/group/SP to workspace | |
| - [`FabricWorkspace`](../code_reference.md): Initialize workspace for deployment | |
| - [`publish_all_items`](../code_reference.md): Deploy items to workspace |
|
@microsoft-github-policy-service agree |
workspace_management.py.workspace_config_example.yml.test_workspace_management.py, covering various scenarios including invalid inputs and role assignments.Description
Briefly describe what this PR does and why.
Linked Issue (REQUIRED)
Fixes #635