Skip to content

Conversation

@rambabu-yalla
Copy link
Contributor

@rambabu-yalla rambabu-yalla commented Dec 31, 2025

Description

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 December 31, 2025 14:14
@azure-client-tools-bot-prd
Copy link

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

Copy link
Contributor

Copilot AI left a 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 pull request adds a new Get-AzSqlDeletedServer cmdlet and modifies the soft-delete retention functionality in Azure SQL Server cmdlets. The changes improve the soft-delete feature's usability by simplifying the parameter model and providing better tooling for managing deleted servers.

Key Changes:

  • Added new Get-AzSqlDeletedServer cmdlet to retrieve information about soft-deleted Azure SQL servers by location
  • Simplified soft-delete retention configuration by making SoftDeleteRetentionDays the primary parameter (deprecated EnableSoftDelete)
  • Reduced maximum retention period from 35 days to 7 days (breaking change)

Reviewed changes

Copilot reviewed 21 out of 24 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/Sql/Sql/help/Get-AzSqlDeletedServer.md New help documentation for Get-AzSqlDeletedServer cmdlet
src/Sql/Sql/help/Set-AzSqlServer.md Updated examples to use SoftDeleteRetentionDays parameter instead of EnableSoftDelete
src/Sql/Sql/help/Restore-AzSqlServer.md Clarified parameter descriptions for resource group and location requirements
src/Sql/Sql/help/New-AzSqlServer.md Updated examples and parameter help to reflect new retention range (0-7 days)
src/Sql/Sql/Server/Services/AzureSqlDeletedServerCommunicator.cs New service communicator for deleted server REST endpoints
src/Sql/Sql/Server/Services/AzureSqlDeletedServerAdapter.cs New adapter layer for deleted server operations with model conversion
src/Sql/Sql/Server/Model/AzureSqlDeletedServerModel.cs New model class representing deleted server properties
src/Sql/Sql/Server/Cmdlet/SetAzureSqlServer.cs Refactored to use centralized soft-delete validation and computation methods
src/Sql/Sql/Server/Cmdlet/RestoreAzureSqlServer.cs Enhanced validation logic for deleted server restoration with improved error messages
src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs Refactored to use centralized soft-delete validation and added deprecation warning
src/Sql/Sql/Server/Cmdlet/GetAzSqlDeletedServer.cs New cmdlet implementation for retrieving deleted servers
src/Sql/Sql/Server/Cmdlet/AzureSqlServerCmdletBase.cs Added shared validation and computation methods for soft-delete parameters
src/Sql/Sql/Server/Cmdlet/AzureSqlDeletedServerCmdletBase.cs New base class for deleted server cmdlets
src/Sql/Sql/Properties/Resources.resx Added new error message strings for deleted server operations
src/Sql/Sql/Properties/Resources.Designer.cs Generated code for new resource strings
src/Sql/Sql/ChangeLog.md Added release notes documenting new cmdlet and breaking changes
src/Sql/Sql/Az.Sql.psd1 Added Get-AzSqlDeletedServer to exported cmdlets list
src/Sql/Sql.Test/UnitTests/AzureSqlDeletedServerAttributeTests.cs New unit tests for cmdlet attributes
src/Sql/Sql.Test/SessionRecords/Microsoft.Azure.Commands.Sql.Test.ScenarioTests.DeletedServerTests/TestGetDeletedServerByLocation.json Test recording for deleted server retrieval
src/Sql/Sql.Test/ScenarioTests/ServerCrudTests.ps1 Updated test cases to use SoftDeleteRetentionDays parameter
src/Sql/Sql.Test/ScenarioTests/DeletedServerTests.ps1 New scenario tests for Get-AzSqlDeletedServer cmdlet
src/Sql/Sql.Test/ScenarioTests/DeletedServerTests.cs New test runner class for deleted server tests
Files not reviewed (1)
  • src/Sql/Sql/Properties/Resources.Designer.cs: Language not supported

Comment on lines 192 to 195
string errorMessage = errEx.Body?.Error?.Message ?? errEx.Message;

if (errorCode == "ResourceGroupNotFound" ||
(errorMessage.Contains("Resource group") && errorMessage.Contains("could not be found")))
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The error handling checks both errorCode and errorMessage to determine ResourceGroupNotFound condition. However, the string matching in errorMessage ("Resource group" and "could not be found") is fragile and could break if Microsoft changes the error message text. Consider relying primarily on the errorCode when available, or use a more robust error detection mechanism.

Suggested change
string errorMessage = errEx.Body?.Error?.Message ?? errEx.Message;
if (errorCode == "ResourceGroupNotFound" ||
(errorMessage.Contains("Resource group") && errorMessage.Contains("could not be found")))
if (string.Equals(errorCode, "ResourceGroupNotFound", StringComparison.OrdinalIgnoreCase))

Copilot uses AI. Check for mistakes.
Comment on lines 32 to 50
/// Gets or sets the name of the deleted server to retrieve. If not specified, lists all deleted servers in the location.
/// </summary>
[Parameter(Mandatory = false,
ValueFromPipelineByPropertyName = true,
Position = 0,
HelpMessage = "The name of the deleted server to retrieve. If not specified, lists all deleted servers in the location.")]
[ValidateNotNullOrEmpty]
public string ServerName { get; set; }

/// <summary>
/// Gets or sets the location where the deleted server was located
/// </summary>
[Parameter(Mandatory = true,
ValueFromPipelineByPropertyName = true,
Position = 1,
HelpMessage = "The Azure region where the deleted server was located.")]
[LocationCompleter("Microsoft.Sql/deletedServers")]
[ValidateNotNullOrEmpty]
public string Location { get; set; }
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The Position attribute for Location parameter is set to 0, but for ServerName it's set to 1. However, in the parameter definition, ServerName comes before Location. The positions should match the natural order or the intended usage pattern. Consider making Location Position 1 and ServerName Position 0, or adjust them to match the expected command usage pattern.

Suggested change
/// Gets or sets the name of the deleted server to retrieve. If not specified, lists all deleted servers in the location.
/// </summary>
[Parameter(Mandatory = false,
ValueFromPipelineByPropertyName = true,
Position = 0,
HelpMessage = "The name of the deleted server to retrieve. If not specified, lists all deleted servers in the location.")]
[ValidateNotNullOrEmpty]
public string ServerName { get; set; }
/// <summary>
/// Gets or sets the location where the deleted server was located
/// </summary>
[Parameter(Mandatory = true,
ValueFromPipelineByPropertyName = true,
Position = 1,
HelpMessage = "The Azure region where the deleted server was located.")]
[LocationCompleter("Microsoft.Sql/deletedServers")]
[ValidateNotNullOrEmpty]
public string Location { get; set; }
/// Gets or sets the location where the deleted server was located
/// </summary>
[Parameter(Mandatory = true,
ValueFromPipelineByPropertyName = true,
Position = 0,
HelpMessage = "The Azure region where the deleted server was located.")]
[LocationCompleter("Microsoft.Sql/deletedServers")]
[ValidateNotNullOrEmpty]
public string Location { get; set; }
/// <summary>
/// Gets or sets the name of the deleted server to retrieve. If not specified, lists all deleted servers in the location.
/// </summary>
[Parameter(Mandatory = false,
ValueFromPipelineByPropertyName = true,
Position = 1,
HelpMessage = "The name of the deleted server to retrieve. If not specified, lists all deleted servers in the location.")]
[ValidateNotNullOrEmpty]
public string ServerName { get; set; }

Copilot uses AI. Check for mistakes.
Comment on lines +91 to +97
string[] segments = deletedServer.OriginalId.Split('/');

// Parse servername and subscription from originalId if available
string parsedServerName = segments[8];
string parsedSubscriptionId = segments[2];
string parsedResourceGroupName = segments[4];

Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

Hardcoded array indices (2, 4, 8) are used to parse the resource ID without validation. If the OriginalId format changes or is malformed, this will throw an IndexOutOfRangeException. Consider using a more robust parsing method or at least validating the array length before accessing indices.

Suggested change
string[] segments = deletedServer.OriginalId.Split('/');
// Parse servername and subscription from originalId if available
string parsedServerName = segments[8];
string parsedSubscriptionId = segments[2];
string parsedResourceGroupName = segments[4];
string parsedServerName = null;
string parsedSubscriptionId = null;
string parsedResourceGroupName = null;
if (!string.IsNullOrEmpty(deletedServer.OriginalId))
{
string[] segments = deletedServer.OriginalId.Split('/');
// Parse server name, subscription, and resource group from OriginalId if available
if (segments.Length > 8)
{
parsedSubscriptionId = segments[2];
parsedResourceGroupName = segments[4];
parsedServerName = segments[8];
}
}

Copilot uses AI. Check for mistakes.
### -SoftDeleteRetentionDays
Specifies the soft-delete retention days for the server. The acceptable values for this parameter are 0-35. Specify 0 to disable the SoftDelete
Specifies the soft-delete retention days for the server. The acceptable values for this parameter are 0-7. Specify 0 to disable the SoftDelete
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The acceptable values range has been changed from 0-35 to 0-7, which is a breaking change for existing users who may have configured retention between 8-35 days. This breaking change should be clearly documented in the ChangeLog with proper migration guidance.

Suggested change
Specifies the soft-delete retention days for the server. The acceptable values for this parameter are 0-7. Specify 0 to disable the SoftDelete
Specifies the number of days that deleted databases are retained for recovery on this server. The acceptable values for this parameter are 0 through 7. Specify 0 to disable soft-delete retention. Earlier versions of this cmdlet allowed values from 0 through 35, so existing scripts or configurations that use values between 8 and 35 must be updated to use a value between 0 and 7 to succeed.

Copilot uses AI. Check for mistakes.
- Additional information about change #1
-->
## Upcoming Release
* Added 'Get-AzSqlDeletedServer' cmdlet to retrieve soft deleted Azure SQL servers
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

According to ChangeLog guidelines, avoid using special characters like backticks in ChangeLog entries as they can cause issues in PowerShell module manifests. Replace 'Get-AzSqlDeletedServer' with Get-AzSqlDeletedServer (without quotes) or use simple quotes.

Copilot generated this review using guidance from repository custom instructions.
* Added 'Get-AzSqlDeletedServer' cmdlet to retrieve soft deleted Azure SQL servers
- Supports retrieving deleted servers by location or specific deleted server by name
* Preannounced breaking changes. Please refer to https://go.microsoft.com/fwlink/?linkid=2333229
* The EnableSoftDelete parameter is deprecated from `New-AzSqlServer` and `Set-AzSqlServer` cmdlets and will be removed by May 2026.
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The ChangeLog entry mentions "The EnableSoftDelete parameter is deprecated" but does not specify which version it was deprecated from. According to ChangeLog guidelines for Azure PowerShell, entries should clearly communicate the change from the user's perspective. Consider rewording to: "Deprecated EnableSoftDelete parameter in New-AzSqlServer and Set-AzSqlServer cmdlets. Use SoftDeleteRetentionDays parameter instead. EnableSoftDelete will be removed in May 2026."

Copilot generated this review using guidance from repository custom instructions.
## Upcoming Release
* Added 'Get-AzSqlDeletedServer' cmdlet to retrieve soft deleted Azure SQL servers
- Supports retrieving deleted servers by location or specific deleted server by name
* Preannounced breaking changes. Please refer to https://go.microsoft.com/fwlink/?linkid=2333229
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The ChangeLog entry about breaking changes lacks detail for users. Consider expanding it to explain what the breaking changes are (e.g., SoftDeleteRetentionDays range reduced from 0-35 to 0-7, EnableSoftDelete parameter deprecated). Users should understand the impact without needing to click the link.

Copilot generated this review using guidance from repository custom instructions.
[ValidateRange(0, 35)]
public int? SoftDeleteRetentionDays { get; set; }
HelpMessage = "Specifies the number of days to retain a deleted server for possible restoration. Valid values are 0-7. A value of 0 disables soft-delete retention.")]
public int? SoftDeleteRetentionDays { get; set; }
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

The ValidateRange attribute has been removed from the SoftDeleteRetentionDays parameter. While validation logic exists in ValidateSoftDeleteParameters method, removing the ValidateRange attribute means users won't get immediate parameter validation feedback before the cmdlet executes. Consider keeping the ValidateRange attribute for better user experience.

Suggested change
public int? SoftDeleteRetentionDays { get; set; }
[ValidateRange(0, 7)]
public int? SoftDeleteRetentionDays { get; set; }

Copilot uses AI. Check for mistakes.
Comment on lines 138 to 139
'Get-AzSqlDeletedServer',
'Get-AzSqlElasticJob',
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

There is inconsistent indentation with tabs instead of spaces on lines 138-139. The rest of the file uses spaces. Maintain consistent indentation throughout the file.

Suggested change
'Get-AzSqlDeletedServer',
'Get-AzSqlElasticJob',
'Get-AzSqlDeletedServer',
'Get-AzSqlElasticJob',

Copilot uses AI. Check for mistakes.
* Added 'Get-AzSqlDeletedServer' cmdlet to retrieve soft deleted Azure SQL servers
- Supports retrieving deleted servers by location or specific deleted server by name
* Preannounced breaking changes. Please refer to https://go.microsoft.com/fwlink/?linkid=2333229
* The EnableSoftDelete parameter is deprecated from `New-AzSqlServer` and `Set-AzSqlServer` cmdlets and will be removed by May 2026.
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

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

According to ChangeLog guidelines, avoid using backticks around cmdlet names in ChangeLog entries. Replace New-AzSqlServer and Set-AzSqlServer with New-AzSqlServer and Set-AzSqlServer (without backticks) or use simple quotes.

Copilot generated this review using guidance from repository custom instructions.
Copy link
Contributor

Copilot AI left a comment

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 22 out of 28 changed files in this pull request and generated 8 comments.

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

Comment on lines +45 to +103
protected void ValidateSoftDeleteParameters(int? softDeleteRetentionDays, bool? enableSoftDelete)
{
// Validate SoftDeleteRetentionDays range
if (softDeleteRetentionDays.HasValue)
{
if (softDeleteRetentionDays.Value < SoftDeleteRetentionDaysDisabled || softDeleteRetentionDays.Value > SoftDeleteRetentionDaysMaximum)
{
throw new PSArgumentException($"SoftDeleteRetentionDays must be between {SoftDeleteRetentionDaysDisabled} and {SoftDeleteRetentionDaysMaximum}.", "SoftDeleteRetentionDays");
}
}

// If both EnableSoftDelete and SoftDeleteRetentionDays are specified, validate their combination
if (enableSoftDelete.HasValue && softDeleteRetentionDays.HasValue)
{
if (enableSoftDelete == true && (softDeleteRetentionDays.Value < SoftDeleteRetentionDaysMinimum || softDeleteRetentionDays.Value > SoftDeleteRetentionDaysMaximum))
{
throw new PSArgumentException($"When EnableSoftDelete is true, SoftDeleteRetentionDays must be between {SoftDeleteRetentionDaysMinimum} and {SoftDeleteRetentionDaysMaximum}.", "SoftDeleteRetentionDays");
}
else if (enableSoftDelete == false && softDeleteRetentionDays.Value != SoftDeleteRetentionDaysDisabled)
{
throw new PSArgumentException($"When EnableSoftDelete is false, SoftDeleteRetentionDays must be {SoftDeleteRetentionDaysDisabled}.", "SoftDeleteRetentionDays");
}
}
}

/// <summary>
/// Computes the SoftDeleteRetentionDays value based on provided parameters
/// </summary>
/// <param name="softDeleteRetentionDays">The explicitly provided retention days</param>
/// <param name="enableSoftDelete">The enable soft delete flag</param>
/// <param name="existingValue">The existing retention days value (for Set operations)</param>
/// <returns>The computed retention days value</returns>
protected int? ComputeSoftDeleteRetentionDays(int? softDeleteRetentionDays, bool? enableSoftDelete, int? existingValue = null)
{
if (softDeleteRetentionDays.HasValue)
{
// SoftDeleteRetentionDays was explicitly provided, use it
return softDeleteRetentionDays.Value;
}
else if (enableSoftDelete.HasValue)
{
// Only EnableSoftDelete was provided
if (enableSoftDelete == true)
{
// Enabling soft-delete without specifying days, default to 7
return SoftDeleteRetentionDaysMaximum;
}
else
{
// Disabling soft-delete, set to 0
return SoftDeleteRetentionDaysDisabled;
}
}
else
{
// Neither parameter specified, return existing value or null
return existingValue;
}
}
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

There is no test coverage for the new validation logic that enforces SoftDeleteRetentionDays must be between 0 and 7. Consider adding negative test cases that verify:

  1. Values less than 0 are rejected with the appropriate error message
  2. Values greater than 7 are rejected with the appropriate error message
  3. The validation properly handles the interaction between EnableSoftDelete and SoftDeleteRetentionDays parameters

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +109
AzureSqlDeletedServerModel model = new AzureSqlDeletedServerModel()
{
ServerName = parsedServerName,
DeletionTime = deletedServer.DeletionTime,
FullyQualifiedDomainName = deletedServer.FullyQualifiedDomainName,
Version = deletedServer.Version,
Id = deletedServer.Id,
Type = deletedServer.Type,
OriginalId = deletedServer.OriginalId,
SubscriptionId = parsedSubscriptionId,
ResourceGroupName = parsedResourceGroupName
};
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

The Location property is missing from the AzureSqlDeletedServerModel but is shown in the help documentation examples (lines 33, 53). The cmdlet receives Location as a parameter but doesn't populate it in the returned model. Either add a Location property to the model and populate it in CreateDeletedServerModelFromResponse, or update the help documentation to remove Location from the example outputs.

Copilot uses AI. Check for mistakes.
Comment on lines +142 to +175
private AzureSqlDeletedServerModel GetDeletedServerInResourceGroup()
{
DeletedServer deletedServer;
try
{
deletedServer = DeletedServerAdapter.GetDeletedServer(this.Location, this.ServerName);
}
catch (ErrorResponseException errEx) when (errEx.Response?.StatusCode == System.Net.HttpStatusCode.NotFound)
{
throw new PSArgumentException(
string.Format(Properties.Resources.DeletedServerNotFound, this.ServerName, this.Location),
"ServerName");
}

AzureSqlDeletedServerModel deletedServerModel = DeletedServerAdapter.CreateDeletedServerModelFromResponse(deletedServer);

if (deletedServerModel == null)
{
throw new PSArgumentException(
string.Format(Properties.Resources.DeletedServerNotFound, this.ServerName, this.Location),
"ServerName");
}

// Validate that the user-provided ResourceGroupName matches the deleted server's ResourceGroupName
if (!string.Equals(this.ResourceGroupName, deletedServerModel.ResourceGroupName, StringComparison.OrdinalIgnoreCase))
{
throw new PSArgumentException(
string.Format(Properties.Resources.ResourceGroupMismatchForRestore,
this.ResourceGroupName, deletedServerModel.ResourceGroupName, this.ServerName),
"ResourceGroupName");
}

return deletedServerModel;
}
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

There is no test coverage for the new error handling scenarios in RestoreAzureSqlServer:

  1. ResourceGroupMismatchForRestore error when user-provided resource group doesn't match the deleted server's original resource group
  2. ResourceGroupNotFoundForRestore error when the resource group doesn't exist
    These are important error paths that should be tested to ensure users get clear, actionable error messages.

Copilot uses AI. Check for mistakes.
/// </summary>
[Parameter(Mandatory = false,
HelpMessage = "Specify whether to enable soft-delete retention for the server. When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified). To set a custom retention period use -SoftDeleteRetentionDays.")]
HelpMessage = "Specify whether to enable soft-delete retention for the server. When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified).")]
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

The help message still references the EnableSoftDelete parameter in its description: "When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified)." However, the parameter is deprecated and users are encouraged to use SoftDeleteRetentionDays instead. The help message should be updated to clarify that this parameter is deprecated and direct users to use SoftDeleteRetentionDays parameter instead.

Suggested change
HelpMessage = "Specify whether to enable soft-delete retention for the server. When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified).")]
HelpMessage = "Deprecated. Use the SoftDeleteRetentionDays parameter instead to configure soft-delete retention. Setting SoftDeleteRetentionDays to 1-7 enables soft-delete, and setting it to 0 disables soft-delete.")]

Copilot uses AI. Check for mistakes.
/// Boolean Value for enabling Soft Delete Retention for server
/// </summary>
[Parameter(Mandatory = false,
HelpMessage = "Specify whether to enable soft-delete retention for the server. When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified). To set a custom retention period use -SoftDeleteRetentionDays.")]
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

The help message still references the EnableSoftDelete parameter in its description: "When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified). To set a custom retention period use -SoftDeleteRetentionDays." However, the parameter is deprecated and users are encouraged to use SoftDeleteRetentionDays instead. The help message should be updated to clarify that this parameter is deprecated and direct users to use SoftDeleteRetentionDays parameter instead.

Suggested change
HelpMessage = "Specify whether to enable soft-delete retention for the server. When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified). To set a custom retention period use -SoftDeleteRetentionDays.")]
HelpMessage = "DEPRECATED. This parameter will be removed in a future release. Use SoftDeleteRetentionDays instead. Setting SoftDeleteRetentionDays to 1-7 enables soft-delete retention (a dropped server can be restored within the retention window), and setting it to 0 disables soft-delete retention.")]

Copilot uses AI. Check for mistakes.
Comment on lines +778 to +783
<data name="ResourceGroupMismatchForRestore" xml:space="preserve">
<value>The specified resource group '{0}' does not match the deleted server's original resource group '{1}'. Server '{2}' must be restored to its original resource group.</value>
</data>
<data name="ResourceGroupNotFoundForRestore" xml:space="preserve">
<value>Cannot restore deleted server '{0}' because resource group '{1}' does not exist. Please create the resource group before restoring the server.</value>
</data>
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

The error message ResourceGroupMismatchForRestore ends with a period, while ResourceGroupNotFoundForRestore also ends with a period. However, many other error messages in the file don't end with periods (e.g., DeletedServerNotFound, DeletedServerNotFoundInLocation). For consistency with the broader codebase, consider whether error messages should consistently end with periods or not.

Copilot uses AI. Check for mistakes.
Assert-StartsWith ($server5.ServerName + ".") $server5.FullyQualifiedDomainName
Assert-AreEqual $server5.SoftDeleteRetentionDays 0

# Scenario 6: Create server without either parameter (should default to 0 - disabled ot -1 until backend fix is deployed)
Copy link

Copilot AI Jan 1, 2026

Choose a reason for hiding this comment

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

There's a typo in the comment. "ot" should be "or". The comment reads "should default to 0 - disabled ot -1" but should be "should default to 0 - disabled or -1".

Suggested change
# Scenario 6: Create server without either parameter (should default to 0 - disabled ot -1 until backend fix is deployed)
# Scenario 6: Create server without either parameter (should default to 0 - disabled or -1 until backend fix is deployed)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant