Fixes #716 Improve environment-mapping behavior in optional config fields#734
Merged
shirasassoon merged 11 commits intomicrosoft:mainfrom Feb 2, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes issue #716 related to deployment failures when using folder_exclude_regex by improving environment-specific configuration handling. The changes introduce a clearer distinction between required and optional configuration fields, centralizing value extraction logic, and enhancing validation to provide appropriate logging (errors, warnings, or debug messages) based on field importance.
Changes:
- Introduced
get_config_valuehelper function to centralize environment-specific value extraction logic - Enhanced validation to distinguish required fields (causing errors) from optional fields (logging warnings/debug)
- Updated documentation to clearly explain environment-specific configuration behavior
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/fabric_cicd/_common/_config_utils.py |
Added get_config_value helper and refactored extraction functions to use centralized logic |
src/fabric_cicd/_common/_config_validator.py |
Enhanced _validate_environment_exists to differentiate required/optional fields with appropriate logging |
docs/how_to/config_deployment.md |
Added comprehensive documentation on environment-specific configuration and field requirements |
tests/test_config_validator.py |
Updated tests to validate required/optional field behavior and logging |
tests/test_deploy_with_config.py |
Added comprehensive tests for get_config_value and environment-specific settings extraction |
aviatco
reviewed
Jan 29, 2026
ayeshurun
reviewed
Jan 30, 2026
Contributor
Author
|
Thank you @aviatco and @ayeshurun for reviewing. I've addressed the comments. Please review updated PR when you have a chance. Thanks |
ayeshurun
approved these changes
Feb 2, 2026
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.
Fixes #716
This pull request improves environment-specific configuration handling and validation for deployment configs. It clarifies documentation, centralizes logic for extracting environment-specific values, and enhances validation to distinguish between required and optional fields—logging errors, warnings, or debug messages as appropriate. Tests are updated to reflect these changes.
Environment-specific configuration and validation improvements:
docs/how_to/config_deployment.mdto clearly explain environment-specific configuration, distinguishing required and optional fields and their validation/logging behaviors.src/fabric_cicd/_common/_config_validator.pynow differentiates required fields (which cause errors if missing for an environment) from optional fields (which log warnings or debug messages), and includes new fields in the validation matrix. [1] [2] [3]Configuration extraction and code simplification:
get_config_valuehelper insrc/fabric_cicd/_common/_config_utils.pyto centralize logic for retrieving environment-specific or single values, reducing repetition and improving maintainability. This helper is now used in all relevant settings extraction functions. [1] [2] [3]Testing updates:
tests/test_config_validator.pyto cover new fields, verify required/optional logic, and ensure correct error/warning/debug behaviors for missing environment mappings. [1] [2] [3]