-
Notifications
You must be signed in to change notification settings - Fork 285
Bug fix for setting dml tools based on bool value as set in config #2927
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
Conversation
|
/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 fixes the FromBoolean method in DmlToolsConfig to properly set individual tool properties. Previously, when creating a config using FromBoolean, all individual tool properties were set to null, which was inconsistent with the method's intent of setting all tools to the same state.
Key changes:
- Updated
FromBooleanto explicitly set all individual tool properties (DescribeEntities,CreateRecord,ReadRecords,UpdateRecord,DeleteRecord,ExecuteEntity) to the providedenabledvalue instead ofnull
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Approving since this is not harmful, but also waiting on clarification on need of AllToolsEnabled
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.
Actually, the copilot feedback comment is useful. Please check it out. I think serialization will be a problem here - since this is not tested.
Can you please list out what combinations were tested here to understand if we missed a scenario? |
|
@souvikghosh04 I've opened a new pull request, #2934, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
/azp run |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
1 similar comment
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
the default here refers to the unspecified tools which will be set to |
…ta-api-builder into Usr/sogh/dmltoolsconfig
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
As discussed offline, this is incorrect behavior. Default value of unspecified tools in the dictionary object should be |
|
/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.
LGTM, please fix the description.
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Co-authored-by: Aniruddh Munde <[email protected]>
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
LGTM, but the MS SQL Integration tests are still failing. |
Why make this change?
Bug fix for setting dml tools correctly.
Closes on - #2942
What is this change?
This fix addresses the inconsistency in config where
dml-toolscan be either set as bool or a dictionary object containing individual tool names and their bool values. Without this fix, we need to individually set eachdml-toolsto true currently.With this change, we will have the following scenarios-
set
dml-toolstotruewill enable all dml tools (default is true)Sample-
"dml-tools": trueset
dml-toolstofalsewill disable all dml toolsSample-
"dml-tools": falseindividual tool names can be specified as dictionary object for
dml-toolsto turn them on (default is true if a tool is not specified).How was this tested?
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