Skip to content

Removed EnableSoftDelete parameter from New-AzSqlServer and Set-AzSqlServer commands#29576

Merged
YanaXu merged 5 commits into
Azure:mainfrom
rambabu-yalla:ramyal/RemoveEnableSoftDeleteParam
May 19, 2026
Merged

Removed EnableSoftDelete parameter from New-AzSqlServer and Set-AzSqlServer commands#29576
YanaXu merged 5 commits into
Azure:mainfrom
rambabu-yalla:ramyal/RemoveEnableSoftDeleteParam

Conversation

@rambabu-yalla

@rambabu-yalla rambabu-yalla commented May 12, 2026

Copy link
Copy Markdown
Contributor

Description

This PR removes EnableSoftDelete parameter from New-AzSqlServer and Set-AzSqlServer commands as earlier announced.

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copilot AI review requested due to automatic review settings May 12, 2026 16:10
@azure-client-tools-bot-prd

Copy link
Copy Markdown
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@github-actions

Copy link
Copy Markdown

To the author of the pull request,
This PR was labeled "Contains Breaking Change" because breaking changes have been detected by the static analysis pipeline.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 removes the deprecated -EnableSoftDelete switch from the Az.Sql server cmdlets and consolidates soft-delete configuration on the -SoftDeleteRetentionDays parameter, updating help docs, resources, and tests accordingly.

Changes:

  • Removed -EnableSoftDelete from New-AzSqlServer and Set-AzSqlServer and deleted the associated validation/translation logic.
  • Updated cmdlet help markdown and module ChangeLog entry to reflect the API change.
  • Updated unit/scenario tests and session recordings to stop using -EnableSoftDelete.

Reviewed changes

Copilot reviewed 10 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Sql/Sql/Server/Cmdlet/SetAzureSqlServer.cs Removes EnableSoftDelete parameter usage and adjusts soft-delete retention update behavior.
src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs Removes EnableSoftDelete parameter and sends SoftDeleteRetentionDays directly.
src/Sql/Sql/Server/Cmdlet/AzureSqlServerCmdletBase.cs Simplifies validation to only validate SoftDeleteRetentionDays range.
src/Sql/Sql/Properties/Resources.resx Removes strings only used by the old EnableSoftDelete validation paths.
src/Sql/Sql/Properties/Resources.Designer.cs Regenerates designer to match resource removals.
src/Sql/Sql/help/Set-AzSqlServer.md Removes -EnableSoftDelete from syntax and parameter documentation.
src/Sql/Sql/help/New-AzSqlServer.md Removes -EnableSoftDelete from syntax and parameter documentation.
src/Sql/Sql/ChangeLog.md Adds an upcoming-release note describing the breaking change and replacement parameter.
src/Sql/Sql.Test/UnitTests/AzureSqlDatabaseServerAttributeTests.cs Updates attribute tests to no longer expect EnableSoftDelete.
src/Sql/Sql.Test/SessionRecords/.../TestRestoreNonExistentDeletedServer.json Updates recorded HTTP interactions after test changes/rerecording.
src/Sql/Sql.Test/ScenarioTests/ServerCrudTests.ps1 Updates scenarios to use SoftDeleteRetentionDays only and adjusts expectations.
Files not reviewed (1)
  • src/Sql/Sql/Properties/Resources.Designer.cs: Language not supported

Comment on lines +188 to +191
// If the user supplied -SoftDeleteRetentionDays use it; otherwise fall back to the value returned by GET.
// The GET value may be -1 when soft-delete was never configured on the server, which the backend safely
// ignores in a PUT request (no-op), so existing server state is preserved.
updateData[0].SoftDeleteRetentionDays = this.SoftDeleteRetentionDays ?? updateData[0].SoftDeleteRetentionDays;
@VeryEarly

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

@rambabu-yalla rambabu-yalla force-pushed the ramyal/RemoveEnableSoftDeleteParam branch from 3807e4e to c9841a2 Compare May 13, 2026 09:29
@VeryEarly

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

Comment thread src/Sql/Sql/ChangeLog.md Outdated
Copilot AI review requested due to automatic review settings May 14, 2026 09:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 18 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • src/Sql/Sql/Properties/Resources.Designer.cs: Language not supported

@VeryEarly

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

@YanaXu

YanaXu commented May 15, 2026

Copy link
Copy Markdown
Contributor

Hi @rambabu-yalla, please resolve the conflicts of the following files:

  • src/Sql/Sql/ChangeLog.md
  • src/Sql/Sql/Properties/Resources.Designer.cs

@YanaXu

YanaXu commented May 18, 2026

Copy link
Copy Markdown
Contributor

Hi @rambabu-yalla, FYI, the code complete date of Major Release is 05/26.

@rambabu-yalla rambabu-yalla force-pushed the ramyal/RemoveEnableSoftDeleteParam branch from 224c696 to f6e1ea9 Compare May 18, 2026 06:20
@rambabu-yalla

Copy link
Copy Markdown
Contributor Author

Hi @rambabu-yalla, FYI, the code complete date of Major Release is 05/26.

Hi @YanaXu : I have just resolved merge conflicts. Could you please proceed with merge.?. thanks

@YanaXu

YanaXu commented May 18, 2026

Copy link
Copy Markdown
Contributor

/azp run azure-powershell - security-tools

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/Sql/Sql/ChangeLog.md Outdated
## Version 6.5.0
* Added support for User Assigned Managed Identity (UAMI) authentication in Data Sync cmdlets (`New-AzSqlSyncGroup`, `Update-AzSqlSyncGroup`, `New-AzSqlSyncMember`, `Update-AzSqlSyncMember`)
* Removed legacy usage of 2014 APIs in Firewall Rule cmdlets
* Removed the `EnableSoftDelete` parameter from `New-AzSqlServer` and `Set-AzSqlServer` cmdlets. Use the `SoftDeleteRetentionDays` parameter instead: setting `SoftDeleteRetentionDays` to 1-7 enables soft-delete, and setting it to 0 disables soft-delete.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line.

Comment thread src/Sql/Sql/ChangeLog.md
@YanaXu

YanaXu commented May 19, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

Copilot AI review requested due to automatic review settings May 19, 2026 06:07
@YanaXu

YanaXu commented May 19, 2026

Copy link
Copy Markdown
Contributor

/azp run azure-powershell - security-tools

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 18 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • src/Sql/Sql/Properties/Resources.Designer.cs: Language not supported

"Az.Sql","Microsoft.Azure.Commands.Sql.Server.Cmdlet.NewAzureSqlServer","New-AzSqlServer","0","1050","The parameter set '__AllParameterSets' for cmdlet 'New-AzSqlServer' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'New-AzSqlServer'."
"Az.Sql","Microsoft.Azure.Commands.Sql.Server.Cmdlet.SetAzureSqlServer","Set-AzSqlServer","0","2000","The cmdlet 'Set-AzSqlServer' no longer supports the parameter 'EnableSoftDelete' and no alias was found for the original parameter name.","Add the parameter 'EnableSoftDelete' back to the cmdlet 'Set-AzSqlServer', or add an alias to the original parameter name."
"Az.Sql","Microsoft.Azure.Commands.Sql.Server.Cmdlet.SetAzureSqlServer","Set-AzSqlServer","0","1050","The parameter set '__AllParameterSets' for cmdlet 'Set-AzSqlServer' has been removed.","Add parameter set '__AllParameterSets' back to cmdlet 'Set-AzSqlServer'."
"Module","ClassName","Target","Severity","ProblemId","Description","Remediation"
@VeryEarly

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Contributor
Azure Pipelines successfully started running 3 pipeline(s).

@YanaXu YanaXu merged commit 4a374f8 into Azure:main May 19, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants