-
Notifications
You must be signed in to change notification settings - Fork 745
Update AzPowerShellVersion to 14.0 for Azure SQL deployment scripts #13308
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: radical <[email protected]>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 13308Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 13308" |
| /// See: https://aka.ms/bicep/linter-diagnostics#use-recent-az-powershell-version | ||
| /// </summary> | ||
| [Fact] | ||
| public async Task SqlDeploymentScriptUsesAzPowerShellVersion14OrHigher() |
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.
Do we need this test when we have the above test that baselines the azPowerShellVersion in the bicep file?
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.
@copilot drop this new test
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.
Dropped the new test in 9b667bb. The existing SqlSupport baseline test already verifies the azPowerShellVersion in the snapshot file.
Co-authored-by: radical <[email protected]>
eerhardt
left a comment
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.
This looks good, but it is still in draft. Is that intentional?
Fixed it. |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| kind: 'AzurePowerShell' | ||
| properties: { | ||
| azPowerShellVersion: '10.0' | ||
| azPowerShellVersion: '14.0' |
Copilot
AI
Dec 4, 2025
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.
[nitpick] The PR description mentions "Also, add a test verifying that AzPowerShellVersion is set to '14.0'" and states that the test should fail if the version is < 14.0 or not set. However, only the snapshot test was updated, and no new explicit test was added.
While the existing snapshot test (RoleAssignmentTests.SqlSupport) will catch changes to the generated Bicep and verify the version is "14.0", consider adding an explicit unit test that directly asserts the AzPowerShellVersion property is set to "14.0" in the AzureSqlServerResource.AddRoleAssignments method. This would make the version requirement more explicit and easier to identify if changed in the future.
For example, you could add a test in AzureSqlExtensionsTests.cs or RoleAssignmentTests.cs that verifies the PowerShell version property directly.
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.
@eerhardt thoughts? ^
Description
Updates
AzPowerShellVersionfrom"10.0"to"14.0"inAzureSqlServerResource.csto address Bicep linter warning:Changes:
AzPowerShellVersionfrom"10.0"to"14.0"(latest supported version)RoleAssignmentTests.SqlSupport.verified.bicepChecklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplateOriginal prompt
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.