-
Notifications
You must be signed in to change notification settings - Fork 285
User provided dml-tools property serialization #2952
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
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
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 refactors how the DML tools configuration tracks user-provided values to fix serialization behavior. When DML tools are not explicitly configured by users, they should not be serialized to the config file, maintaining cleaner default configurations.
Key changes:
- Renamed
UserProvidedAllToolsEnabledtoUserProvidedAllToolsfor consistency and clarity - Modified the
Defaultproperty to avoid settingUserProvidedflags, ensuring default configurations don't serialize DML tools - Updated
FromBooleanmethod to only setallToolsEnabledparameter and let individual tools inherit from it - Changed
McpRuntimeOptionsto usebool?for theEnabledparameter to support nullable defaults
Reviewed Changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/Config/ObjectModel/DmlToolsConfig.cs |
Renamed property, updated Default and FromBoolean methods to fix user-provided tracking logic |
src/Config/ObjectModel/McpRuntimeOptions.cs |
Changed Enabled parameter to nullable to support proper default handling |
src/Config/Converters/DmlToolsConfigConverter.cs |
Updated property reference to use renamed UserProvidedAllTools, fixed control flow to use separate if statements |
src/Cli.Tests/ConfigGeneratorTests.cs |
Removed explicit DML tools configuration from test to reflect new default behavior |
| Multiple snapshot files | Updated expected test snapshots to reflect new serialization behavior with UserProvided flags all set to false |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Why make this change?
This PR addresses the issue where with serialization of
dml-toolsproperty for user-provided (non-default) values. This is a follow up to the fix made for the functionality ofdml-toolsproperty- #2927What is this change?
If
dml-toolsis not configured, this property should not be serialized. Serialization should only be done for user provided configuration. So, any value explicitly set or configured by the user fordml-toolswill be serialized.dml-toolscan either have either of the below values-UserProvidedAllToolsis written in JSONHow was this tested?
Sample scenarios for testing-
Scenario 1: Enable all tools using a single boolean value
"dml-tools": trueNote: default is true so even if
dml-toolsunspecified it will default to true.Scenario 2: Disable
execute-entitiesonly and keep other tools enabled as default.Scenario 3: Use full list of tools and enable or disable them