-
Notifications
You must be signed in to change notification settings - Fork 119
Closes #689 - Support semantic model binding per environment #692
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
- Add support for environment-specific connection IDs in semantic_model_binding parameter - Update parameter validation to accept both string and dictionary for connection_id - Add _validate_connection_id_dict method to validate GUID format in dictionary values - Update publish_semanticmodels to resolve environment-specific connection IDs - Support _ALL_ environment key for universal connection ID - Add comprehensive tests for new functionality - Update documentation with examples and notes - Update sample parameter.yml file with examples Co-authored-by: shirasassoon <[email protected]>
- Remove unnecessary local import of re module (already imported at top) - Replace list membership checks with direct equality for single value comparisons - Improve code readability and performance Co-authored-by: shirasassoon <[email protected]>
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 environment-specific connection ID support for semantic model bindings, allowing users to specify different connection IDs per environment (PPE, PROD, etc.) or use a single connection across all environments. This eliminates the need for manual reconfiguration of data source connections after deployment across different environments.
Key Changes:
- Enhanced
connection_idparameter to accept both string (backward compatible) and dictionary formats (environment-specific) - Added GUID validation for connection IDs in dictionary format
- Implemented environment-specific connection ID resolution at publish time with support for
_ALL_environment key
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/fabric_cicd/_parameter/_parameter.py |
Added validation logic for dictionary-based connection_id, GUID format validation, and environment-specific handling |
src/fabric_cicd/_items/_semanticmodel.py |
Implemented connection_id resolution logic to select appropriate connection based on target environment |
tests/test_parameter.py |
Added 7 unit tests covering string/dictionary formats, GUID validation, and edge cases |
docs/how_to/parameterization.md |
Documented both connection_id formats with examples and usage notes |
sample/workspace/parameter.yml |
Updated sample configuration with examples of both string and dictionary connection_id formats |
…ub.com/microsoft/fabric-cicd into copilot/support-semantic-model-binding
Description
Adds environment-specific connection ID support for
semantic_model_bindingparameter to eliminate manual reconfiguration after deployment across environments.Changes
Parameter Validation (
_parameter.py)connection_idas string (backward compatible) or dictionary (per-environment)_validate_connection_id_dict()method with GUID format validation_ALL_environment key for universal connection bindingSemantic Model Publishing (
_semanticmodel.py)connection_idfrom dictionary at publish time_ALL_key resolution with case-insensitive matchingDocumentation & Tests
parameter.ymlwith both format examplesUsage
Linked Issue (REQUIRED)
Issue linking handled via PR title.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.