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

Skip API review package name approval for management plane packages #7977

Merged
Merged
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
19 changes: 16 additions & 3 deletions eng/common/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ function Submit-APIReview($packageInfo, $packagePath)
}
}

function IsApiviewStatusCheckRequired($packageInfo)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you expect individual languages to override this check?

{
if (($packageInfo.SdkType -eq "client" -or $packageInfo.SdkType -eq "spring") -and $packageInfo.IsNewSdk) {
return $true
}
return $false
}

function ProcessPackage($packageName)
{
Expand Down Expand Up @@ -234,8 +241,14 @@ function ProcessPackage($packageName)
# Check if package name is approved. Preview version cannot be released without package name approval
if (!$pkgNameStatus.IsApproved)
{
Write-Error $($pkgNameStatus.Details)
return 1
if (IsApiviewStatusCheckRequired $pkgInfo)
{
Write-Error $($pkgNameStatus.Details)
return 1
}
else{
Write-Host "Package name is not approved for package $($packageName), however it is not required for this package type so it can still be released without API review approval."
}
}
# Ignore API review status for prerelease version
Write-Host "Package version is not GA. Ignoring API view approval status"
Expand All @@ -245,7 +258,7 @@ function ProcessPackage($packageName)
# Return error code if status code is 201 for new data plane package
# Temporarily enable API review for spring SDK types. Ideally this should be done be using 'IsReviewRequired' method in language side
# to override default check of SDK type client
if (($pkgInfo.SdkType -eq "client" -or $pkgInfo.SdkType -eq "spring") -and $pkgInfo.IsNewSdk)
if (IsApiviewStatusCheckRequired $pkgInfo)
{
if (!$apiStatus.IsApproved)
{
Expand Down
Loading