Closes #689 - Support semantic model binding per environment#692
Open
Closes #689 - Support semantic model binding per environment#692
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 <66449905+shirasassoon@users.noreply.github.com>
- 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 <66449905+shirasassoon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for semantic model binding per environment
Closes #520 - Support semantic model binding per environment
Dec 22, 2025
Contributor
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.