Skip to content

feat: Enhance email template, add RG owner tag, scalability input#853

Open
Vamshi-Microsoft wants to merge 2 commits into
devfrom
pls-workflowchanges
Open

feat: Enhance email template, add RG owner tag, scalability input#853
Vamshi-Microsoft wants to merge 2 commits into
devfrom
pls-workflowchanges

Conversation

@Vamshi-Microsoft
Copy link
Copy Markdown
Contributor

Purpose

This pull request introduces support for an "Enable Scalability" option across multiple GitHub Actions workflows, specifically targeting WAF (Web Application Firewall) deployments. It ensures that the new option is validated, passed through the workflow inputs and environment, and correctly applied to deployment parameters. Additionally, it includes several improvements to input descriptions, region options, and resource group tagging.

Scalability Option Support for WAF Deployments:

  • Added a new enable_scalability/ENABLE_SCALABILITY input to all relevant workflows (deploy-v2.yml, deploy-orchestrator.yml, job-deploy.yml, job-deploy-linux.yml, job-deploy-windows.yml) to allow opting into scalability features for WAF deployments. The input is validated and only applied when WAF is enabled. [1] [2] [3] [4] [5]
  • Updated workflow steps to pass the new scalability input through job and environment variables, ensuring it is available where needed during deployment. [1] [2] [3] [4] [5] [6] [7]
  • Implemented validation logic to ensure enable_scalability is a boolean, and only meaningful when waf_enabled is true. Informational messages are provided if the option is set but not applicable.
  • Deployment scripts for both Linux and Windows now update the ARM template parameters file to set enableScalability when WAF is enabled, including input validation and error handling. [1] [2]
  • The deployment summary now includes the state of the "Enable Scalability" option for transparency.

Workflow Input and Documentation Improvements:

  • Improved descriptions and naming for several workflow inputs to clarify their purpose (e.g., region, WAF, EXP, log analytics workspace, AI project resource, cleanup). [1] [2] [3]
  • Added eastus2 as a supported deployment region.

Resource Group Tagging Enhancement:

  • Updated resource group creation logic to add or update an "Owner" tag with the GitHub actor, ensuring resource ownership is traceable. Existing tags are preserved and only the Owner tag is updated or added.

These changes collectively improve deployment flexibility, clarity, and traceability for WAF-enabled environments.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the WAF CI/CD workflows with an opt-in enable_scalability input that is threaded through deploy-v2.ymldeploy-orchestrator.ymljob-deploy.ymljob-deploy-linux.yml / job-deploy-windows.yml and applied to infra/main.parameters.json via jq when WAF is enabled. It also enriches resource-group creation with an Owner tag derived from github.actor, polishes several workflow input descriptions, adds eastus2 to the region list, and replaces the inline-table notification emails in job-send-notification.yml with a richer card-style HTML template (with pill-styled status badges and python3 json.dumps HTML-escaping).

Changes:

  • Add and validate enable_scalability / ENABLE_SCALABILITY across 5 workflow files, plus jq-based patching of enableScalability in the parameters file for both Linux and Windows deploy paths.
  • Tag created or existing resource groups with Owner=${github.actor} and surface the scalability state in the GitHub step summary.
  • Redesign all 5 notification email bodies with a shared card template, status pills, and a python3-based JSON-encoded body payload.

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/deploy-v2.yml Adds enable_scalability input, validation, and output; reworks several input descriptions; adds eastus2 region.
.github/workflows/deploy-orchestrator.yml Defines new enable_scalability input and forwards it to job-deploy.
.github/workflows/job-deploy.yml Computes ENABLE_SCALABILITY env, passes it to Linux/Windows deploy jobs, adds RG Owner tag logic, and surfaces scalability in the summary.
.github/workflows/job-deploy-linux.yml Adds ENABLE_SCALABILITY input and a jq step that overwrites parameters.enableScalability.value when WAF is enabled.
.github/workflows/job-deploy-windows.yml Same scalability/jq logic as the Linux deploy job.
.github/workflows/job-send-notification.yml Replaces all email bodies with card-style HTML templates, pill-based status indicators, JSON-encoded payloads, and minor input-description tweaks.
Comments suppressed due to low confidence (1)

.github/workflows/job-send-notification.yml:118

  • The "skipped" cleanup case now renders with the green success palette (#d4edda / #155724) and the bare label "SKIPPED". Previously this case communicated SKIPPED (Needs Manual Cleanup) — i.e. it was an operator action item, not a success. Using the same success-green pill as cleanup-success makes skipped/failed-but-skipped cleanups visually indistinguishable from a clean run and removes the "Needs Manual Cleanup" context that recipients relied on. Consider using a distinct (e.g. amber) palette for SKIPPED and restoring the "Needs Manual Cleanup" hint either in the pill or as adjacent text. The same concern applies to the failure) branch, which dropped the "(Needs Manual Cleanup)" suffix.
            success)
              CLEANUP_PILL="<span style=\"${PILL_BASE} background:#d4edda; color:#155724;\">&#x2705; SUCCESS</span>"
              ;;
            failure)
              CLEANUP_PILL="<span style=\"${PILL_BASE} background:#f8d7da; color:#721c24;\">&#x274C; FAILED</span>"
              ;;
            *)
              CLEANUP_PILL="<span style=\"${PILL_BASE} background:#d4edda; color:#155724;\">&#x23ED;&#xFE0F; SKIPPED</span>"
              ;;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/job-deploy.yml
Comment thread .github/workflows/job-send-notification.yml
Comment thread .github/workflows/job-deploy.yml
Comment thread .github/workflows/job-send-notification.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants