feat: Enhance email template, add RG owner tag, scalability input#249
Open
Vamshi-Microsoft wants to merge 1 commit into
Open
feat: Enhance email template, add RG owner tag, scalability input#249Vamshi-Microsoft wants to merge 1 commit into
Vamshi-Microsoft wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the deployment GitHub Actions workflow chain with a new WAF-only “Enable Scalability” input, improves RG traceability by tagging the RG owner, and refreshes the notification emails to use richer HTML formatting (including “pill” status badges).
Changes:
- Added
enable_scalability/ENABLE_SCALABILITYinputs across orchestrator + deployment workflows, with validation and propagation into Linux/Windows parameter handling (WAF path updatesinfra/main.parameters.json). - Updated RG creation/update logic to add an
Ownertag (using the GitHub actor) for better resource traceability. - Reworked notification emails to send structured HTML (status “pills”, improved layout) instead of simple inline HTML strings.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/job-send-notification.yml |
Replaces plain status strings with HTML “pill” rendering and sends richer HTML email payloads. |
.github/workflows/job-deploy.yml |
Adds enable_scalability input + validation, propagates it to downstream jobs, and tags RGs with Owner. |
.github/workflows/job-deploy-linux.yml |
When WAF is enabled, injects enableScalability into infra/main.parameters.json with validation. |
.github/workflows/job-deploy-windows.yml |
Mirrors Linux behavior for WAF deployments by injecting enableScalability into parameters with validation. |
.github/workflows/deploy-v2.yml |
Adds workflow-dispatch input + validation/output plumbing for enable_scalability and improves input descriptions/options. |
.github/workflows/deploy-orchestrator.yml |
Propagates the new enable_scalability input through the orchestrator to the deploy job. |
Comments suppressed due to low confidence (2)
.github/workflows/job-send-notification.yml:218
- The deployment-failure email template injects
RESOURCE_GROUP,${{ github.actor }}, and${{ env.BRANCH_NAME }}into HTML without escaping.RESOURCE_GROUP_NAMEcan come from workflow inputs; please HTML-escape these values to avoid HTML/attribute injection in notification emails.
<tr><td style="padding:8px 0; font-size:13px; color:#6b7280; width:140px;">Resource Group</td>
<td style="padding:8px 0; font-size:13px; color:#111827; font-family:'Cascadia Code','Courier New',monospace;">${RESOURCE_GROUP}</td></tr>
<tr><td style="padding:8px 0; font-size:13px; color:#6b7280;">Triggered By</td>
<td style="padding:8px 0; font-size:13px; color:#111827;">${{ github.actor }}</td></tr>
<tr><td style="padding:8px 0; font-size:13px; color:#6b7280;">Branch</td>
<td style="padding:8px 0; font-size:13px; color:#111827; font-family:'Cascadia Code','Courier New',monospace;">${{ env.BRANCH_NAME }}</td></tr>
.github/workflows/job-send-notification.yml:301
- In the success notification,
github.actorandenv.BRANCH_NAMEare still embedded into HTML without escaping even though other inputs are escaped. For consistency and to avoid HTML injection via branch names, please applyhtml_escapeto these fields as well.
<tr><td style="padding:8px 0; font-size:13px; color:#6b7280;">Triggered By</td>
<td style="padding:8px 0; font-size:13px; color:#111827;">${{ github.actor }}</td></tr>
<tr><td style="padding:8px 0; font-size:13px; color:#6b7280;">Branch</td>
<td style="padding:8px 0; font-size:13px; color:#111827; font-family:'Cascadia Code','Courier New',monospace;">${{ env.BRANCH_NAME }}</td></tr>
</table>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -1,4 +1,4 @@ | |||
| name: Send Notification Job | |||
| name: Send Notification Job | |||
Comment on lines
+140
to
+142
| <td style="padding:8px 0; font-size:13px; color:#111827;">${{ github.actor }}</td></tr> | ||
| <tr><td style="padding:8px 0; font-size:13px; color:#6b7280;">Branch</td> | ||
| <td style="padding:8px 0; font-size:13px; color:#111827; font-family:'Cascadia Code','Courier New',monospace;">${{ env.BRANCH_NAME }}</td></tr> |
Comment on lines
+200
to
+206
| # Validate enable_scalability (boolean, opt-in, default false) | ||
| ENABLE_SCALABILITY_VALUE="${INPUT_ENABLE_SCALABILITY:-false}" | ||
| if [[ "$ENABLE_SCALABILITY_VALUE" != "true" && "$ENABLE_SCALABILITY_VALUE" != "false" ]]; then | ||
| echo "❌ ERROR: enable_scalability must be 'true' or 'false', got: '$ENABLE_SCALABILITY_VALUE'" | ||
| VALIDATION_FAILED=true | ||
| else | ||
| echo "✅ enable_scalability: '$ENABLE_SCALABILITY_VALUE' is valid" |
| VALIDATION_FAILED=true | ||
| else | ||
| echo "✅ enable_scalability: '$ENABLE_SCALABILITY' is valid" | ||
| fi |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Purpose
This pull request introduces a new "Enable Scalability" option (for WAF deployments only) across all deployment-related GitHub Actions workflows. It also improves validation and parameter handling for this option, and adds minor improvements to notifications and resource group tagging. The most important changes are grouped below.
Enable Scalability Option for Deployments:
enable_scalability(orENABLE_SCALABILITY) boolean input to all deployment workflows (deploy-orchestrator.yml,deploy-v2.yml,job-deploy.yml,job-deploy-linux.yml, andjob-deploy-windows.yml). This allows users to optionally enable scalability features during WAF deployments. [1] [2] [3] [4] [5]enableScalabilityvalue intomain.parameters.jsonwhen WAF is enabled, with robust validation and error handling. [1] [2]Resource Group Tagging Improvements:
Workflow Input and Output Improvements:
Notification Workflow Enhancement:
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information