Skip to content

Conversation

eerhardt
Copy link
Member

Description

This workaround is no longer necessary now that the issues in the Azure.Provisioning libraries are resolved.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No

This workaround is no longer necessary now that the issues in the Azure.Provisioning libraries are resolved.
@github-actions github-actions bot added the area-integrations Issues pertaining to Aspire Integrations packages label Jul 14, 2025
Copy link
Contributor

@Copilot 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 PR removes the custom SqlServerScriptProvisioningResource workaround and directly uses AzurePowerShellScript now that the underlying Azure.Provisioning issue is resolved.

  • Deleted the entire SqlServerScriptProvisioningResource class and its supporting logic.
  • Updated AzureSqlServerResource to instantiate AzurePowerShellScript and set the retention interval inline.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Aspire.Hosting.Azure.Sql/SqlServerScriptProvisioningResource.cs Removed obsolete workaround class entirely.
src/Aspire.Hosting.Azure.Sql/AzureSqlServerResource.cs Replaced custom resource instantiation with AzurePowerShellScript and added RetentionInterval.
Comments suppressed due to low confidence (2)

src/Aspire.Hosting.Azure.Sql/AzureSqlServerResource.cs:159

  • Double-check whether AzurePowerShellScript still sets the kind property to "AzurePowerShell" by default as the custom class did. If not, you may need to explicitly set scriptResource.Kind = "AzurePowerShell" to preserve the same behavior.
            var scriptResource = new AzurePowerShellScript($"script_{uniqueScriptIdentifier}")

src/Aspire.Hosting.Azure.Sql/AzureSqlServerResource.cs:162

  • Ensure that existing tests referencing SqlServerScriptProvisioningResource are updated to cover the new AzurePowerShellScript behavior, and consider adding or adjusting tests to verify that RetentionInterval is correctly applied.
                RetentionInterval = TimeSpan.FromHours(1),

Copy link
Member

@davidfowl davidfowl left a comment

Choose a reason for hiding this comment

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

LGTM

@eerhardt eerhardt merged commit 6783470 into dotnet:main Jul 14, 2025
277 checks passed
@eerhardt eerhardt deleted the RemoveSqlServerScriptProvisioningResource branch July 14, 2025 17:22
@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-integrations Issues pertaining to Aspire Integrations packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants