Skip to content
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

Sync eng/common directory with azure-sdk-tools for PR 9428 #38699

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 0 additions & 101 deletions eng/common/scripts/Cadl-Project-Generate.ps1

This file was deleted.

127 changes: 0 additions & 127 deletions eng/common/scripts/Cadl-Project-Sync.ps1

This file was deleted.

53 changes: 31 additions & 22 deletions eng/scripts/Language-Settings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,43 @@ function Get-python-AdditionalValidationPackagesFromPackageSet {
# packages WITHIN that service. This is because the service level file changes are likely to
# have an impact on the packages within that service.
$changedServices = @()
foreach($file in $diffObj.ChangedFiles) {
$pathComponents = $file -split "/"
# handle changes only in sdk/<service>/<file>/<extension>
if ($pathComponents.Length -eq 3 -and $pathComponents[0] -eq "sdk") {
$changedServices += $pathComponents[1]
}
if ($diffObj.ChangedFiles) {
foreach($file in $diffObj.ChangedFiles) {
$pathComponents = $file -split "/"
# handle changes only in sdk/<service>/<file>/<extension>
if ($pathComponents.Length -eq 3 -and $pathComponents[0] -eq "sdk") {
$changedServices += $pathComponents[1]
}

# handle any changes under sdk/<file>.<extension>
if ($pathComponents.Length -eq 2 -and $pathComponents[0] -eq "sdk") {
$changedServices += "template"
# handle any changes under sdk/<file>.<extension>
if ($pathComponents.Length -eq 2 -and $pathComponents[0] -eq "sdk") {
$changedServices += "template"
}
}
}
foreach ($changedService in $changedServices) {
$additionalPackages = $AllPkgProps | Where-Object { $_.ServiceDirectory -eq $changedService }

foreach ($pkg in $additionalPackages) {
if ($uniqueResultSet -notcontains $pkg -and $LocatedPackages -notcontains $pkg) {
# notice the lack of setting IncludedForValidation to true. This is because these "changed services"
# are specifically where a file within the service, but not an individual package within that service has changed.
# we want this package to be fully validated
$uniqueResultSet += $pkg
foreach ($changedService in $changedServices) {
$additionalPackages = $AllPkgProps | Where-Object { $_.ServiceDirectory -eq $changedService }

foreach ($pkg in $additionalPackages) {
if ($uniqueResultSet -notcontains $pkg -and $LocatedPackages -notcontains $pkg) {
# notice the lack of setting IncludedForValidation to true. This is because these "changed services"
# are specifically where a file within the service, but not an individual package within that service has changed.
# we want this package to be fully validated
$uniqueResultSet += $pkg
}
}
}
}

$toolChanged = $diffObj.ChangedFiles | Where-Object { $_.StartsWith("tool")}
$engChanged = $diffObj.ChangedFiles | Where-Object { $_.StartsWith("eng")}
$othersChanged = $diffObj.ChangedFiles | Where-Object { isOther($_) }
$toolChanged = @()
$othersChanged = @()
$engChanged = @()

if ($diffObj.ChangedFiles) {
$toolChanged = $diffObj.ChangedFiles | Where-Object { $_.StartsWith("tool")}
$engChanged = $diffObj.ChangedFiles | Where-Object { $_.StartsWith("eng")}
$othersChanged = $diffObj.ChangedFiles | Where-Object { isOther($_) }
}

$changedServices = $changedServices | Get-Unique

if ($toolChanged) {
Expand Down
Loading