diff --git a/tools/BuildPackagesTask/Microsoft.Azure.Build.Tasks/CIFilterTask.cs b/tools/BuildPackagesTask/Microsoft.Azure.Build.Tasks/CIFilterTask.cs index 295f1d47e2e5..da36188921ed 100644 --- a/tools/BuildPackagesTask/Microsoft.Azure.Build.Tasks/CIFilterTask.cs +++ b/tools/BuildPackagesTask/Microsoft.Azure.Build.Tasks/CIFilterTask.cs @@ -193,10 +193,6 @@ private bool ProcessTargetModule(Dictionary csprojMap) [BUILD_PHASE] = new HashSet(GetBuildCsprojList(TargetModule, csprojMap).ToList()), [TEST_PHASE] = new HashSet(GetTestCsprojList(TargetModule, csprojMap).ToList()) }; - foreach (var analysisPhase in ANALYSIS_PHASE_LIST) - { - influencedModuleInfo.Add(analysisPhase, new HashSet(GetDependenceModuleList(TargetModule, csprojMap).ToList())); - } Console.WriteLine("----------------- InfluencedModuleInfo TargetModule -----------------"); foreach (string phaseName in influencedModuleInfo.Keys) diff --git a/tools/StaticAnalysis/Exceptions/Az.CloudService/BreakingChangeIssues.csv b/tools/StaticAnalysis/Exceptions/Az.CloudService/BreakingChangeIssues.csv new file mode 100644 index 000000000000..29ce565a3d09 --- /dev/null +++ b/tools/StaticAnalysis/Exceptions/Az.CloudService/BreakingChangeIssues.csv @@ -0,0 +1,17 @@ +"Module","ClassName","Target","Severity","ProblemId","Description","Remediation" +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'ProtectionMode' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.IDdosSettings' has been removed.","Add the property 'ProtectionMode' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.IDdosSettings'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'DdosProtectionPlanId' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.IDdosSettings' has been removed.","Add the property 'DdosProtectionPlanId' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.IDdosSettings'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'InboundNatRulesPortMapping' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.ILoadBalancerBackendAddress' has been removed.","Add the property 'InboundNatRulesPortMapping' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.ILoadBalancerBackendAddress'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'AdminState' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.ILoadBalancerBackendAddress' has been removed.","Add the property 'AdminState' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.ILoadBalancerBackendAddress'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'InboundNatRule' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.IBackendAddressPool' has been removed.","Add the property 'InboundNatRule' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.IBackendAddressPool'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'DrainPeriodInSecond' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.IBackendAddressPool' has been removed.","Add the property 'DrainPeriodInSecond' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.IBackendAddressPool'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'FlushConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.ISubnet' has been removed.","Add the property 'FlushConnection' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.ISubnet'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'AuxiliaryMode' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface' has been removed.","Add the property 'AuxiliaryMode' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'VnetEncryptionSupported' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface' has been removed.","Add the property 'VnetEncryptionSupported' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'DisableTcpStateTracking' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface' has been removed.","Add the property 'DisableTcpStateTracking' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'FlushConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface' has been removed.","Add the property 'FlushConnection' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'FlushConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.ISubnet' has been removed.","Add the property 'FlushConnection' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.ISubnet'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'AuxiliaryMode' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface' has been removed.","Add the property 'AuxiliaryMode' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'VnetEncryptionSupported' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface' has been removed.","Add the property 'VnetEncryptionSupported' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'DisableTcpStateTracking' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface' has been removed.","Add the property 'DisableTcpStateTracking' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface'." +"Az.CloudService","Get-AzCloudServiceNetworkInterface","Get-AzCloudServiceNetworkInterface","0","3010","The property 'FlushConnection' of type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface' has been removed.","Add the property 'FlushConnection' back to type 'Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20220701.INetworkInterface'." diff --git a/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 b/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 index 6bfcaf6ee7d6..2b253622cf2c 100644 --- a/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 +++ b/tools/StaticAnalysis/GeneratedSdkAnalyzer/SDKGeneratedCodeVerify.ps1 @@ -29,22 +29,6 @@ Class GeneratedSdkIssue { $ExceptionList = @() $SavePath = $PWD -$skipModules = @( - 'Az.AlertsManagement', - 'Az.Automation', - 'Az.CognitiveServices', - 'Az.CosmosDB', - 'Az.KeyVault', - 'Az.NetAppFiles', - 'Az.RecoveryServices', - 'Az.RedisCache', - 'Az.Storage', - 'Az.Search', - 'Az.Security', - 'Az.Sql', - 'Az.TrafficManager' -) - $MissReadMe = 9000 $GenSdkChanged = 9090 try { @@ -69,12 +53,6 @@ try { # Extract Module Name $ModuleName = "Az." + ($_ -split "\/|\\")[1] - # Skip check for modules listed in $skipModules - if ($skipModules.Contains($ModuleName)) { - Write-Host "Skip checking $ModuleName" - continue - } - # Skip check for modules without README.md and .Sdk folder. if (-not(Test-Path -Path "$PSScriptRoot/../../../$_/README.md" -PathType Leaf) -and -not(Test-Path -Path $PSScriptRoot/../../../$_)) { @@ -88,8 +66,19 @@ try { # Regenerate the Sdk under Generated folder if( Test-Path -Path "README.md" -PathType Leaf){ - Write-Host "Re-generating SDK under Generated folder for $ModuleName..." - npx autorest --use:@microsoft.azure/autorest.csharp@2.3.90 + # Decide to use autorest powershell v4/ autorest csharp v3. + $readMeContent = Get-Content README.md + if ([regex]::Matches($readMeContent, '\s*powershell\s*:\s*true\s*') -and [regex]::Matches($readMeContent, '\s*isSdkGenerator\s*:\s*true\s*')) + { + Write-Host "Using autorest powershell v4:`nRe-generating SDK under Generated folder for $ModuleName..." + npx autorest --use:@autorest/powershell@4.x + } + else + { + Write-Host "Using autorest csharp v3:`nRe-generating SDK under Generated folder for $ModuleName..." + npx autorest --use:@microsoft.azure/autorest.csharp@2.3.90 + } + If (($LASTEXITCODE -ne 0) -and ($LASTEXITCODE -ne $null)) { $ExceptionList += [GeneratedSdkIssue]@{ @@ -101,7 +90,7 @@ try { Remediation = "" } } - npx autorest README.md --version=v2 + If (($LASTEXITCODE -ne 0) -and ($LASTEXITCODE -ne $null)) { $ExceptionList += [GeneratedSdkIssue]@{