diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml index 71becd2098ba..de331e5d5f83 100644 --- a/eng/pipelines/templates/jobs/ci.tests.yml +++ b/eng/pipelines/templates/jobs/ci.tests.yml @@ -171,6 +171,7 @@ jobs: /p:EnableSourceLink=false /p:ProjectListOverrideFile=$(ProjectListOverrideFile) /p:EnableOverrideExclusions=true + /p:RemoveTrack1Projects=true $(AdditionalTestArguments) $(DiagnosticArguments) displayName: "Build & Test ($(TestTargetFramework))" diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index 7ba62787a2c5..4b6f2f88e552 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -137,6 +137,9 @@ jobs: /p:ArtifactsPackagesDir=$(Build.ArtifactStagingDirectory) ` /p:ServiceDirectory=* ` /p:ProjectListOverrideFile=$(ProjectListOverrideFile) ` + /p:IncludePerf=false ` + /p:IncludeStress=false ` + /p:EnableOverrideExclusions=true ` $(DiagnosticArguments) displayName: "Build and Package for PR" - ${{ else }}: diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 90e103d599ab..d2e16ff54924 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -148,7 +148,6 @@ function Get-dotnet-AdditionalValidationPackagesFromPackageSet { ) $additionalValidationPackages = @() $uniqueResultSet = @() - function isOther($fileName) { $startsWithPrefixes = @(".config", ".devcontainer", ".github", ".vscode", "common", "doc", "eng", "samples") @@ -162,23 +161,42 @@ function Get-dotnet-AdditionalValidationPackagesFromPackageSet { return $startsWith } - # this section will identify the list of packages that we should treat as - # "directly" changed for a given service level change. While that doesn't - # directly change a package within the service, I do believe we should directly include all - # packages WITHIN that service. This is because the service level file changes are likely to - # have an impact on the packages within that service. + # ensure we observe deleted files too + $targetedFiles = @($diffObj.ChangedFiles + $diffObj.DeletedFiles) + + # The targetedFiles needs to filter out anything in the ExcludePaths + # otherwise it'll end up processing things below that it shouldn't be. + foreach ($excludePath in $diffObj.ExcludePaths) { + $targetedFiles = $targetedFiles | Where-Object { -not $_.StartsWith($excludePath) } + } + + # this section will identify + # - any service-level changes + # - any shared package changes that should be treated as a service-level change. EG changes to Azure.Storage.Shared. + # and add all packages within that service to the validation set. these will be treated as "directly" changed packages. $changedServices = @() - if ($diffObj.ChangedFiles) { - foreach($file in $diffObj.ChangedFiles) { + if ($targetedFiles) { + foreach($file in $targetedFiles) { $pathComponents = $file -split "/" - # handle changes only in sdk/// + # handle changes only in sdk//. if ($pathComponents.Length -eq 3 -and $pathComponents[0] -eq "sdk") { - $changedServices += $pathComponents[1] + if (-not $changedServices.Contains($pathComponents[1])) { + $changedServices += $pathComponents[1] + } } # handle any changes under sdk/. if ($pathComponents.Length -eq 2 -and $pathComponents[0] -eq "sdk") { - $changedServices += "template" + if (-not $changedServices.Contains("template")) { + $changedServices += "template" + } + } + + # changes to a Azure.*.Shared within a service directory should include all packages within that service directory + if ($file.Replace('\', '/') -match ".*sdk/.*/.*\.Shared/.*") { + if (-not $changedServices.Contains($pathComponents[1])) { + $changedServices += $pathComponents[1] + } } } foreach ($changedService in $changedServices) { @@ -195,9 +213,10 @@ function Get-dotnet-AdditionalValidationPackagesFromPackageSet { } } + # handle any changes to files that are not within a package directory $othersChanged = @() - if ($diffObj.ChangedFiles) { - $othersChanged = $diffObj.ChangedFiles | Where-Object { isOther($_) } + if ($targetedFiles) { + $othersChanged = $targetedFiles | Where-Object { isOther($_) } } if ($othersChanged) { @@ -208,6 +227,8 @@ function Get-dotnet-AdditionalValidationPackagesFromPackageSet { $additionalValidationPackages += $additionalPackages } + # walk the packages added purely for validation, if they haven't been added yet, add them + # these packages aren't considered "directly" changed, so we will set IncludedForValidation to true for them foreach ($pkg in $additionalValidationPackages) { if ($uniqueResultSet -notcontains $pkg -and $LocatedPackages -notcontains $pkg) { $pkg.IncludedForValidation = $true diff --git a/eng/service.proj b/eng/service.proj index 0d266722157b..a99888cb2cbb 100644 --- a/eng/service.proj +++ b/eng/service.proj @@ -61,10 +61,13 @@ - + + + +