-
Notifications
You must be signed in to change notification settings - Fork 229
Add automation to report on non-released SDKs #13333
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d2cfc09
Add automation to report on non-released SDKs
smw-ms 9136a2a
Respond to copilot comments
smw-ms 39956f7
Merge branch 'main' of https://github.com/smw-ms/azure-sdk-tools into…
smw-ms 94730e8
Move to release plan tool
smw-ms c6d5ee5
fix release plan tests
smw-ms 6d09241
Resolve conflicts
smw-ms 42f3ca1
Update Changelog
smw-ms 3d45eea
Update Email Template
smw-ms 4b8c814
Resolve conflicts
smw-ms 39fddfc
Remove trailing whitespace
smw-ms 5d9145a
Fix merge conflicts
smw-ms cecc4e6
Merge branch 'main' of https://github.com/smw-ms/azure-sdk-tools into…
smw-ms 37fc869
Use ReleasePlanWorkItem instead of ReleasePlanDetails
smw-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| trigger: none | ||
| pr: none | ||
|
|
||
| pool: | ||
| name: azsdk-pool | ||
| demands: ImageOverride -equals ubuntu-24.04 | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| jobs: | ||
| - job: ReportUnreleasedSdks | ||
| steps: | ||
| - checkout: self | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: 'Install Azure SDK MCP' | ||
smw-ms marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| inputs: | ||
| targetType: 'inline' | ||
| script: './eng/common/mcp/azure-sdk-mcp.ps1 -InstallDirectory $(System.DefaultWorkingDirectory)' | ||
| pwsh: true | ||
| workingDirectory: '$(System.DefaultWorkingDirectory)' | ||
|
|
||
| - task: AzureCLI@2 | ||
| displayName: Email product owners about overdue SDK release plans | ||
| inputs: | ||
| azureSubscription: opensource-api-connection | ||
| scriptType: pscore | ||
| scriptPath: eng/scripts/Report-Unreleased-Sdks.ps1 | ||
| arguments: > | ||
| -AzureSDKEmailUri "$(AzureSDKEmailerSasURL)" | ||
| -AzsdkExePath "$(System.DefaultWorkingDirectory)/azsdk" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,102 @@ | ||
| <# | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| .SYNOPSIS | ||
| Automates email notifications to Azure SDK release plan owners when Tier 1 SDK coverage is missing. | ||
|
|
||
| .DESCRIPTION | ||
| This script checks overdue Azure SDK release plans for missing Tier 1 languages. For any gaps, it builds an HTML email and sends it to the plan owner with steps to fix the issue (generate SDKs or request an exception). | ||
|
|
||
| .PARAMETER AzureSDKEmailUri | ||
| The Uri of the app used to send email notifications | ||
|
|
||
| .PARAMETER AzsdkExePath | ||
| Path to the Azure SDK CLI executable (azsdk). | ||
| #> | ||
| param ( | ||
| [Parameter(Mandatory = $true)] | ||
| [string] $AzureSDKEmailUri, | ||
|
|
||
| [Parameter(Mandatory = $true)] | ||
| [string] $AzsdkExePath | ||
| ) | ||
|
|
||
| Set-StrictMode -Version 3 | ||
|
|
||
| $AZURE_SDK_APEX_EMAIL = "[email protected]" | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| $SUBJECT = "Action Required: Missing Tier 1 language in your Azure SDK Release Plan" | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| function BuildEmailNotification($releaseOwnerName, $plane, $missingSDKs, $releasePlanLink) { | ||
| $body = @" | ||
| <html> | ||
| <body> | ||
| <p>Hello $releaseOwnerName,</p> | ||
| <p>Our automation has flagged your Azure SDK release plan as missing one or more Tier 1 SDKs for the following plane:</p> | ||
| <ul> | ||
| <li><strong>Plane:</strong> $plane</li> | ||
| <li><strong>Missing SDKs:</strong> $missingSDKs</li> | ||
| <li><strong>Release Plan Link:</strong> <a href=$releasePlanLink>$releasePlanLink</a></li> | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </ul> | ||
| <p>Per Azure SDK release requirements, all Tier 1 languages must be supported unless an approved exclusion is filed. Please take one of the following actions:</p> | ||
| <ol> | ||
| <li>Generate and release the missing SDKs using <a href='https://aka.ms/azsdk/dpcodegen'>https://aka.ms/azsdk/dpcodegen</a></li> | ||
| <li>File for an exclusion: <a href='https://eng.ms/docs/products/azure-developer-experience/onboard/request-exception'>https://eng.ms/docs/products/azure-developer-experience/onboard/request-exception</a></li> | ||
| </ol> | ||
| <p>Thank you for helping maintain language parity across Azure SDKs.</p> | ||
| <p>Best regards,<br/>Azure SDK PM Team</p> | ||
| </body> | ||
| </html> | ||
| "@ | ||
| return $body | ||
| } | ||
|
|
||
| if (-not (Test-Path $AzsdkExePath)) { | ||
| throw "Azure SDK CLI executable not found at: $AzsdkExePath" | ||
| } | ||
|
|
||
| $jsonOutput = & $AzsdkExePath release-plan list-overdue --output json | ||
| $releasePlansData = $jsonOutput | ConvertFrom-Json | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| $releasePlans = $releasePlansData.release_plans | ||
|
|
||
| if (-not $releasePlans) { | ||
| throw "Unexpected JSON structure. Expected 'release_plans' property." | ||
| } | ||
|
|
||
|
|
||
| foreach ($releasePlan in $releasePlans) { | ||
| $releaseOwnerEmail = $releasePlan.ReleasePlanSubmittedByEmail | ||
|
|
||
| try { | ||
| # Throws on invalid emails | ||
| [void][System.Net.Mail.MailAddress]::new($releaseOwnerEmail) | ||
| } | ||
| catch { | ||
| Write-Host ("Skipped notification for Release Plan ID {0}: invalid email '{1}'" -f $releasePlan.id, $releaseOwnerEmail) | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| continue | ||
| } | ||
|
|
||
| $releaseOwnerName = $releasePlan.Owner | ||
| $plane = $releasePlan.IsManagementPlane ? "Management Plane" : "Data Plane" | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| $releasePlanLink = $releasePlan.ReleasePlanLink | ||
|
|
||
| # Start with all Tier 1 languages | ||
| $missingSDKs = @('.NET', 'JavaScript', 'Python', 'Java', 'Go') | ||
|
|
||
| # Skip Go for Data Plane release plans | ||
| if ($releasePlan.IsDataPlane) { | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| $missingSDKs = $missingSDKs | Where-Object { $_ -ine 'Go' } | ||
| } | ||
|
|
||
| foreach ($info in $releasePlan.SDKInfo) { | ||
| $statusNorm = $info.ReleaseStatus.ToLower() | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Remove language from missing list if it's released | ||
| $isReleased = ($statusNorm -eq 'released') | ||
| if ($isReleased) { | ||
| $missingSDKs = $missingSDKs | Where-Object { $_ -ine $info.Language } | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| } | ||
|
|
||
| $missingSDKsString = ($missingSDKs -join ', ') | ||
| $body = BuildEmailNotification -releaseOwnerName $releaseOwnerName -plane $plane -missingSDKs $missingSDKsString -releasePlanLink $releasePlanLink | ||
|
|
||
| & (Join-Path $PSScriptRoot "Send-Email-Notification.ps1") -AzureSDKEmailUri $AzureSDKEmailUri -To $releaseOwnerEmail -CC $AZURE_SDK_APEX_EMAIL -Subject $SUBJECT -Body $body | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| <# | ||
| .SYNOPSIS | ||
| Sends an email notification using a specified Azure SDK email service endpoint. | ||
|
|
||
| .DESCRIPTION | ||
| This script posts an email payload to the Azure SDK email service via a REST API call. | ||
| It accepts recipient details, subject, and body content, converts them to JSON, and sends | ||
| the request to the provided URI. | ||
|
|
||
| .PARAMETER AzureSDKEmailUri | ||
| The Uri of the app used to send email notifications | ||
|
|
||
| .PARAMETER To | ||
| The primary recipient email address(es). | ||
|
|
||
| .PARAMETER Cc | ||
| Optional CC recipient email address(es). | ||
|
|
||
| .PARAMETER Subject | ||
| The subject line of the email. | ||
|
|
||
| .PARAMETER Body | ||
| The HTML or plain text body of the email message. | ||
| #> | ||
| param ( | ||
| [Parameter(Mandatory = $true)] | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| [string] $AzureSDKEmailUri, | ||
|
|
||
| [Parameter(Mandatory = $true)] | ||
| [string] $To, | ||
|
|
||
| [Parameter(Mandatory = $false)] | ||
| [string] $CC, | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| [Parameter(Mandatory = $true)] | ||
| [string] $Subject, | ||
|
|
||
| [Parameter(Mandatory = $true)] | ||
| [string] $Body | ||
| ) | ||
|
|
||
| Set-StrictMode -Version 3 | ||
|
|
||
| try { | ||
| $requestBody = @{ EmailTo = $To; CC = $CC; Subject = $Subject; Body = $Body} | ConvertTo-Json -Depth 3 | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| Write-Host "Sending Email - To: $To`nCC: $CC`nSubject: $Subject`nBody: $Body" | ||
| $response = Invoke-RestMethod -Uri $AzureSDKEmailUri -Method Post -Body $requestBody -ContentType "application/json" | ||
| Write-Host "Successfully Sent Email - To: $To`nCC: $CC`nSubject: $Subject`nBody: $Body" | ||
| } catch { | ||
| Write-Error "Failed to send email.`nTo: $To`nCC: $CC`nSubject: $Subject`nBody: $Body`nException message: $($_.Exception.Message)" | ||
smw-ms marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.