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

Added more logging to API view create #1448

Merged
4 commits merged into from
Mar 5, 2021
Merged
Changes from 2 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
22 changes: 13 additions & 9 deletions eng/common/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ function Submit-APIReview($packagename, $filePath, $uri, $apiKey, $apiLabel)
try
{
$Response = Invoke-WebRequest -Method 'POST' -Uri $uri -Body $multipartContent -Headers $headers
Write-Host "API Review: $($Response)"
Write-Host "API Review URL: $($Response)"
$StatusCode = $Response.StatusCode
}
catch
{
Write-Error "Exception details: $($_.Exception.Response)"
praveenkuttappan marked this conversation as resolved.
Show resolved Hide resolved
$StatusCode = $_.Exception.Response.StatusCode
}

Expand Down Expand Up @@ -101,6 +102,9 @@ foreach ($pkgName in $responses.Keys)
{
$pkgInfo = Get-Content $pkgPropPath | ConvertFrom-Json
$version = [AzureEngSemanticVersion]::ParseVersionString($pkgInfo.Version)
Write-Host "Package name: $($PackageName)"
Write-Host "Version: $($version)"
Write-Host "SDK Type: $($pkgInfo.SdkType)"
if ($version.IsPrerelease)
{
Write-Host "Package version is not GA. Ignoring API view approval status"
Expand All @@ -110,12 +114,17 @@ foreach ($pkgName in $responses.Keys)
$FoundFailure = $True
if ($respCode -eq '201')
{
Write-Error "Automatic API Review approval is pending for package $($PackageName)"
Write-Host "Package version $($version) is GA and automatic API Review is not yet approved for package $($PackageName)."
Write-Host "Build and release is not allowed for GA package without API review approval."
Write-Host "Please send email to adparchrescue@microsoft.com and share above link to API review for emergency approval to release you package."
praveenkuttappan marked this conversation as resolved.
Show resolved Hide resolved
Write-Host "You will need to queue another build to proceed further after API review is approved"
Write-Host "You can check http://aka.ms/azsdk/engsys/apireview/faq for more details."
}
else
{
Write-Error "Failed to create API Review for package $($PackageName)"
}
Write-Error "Failed to create API Review for package $($PackageName). Please reach out to Azure SDK engineering systems on teams channel and share this build details."
}
exit 1
}
else
{
Expand All @@ -124,8 +133,3 @@ foreach ($pkgName in $responses.Keys)
}
}
}
if ($FoundFailure)
{
Write-Error "Automatic API review is not yet approved for package $($PackageName)"
exit 1
}