[ChangeSafety] Fix base calls in GetDynamicParameters#29222
[ChangeSafety] Fix base calls in GetDynamicParameters#29222
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Pull request overview
This PR updates several cmdlets’ GetDynamicParameters() implementations to preserve and return dynamic parameters provided by base cmdlet classes, instead of returning null or always starting from a new empty dictionary. This helps ensure inherited dynamic parameters (from AzureRMCmdlet/AzurePSCmdlet/module base cmdlets) continue to flow through when a cmdlet doesn’t add its own dynamic parameters.
Changes:
- Return
base.GetDynamicParameters()instead ofnullwhen no custom dynamic parameters are needed (Storage, IoTHub, CosmosDB). - Seed
RuntimeDefinedParameterDictionaryinstances frombase.GetDynamicParameters()before adding cmdlet-specific runtime parameters (Network, Resources, DataMigration, Accounts config). - Minor whitespace-only change in
TestDeploymentCmdletBase.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Storage/Storage/File/Cmdlet/SetAzureStorageFileContent.cs | Returns base dynamic parameters on non-Windows instead of null. |
| src/Storage/Storage/File/Cmdlet/GetAzureStorageFileContent.cs | Returns base dynamic parameters on non-Windows instead of null. |
| src/Resources/ResourceManager/Implementation/CmdletBase/TestDeploymentCmdletBase.cs | Whitespace-only change in method spacing. |
| src/Resources/ResourceManager/Implementation/CmdletBase/DeploymentStacksCreateCmdletBase.cs | Seeds dynamic parameter dictionary from base.GetDynamicParameters(). |
| src/Resources/ResourceManager/Implementation/CmdletBase/DeploymentCmdletBase.cs | Seeds dynamic parameter dictionary from base.GetDynamicParameters(). |
| src/Network/Network/PrivateLinkService/PrivateLinkResource/GetAzurePrivateLinkResourceCommand.cs | Seeds runtime parameter dictionary from base before adding provider-specific parameter. |
| src/Network/Network/PrivateLinkService/PrivateEndpointConnection/PrivateEndpointConnectionBaseCmdlet.cs | Seeds runtime parameter dictionary from base before adding provider-specific parameter. |
| src/IotHub/IotHub/IotHub/Routing/AddAzureRmIotHubRoutingEndpoint.cs | Returns base dynamic parameters when endpoint type doesn’t require custom dynamic params. |
| src/IotHub/IotHub/IotHub/DataPlane/Module/SetAzIotHubModule.cs | Returns base dynamic parameters when auth method doesn’t require custom dynamic params. |
| src/IotHub/IotHub/IotHub/DataPlane/Module/AddAzIotHubModule.cs | Returns base dynamic parameters when auth method doesn’t require custom dynamic params. |
| src/IotHub/IotHub/IotHub/DataPlane/Device/SetAzIotHubDevice.cs | Returns base dynamic parameters when auth method doesn’t require custom dynamic params. |
| src/IotHub/IotHub/IotHub/DataPlane/Device/AddAzIotHubDevice.cs | Returns base dynamic parameters when auth method doesn’t require custom dynamic params. |
| src/DataMigration/DataMigration/Cmdlets/NewDataMigrationTask.cs | Merges base dynamic parameters with task-type-specific runtime params and returns combined dictionary. |
| src/DataMigration/DataMigration/Cmdlets/NewConnectionInfoCmdlet.cs | Merges base dynamic parameters with server-type-specific runtime params and returns combined dictionary. |
| src/DataMigration/DataMigration/Cmdlets/InvokeDataMigrationCommand.cs | Merges base dynamic parameters with command-type-specific runtime params and returns combined dictionary. |
| src/CosmosDB/CosmosDB/CosmosDBAccount/NewAzCosmosDBAccount.cs | Returns base dynamic parameters when PIT restore dynamic params aren’t used. |
| src/Accounts/Accounts/Config/ConfigCommandBase.cs | Preserves base-class dynamic parameters before adding config-key runtime params. |
| return base.GetDynamicParameters(); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Line contains trailing whitespace (blank line with spaces). Please remove the extra spaces to avoid unnecessary diffs and formatting noise.
isra-fel
left a comment
There was a problem hiding this comment.
Consider updating the ChangeLog.md file for these modules cause otherwise the change safety work still won't be reflected on them.
This could of cause be defered to the same release of the wave 1 work of change safety. So I'll approve the PR first and let you decide @notyashhh
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.