From 8f12d3454d20e9e1cf8da78545ece50bc049adec Mon Sep 17 00:00:00 2001 From: Praveen Kuttappan Date: Fri, 29 Mar 2024 10:35:22 -0400 Subject: [PATCH 1/4] Skip API review package name approval for management plane packages --- eng/common/scripts/Create-APIReview.ps1 | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index cdf4671802..f185580a31 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -153,6 +153,14 @@ function Submit-APIReview($packageInfo, $packagePath) } } +function IsApiviewStatusCheckRequired($packageInfo) +{ + # This function can be modified to control this check by individual language function + if (($packageInfo.SdkType -eq "client" -or $packageInfo.SdkType -eq "spring") -and $packageInfo.IsNewSdk) { + return $true + } + return $false +} function ProcessPackage($packageName) { @@ -234,8 +242,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" @@ -245,7 +259,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) { From e59c2b68aacb679660e599aa3f5f98129fb57169 Mon Sep 17 00:00:00 2001 From: Praveen Kuttappan Date: Fri, 29 Mar 2024 10:40:49 -0400 Subject: [PATCH 2/4] Remove the comment on function --- eng/common/scripts/Create-APIReview.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index f185580a31..f2ee285a34 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -155,7 +155,6 @@ function Submit-APIReview($packageInfo, $packagePath) function IsApiviewStatusCheckRequired($packageInfo) { - # This function can be modified to control this check by individual language function if (($packageInfo.SdkType -eq "client" -or $packageInfo.SdkType -eq "spring") -and $packageInfo.IsNewSdk) { return $true } From d2346a3e7fd7464ff2c5df13c1ab1d7ee5c48b17 Mon Sep 17 00:00:00 2001 From: Praven Kuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:45:03 -0400 Subject: [PATCH 3/4] Update eng/common/scripts/Create-APIReview.ps1 Co-authored-by: Wes Haggard --- eng/common/scripts/Create-APIReview.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index f2ee285a34..0c03071691 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -241,7 +241,7 @@ function ProcessPackage($packageName) # Check if package name is approved. Preview version cannot be released without package name approval if (!$pkgNameStatus.IsApproved) { - if (IsApiviewStatusCheckRequired($pkgInfo)) + if (IsApiviewStatusCheckRequired $pkgInfo) { Write-Error $($pkgNameStatus.Details) return 1 From 061b534dab646bcc90af3f2512672c00e93e5516 Mon Sep 17 00:00:00 2001 From: Praven Kuttappan <55455725+praveenkuttappan@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:45:15 -0400 Subject: [PATCH 4/4] Update eng/common/scripts/Create-APIReview.ps1 Co-authored-by: Wes Haggard --- eng/common/scripts/Create-APIReview.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/scripts/Create-APIReview.ps1 b/eng/common/scripts/Create-APIReview.ps1 index 0c03071691..246a87be6f 100644 --- a/eng/common/scripts/Create-APIReview.ps1 +++ b/eng/common/scripts/Create-APIReview.ps1 @@ -258,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 (IsApiviewStatusCheckRequired($pkgInfo)) + if (IsApiviewStatusCheckRequired $pkgInfo) { if (!$apiStatus.IsApproved) {