Skip to content

Commit d4f8e03

Browse files
authored
Merge branch 'microsoft:master' into master
2 parents d62f7f4 + 29aa2bb commit d4f8e03

File tree

11 files changed

+543
-457
lines changed

11 files changed

+543
-457
lines changed

samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/ClientApp/package-lock.json

Lines changed: 322 additions & 447 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/demos/azure-sql-edge-demos/Wind Turbine Demo/webappsrc/SqlDbEdgeDemoWeb/SqlDbEdgeDemo.Web/ClientApp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"node-sass": "^7.0.3",
6+
"node-sass": "^9.0.0",
77
"normalize.css": "^8.0.1",
88
"react": "^16.11.0",
99
"react-dom": "^16.11.0",

samples/features/reporting-services/ssrs-migration-rss/ssrs_migration.rss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,10 @@ End Sub
934934

935935
'Helper function to link snk reference with relative paths
936936
Function GetSnkPathRef(srcPath As String) As String
937-
Dim snkPath = srcPath.Remove(0, srcSiteUrl.LastIndexOf("/"))
937+
Dim snkPath = srcPath
938+
If srcSiteUrl isNot Nothing
939+
snkPath = srcPath.Remove(0, srcSiteUrl.LastIndexOf("/"))
940+
End If
938941
Return snkPath
939942
End Function
940943

samples/features/security/always-encrypted-with-secure-enclaves/source/ContosoHR/ContosoHR.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
</PackageReference>
3232
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.3.0" />
3333
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
34-
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.10" />
34+
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.0" />
3535
</ItemGroup>
3636

3737
</Project>

samples/features/security/always-encrypted-with-secure-enclaves/src/ContosoClinic/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="jQuery.Validation" version="1.19.4" targetFramework="net472" />
88
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net472" />
99
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net472" />
10-
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net472" />
10+
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.4" targetFramework="net472" />
1111
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net472" />
1212
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net472" />
1313
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net472" />

samples/features/security/contoso-clinic/src/ContosoClinic/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="jQuery.Validation" version="1.19.4" targetFramework="net461" />
88
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net461" />
99
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net461" />
10-
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net461" />
10+
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.4" targetFramework="net461" />
1111
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net461" />
1212
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net461" />
1313
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />

samples/features/security/ledger/source/ContosoHR/ContosoHR.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</PackageReference>
6262
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.2.9" />
6363
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
64-
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.2.9" />
64+
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.3.0" />
6565
</ItemGroup>
6666

6767
</Project>

samples/manage/azure-arc-enabled-sql-server/modify-license-type/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services: Azure Arc-enabled SQL Server
33
platforms: Azure
44
author: anosov1960
55
ms.author: sashan
6-
ms.date: 7/5/2023
6+
ms.date: 9/22/2023
77
---
88

99

@@ -16,7 +16,7 @@ If not specified, all subscriptions your role has access to are scanned.
1616

1717
# Prerequisites
1818

19-
- You must have at least a *Contributor* role in each subscription you modify.
19+
- You must have at least a *Azure Connected Machine Resource Administrator* role in each subscription you modify.
2020
- The Azure extension for SQL Server is updated to version 1.1.2230.58 or newer.
2121
- You must be connected to Azure AD and logged in to your Azure account. If your account have access to multiple tenants, make sure to log in with a specific tenant ID.
2222

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
<#
2+
.SYNOPSIS
3+
.
4+
.DESCRIPTION
5+
.
6+
.Parameter MachineName
7+
The name of the Arc Sql Server-enabled machine on which to update extension settings.
8+
.Parameter resourceGroup
9+
The Azure resource group hosting the machine.
10+
.PARAMETER Subscription
11+
The Azure subscription for the machine.
12+
.PARAMETER FeatureFlagsToEnable
13+
Optional. Array of the names of feature flags to be enabled in the extension's settings.
14+
Unknown feature flags will generate a warning, and may generate a prompt to continue
15+
(unless the Force flag is provided).
16+
.PARAMETER FeatureFlagsToDisable
17+
Optional. Array of the names of feature flags to be disabled in the extension's settings.
18+
Unknown feature flags will generate a warning, and may generate a prompt to continue
19+
(unless the Force flag is provided).
20+
.PARAMETER Force
21+
Optional. Provide the Force flag to update the settings even if unrecognized feature flags
22+
are provided.
23+
.PARAMETER DryRun
24+
Optional. Provide the DryRun flag to retrieve current settings and modify them, but do not
25+
send the modified settings to the extension. DryRun can be used to verify changes before
26+
executing them.
27+
.EXAMPLE
28+
To enable the SqlManagement and AG discovery features in your subscription
29+
in resource group contoso-rg for machine contoso-sql-host, the command would be:
30+
set-feature-flags.ps1 `
31+
-Subscription "<Your-subscription-ID>" `
32+
-ResourceGroup "contoso-rg" `
33+
-MachineName "contoso-sql-host" `
34+
-FeatureFlagsToEnable ("SqlManagement")
35+
36+
.NOTES
37+
Author: Sarah Feitler
38+
Date: September 2023
39+
#>
40+
param(
41+
[Parameter (Mandatory = $true)]
42+
[string] $Subscription,
43+
[Parameter (Mandatory = $true)]
44+
[string] $ResourceGroup,
45+
[Parameter (Mandatory = $true)]
46+
[string] $MachineName,
47+
[Parameter (Mandatory = $false)]
48+
[string[]] $FeatureFlagsToEnable,
49+
[Parameter (Mandatory = $false)]
50+
[string[]] $FeatureFlagsToDisable,
51+
[Parameter (Mandatory = $false)]
52+
[switch] $Force,
53+
[Parameter (Mandatory = $false)]
54+
[switch] $DryRun
55+
)
56+
57+
# This list comes from the Azure Sql Server Extension project, and may not be up-to-date.
58+
$knownFeatureFlags = "AvailabilityGroupDiscovery", "SqlManagement", "SqlFailoverClusterInstanceDiscovery"
59+
60+
$mysteryFlagsList = New-Object System.Collections.ArrayList
61+
62+
if ($FeatureFlagsToEnable -ne $null)
63+
{
64+
$FeatureFlagsToEnable = $FeatureFlagsToEnable | Get-Unique
65+
# using output as a throwaway to control console output
66+
$output = $FeatureFlagsToEnable | Where-Object {
67+
if ( $_ -notin $knownFeatureFlags )
68+
{
69+
$mysteryFlagsList.Add("$_ ")
70+
$true
71+
}
72+
else
73+
{
74+
$false
75+
}
76+
}
77+
}
78+
if ($FeatureFlagsToDisable -ne $null)
79+
{
80+
$FeatureFlagsToDisable = $FeatureFlagsToDisable | Get-Unique
81+
# using output as a throwaway to control console output
82+
$output = $FeatureFlagsToDisable | Where-Object {
83+
if ( $_ -notin $knownFeatureFlags )
84+
{
85+
$mysteryFlagsList.Add("$_ ")
86+
$true
87+
}
88+
else
89+
{
90+
$false
91+
}
92+
}
93+
}
94+
95+
if ($mysteryFlagsList.Count -gt 0)
96+
{
97+
Write-Host ("Warning, the following flags were not found in known list of feature flags: $mysteryFlagsList")
98+
if ($Force -eq $false) {
99+
$confirmation = Read-Host "Do you want to continue executing the script? (Y/N)"
100+
# Check the user's response
101+
if ($confirmation -eq "Y" -or $confirmation -eq "y") {
102+
# User wants to continue, script execution continues
103+
Write-Host "Continuing..."
104+
} else {
105+
# User chose not to continue, so exit the script
106+
Write-Host "Exiting"
107+
exit 1
108+
}
109+
}
110+
}
111+
112+
$connectedMachineExtension = az extension list | where-object {$_ -like "*connectedmachine*"}
113+
if($connectedMachineExtension.Count -eq 0){
114+
Write-Output "connectedmachine extension is not installed. Please run the following command to install it before running this script."
115+
Write-Output "az extension add -n connectedmachine"
116+
Exit 1
117+
}
118+
119+
# Retrieve current settings and convert to a powershell object
120+
$jsonData = az connectedmachine extension show --name "WindowsAgent.SqlServer" --machine-name $machineName --resource-group $ResourceGroup --subscription $Subscription | Join-String
121+
122+
if (! $?)
123+
{
124+
Write-Host
125+
Write-Host "Error on extension show. Exiting."
126+
exit 1
127+
}
128+
129+
try {
130+
$object = $jsonData | ConvertFrom-Json
131+
}
132+
catch {
133+
Write-Output "Failed to retrieve valid json. This may be caused because the connectedmachine extension was not properly installed prior to running the script. Please run the script again."
134+
Exit 1
135+
}
136+
137+
if($null -eq $object.properties.settings.FeatureFlags)
138+
{
139+
# create new featureFlags array if it does not exist.
140+
$object.properties.settings | Add-Member -Name "FeatureFlags" -Value @() -MemberType NoteProperty
141+
}
142+
143+
# Check if FeatureFlagsToEnable or FeatureFlagsToDisable arrays are specified
144+
if ($FeatureFlagsToEnable -ne $null -or $FeatureFlagsToDisable -ne $null) {
145+
$foundFeatureFlags = $object.properties.settings.FeatureFlags.Name
146+
147+
if ($FeatureFlagsToEnable -ne $null) {
148+
foreach ($flagToEnable in $FeatureFlagsToEnable) {
149+
if ($flagToEnable -in $foundFeatureFlags) {
150+
# Update the Enable property for the flag
151+
$object.properties.settings.FeatureFlags | Where-Object { $_.Name -eq $flagToEnable } | ForEach-Object { $_.Enable = $true }
152+
} else {
153+
# Create a new entry for the flag
154+
$newFlag = @{
155+
Enable = $true
156+
Name = $flagToEnable
157+
}
158+
$object.properties.settings.FeatureFlags += $newFlag
159+
}
160+
}
161+
}
162+
163+
if ($FeatureFlagsToDisable -ne $null) {
164+
foreach ($flagToDisable in $FeatureFlagsToDisable) {
165+
if ($flagToDisable -in $foundFeatureFlags) {
166+
# Update the Enable property for the flag
167+
$object.properties.settings.FeatureFlags | Where-Object { $_.Name -eq $flagToDisable } | ForEach-Object { $_.Enable = $false }
168+
} else {
169+
# Create a new entry for the flag
170+
$newFlag = @{
171+
Enable = $false
172+
Name = $flagToDisable
173+
}
174+
$object.properties.settings.FeatureFlags += $newFlag
175+
}
176+
}
177+
}
178+
}else{
179+
Write-Output "No feature flags were enabled or disabled."
180+
Exit
181+
}
182+
183+
# Convert the settings section of the modified object back to JSON
184+
$currentSettings = $object.properties.settings
185+
$updatedJsonData = $currentSettings | ConvertTo-Json -Depth 10
186+
187+
Write-Host "Updated settings: $updatedJsonData"
188+
Set-Content -Path .\patchedJson.json -Value $updatedJsonData
189+
190+
if ( $DryRun -eq $False )
191+
{
192+
write-host "This may take up to 5 minutes to complete. Please wait."
193+
az connectedmachine extension update `
194+
--name "WindowsAgent.SqlServer" `
195+
--type "WindowsAgent.SqlServer" `
196+
--publisher "Microsoft.AzureData" `
197+
--settings patchedJson.json `
198+
--machine-name $machineName `
199+
--resource-group $resourceGroup `
200+
--subscription $subscription
201+
Write-Host "Updated settings in extension"
202+
}
203+
else
204+
{
205+
Write-Host "DryRun run done. Updated settings can be viewed in the file $pwd\patchedjson.json"
206+
}

samples/manage/azure-sql-db-elastic-pools-custom-dashboard/Contoso ShopKeeper/MonitoringWebApp/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="1.2.3" targetFramework="net461" />
1717
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net461" />
1818
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net461" />
19-
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net461" />
19+
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.4" targetFramework="net461" />
2020
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net461" />
2121
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net461" />
2222
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net461" />

0 commit comments

Comments
 (0)