Skip to content

Add Hybrid (Container Apps) deployment script generation for ADO#9158

Open
anandgmenon wants to merge 3 commits into
mainfrom
feature/hybrid-deployment-scripts
Open

Add Hybrid (Container Apps) deployment script generation for ADO#9158
anandgmenon wants to merge 3 commits into
mainfrom
feature/hybrid-deployment-scripts

Conversation

@anandgmenon
Copy link
Copy Markdown
Contributor

@anandgmenon anandgmenon commented May 11, 2026

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Adds support for generating Azure DevOps CI/CD artifacts for Hybrid Logic Apps (Container Apps) in addition to Standard (App Service). The VS Code "Generate Deployment Scripts" wizard now prompts users to choose a deployment target (Standard vs Hybrid), and generates the correct ARM templates, pipeline YAML, and connection transforms for each.

Why: Customers deploying Logic Apps to Container Apps (Hybrid) need different infrastructure (Microsoft.App/containerApps instead of Microsoft.Web/sites) and different connection authentication (AAD OAuth instead of managed identity). This enables generating correct deployment artifacts directly from the VS Code wizard.

Impact of Change

  • Users: New "Hybrid (Container Apps)" option in the VS Code Generate Deployment Scripts wizard. Adds a new wizard path and generated artifacts (ARM templates, ADO pipeline YAML). Existing Standard flow remains unchanged.
  • Developers: Public API change: added DeploymentTargetType to libs/vscode-extension. New wizard step classes (DeploymentTargetStep, ConnectedEnvironmentStep) and helper utilities (transformConnectionTemplatesForHybrid, fixAccessPolicyIdentityForHybrid). Consumers of the libs package may need to accommodate the new enum/type.
  • System: New telemetry properties added (deploymentTarget, lastStep values for Hybrid steps). Generated pipeline templates reference new ADO tasks (AzureLogicAppsHybridBuild@0, AzureLogicAppsHybridRelease@0, AzureLogicAppsHybridConnectionsDeployment@0). Secrets (SQL connection string, SMB password, AAD client secret) must be supplied via ADO pipeline secret variables only -- they are excluded from generated parameter files.

Test Plan

  • Manual testing completed
  • Tested in: Dev subscription with Container Apps Connected Environment
    • Verified Standard path still works unchanged (regression)
    • Verified Hybrid path generates correct ARM templates (containerApp, logicApp, SMB storage)
    • Verified pipeline YAML references correct ADO tasks (HybridBuild, HybridRelease, HybridConnectionsDeployment)
    • Verified managed connection templates are transformed (Microsoft.Web/Sites identity refs replaced with AAD parameters)
    • Verified workflowparameters/parameters.json is copied for Build task compatibility
    • E2E tested generated pipelines against live Container App deployment

Contributors

Screenshots/Videos

TODO

…lines

- Add DeploymentTargetStep: prompts Standard vs Hybrid target selection
- Add ConnectedEnvironmentStep: lists connected environments from subscription
- Fix subscription ordering bug: SubscriptionAndResourceGroupStep now runs
  before ConnectedEnvironmentStep via DeploymentTargetStep.getSubWizard()
- Generate Hybrid ARM template (containerApp + logicApp + SMB storage)
- Generate CI/CD pipeline YAML with variable files for Hybrid deployments
- Transform managed connection templates: replace Microsoft.Web/Sites identity
  refs with AAD parameters for Container Apps compatibility
- Add workflowparameters/ folder for Build task compatibility
- Use -fs suffix for storage share names (32-char limit)
- Add DeploymentTargetType enum and validation constants
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: Add Hybrid (Container Apps) deployment script generation for ADO
  • Issue: None — the title is concise and descriptive. Consider spelling out the acronym ADO for clarity to less-familiar readers (e.g., Azure DevOps (ADO)) or adding the scope (VS Code wizard) if you want more precision.
  • Recommendation: Keep the current title or, optionally, Add Azure DevOps (ADO) pipeline + ARM template generation for Hybrid (Container Apps) Logic Apps (VS Code wizard)

Commit Type

  • Properly selected (feature).
  • Only one commit type is selected, which is correct.

Risk Level

  • The PR body selects Medium and the PR has the risk:medium label. These match and are accurate for the scope of changes (new deployment flows and artifact generation).

What & Why

  • Current: Adds support for generating Azure DevOps CI/CD artifacts for Hybrid Logic Apps (Container Apps), with wizard prompts and new pipeline/ARM templates.
  • Issue: None — the explanation is clear and concise.
  • Recommendation: (Optional) Add one short example scenario (e.g., "when targeting a Connected Environment in Container Apps, the wizard will prompt for X and generate Y") to make the change even clearer to reviewers.

Impact of Change

  • The Impact section is well-scoped (Users, Developers, System). It correctly calls out the public API addition (DeploymentTargetType) and pipeline task names.
  • Recommendation: Add a short note about compatibility and rollout: e.g., confirm whether older consumers of libs/vscode-extension need a version bump or migration note; and call out that the pipeline tasks like AzureLogicAppsHybridBuild@0 are required (confirm those tasks are available in the target ADO organization or are packaged with this change).
    • Users: New Hybrid option in the VS Code wizard; existing Standard flow unchanged.
    • Developers: Public-api change (DeploymentTargetType) — consider a changelog entry and package version bump.
    • System: Secrets intentionally excluded from parameter files — ensure documentation/README for generated pipelines includes how to set required ADO secret variables (sqlConnectionString, fileSharePassword, aadClientSecret).

⚠️ Test Plan

  • Assessment: Manual testing completed is checked and the body provides a solid manual/E2E test description (dev subscription, Verified: templates, YAML, transformations, and E2E pipeline runs). This satisfies the requirement for manual-only PRs.
  • Recommendation: Add at least a few unit tests for the non-trivial logic you added (examples: transformConnectionTemplatesForHybrid, fixAccessPolicyIdentityForHybrid, generateHybridArmParameters). These are pure functions or file transformations and are good candidates for unit coverage. It will reduce regression risk in future refactors.

⚠️ Contributors

  • Assessment: Blank.
  • Recommendation: Add contributors (PMs, designers, reviewers, or other engineers) to the PR body if applicable. If there are no other contributors, a short note like No additional contributors is helpful. This is optional and should not block merge, but helps give credit.

⚠️ Screenshots/Videos

  • Assessment: Marked TODO.
  • Recommendation: For a change that introduces new UI steps in the VS Code wizard, please add at least one screenshot of the new DeploymentTargetStep and, optionally, the ConnectedEnvironment picker. Screenshots help reviewers validate UX changes quickly.

Summary Table

Section Status Recommendation
Title Optionally spell out ADO or include scope (VS Code wizard)
Commit Type No change needed
Risk Level No change needed
What & Why No change needed
Impact of Change Add note re: changelog/version bump and confirm ADO task availability
Test Plan ⚠️ Add unit tests for transformation/generation helpers if possible
Contributors ⚠️ Add contributors or a short note if none
Screenshots/Videos ⚠️ Add at least one screenshot of the new wizard prompt

Final notes & quick items to consider before merge

  • Add unit tests for the transformation and generation helpers if feasible — these are fast and reduce future risk.
  • Confirm the availability and contract of the custom ADO tasks (AzureLogicAppsHybridBuild@0, AzureLogicAppsHybridRelease@0, AzureLogicAppsHybridConnectionsDeployment@0) and document any required Azure DevOps extensions or task versions.
  • Consider adding a small changelog entry and bumping the package version for libs/vscode-extension since a new public type (DeploymentTargetType) was added.
  • Add at least one screenshot of the new DeploymentTargetStep and ConnectedEnvironment selection to the PR to aid UX review.
  • Add a small README or extend the existing wizard docs to clearly state how to set the required ADO secret variables for the generated pipelines.

Please update the PR with the optional items above (unit tests, screenshots, contributor notes, and any documentation/changelog) when convenient. Overall this PR is well-formed, follows the template, and the selected risk level (Medium) matches the changes in the diff — good work!


Last updated: Tue, 12 May 2026 06:38:27 GMT

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

📊 Coverage Check

The following changed files need attention:

apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/DeploymentTargetStep.ts - 0% covered
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/adoDeploymentScriptsSteps/ConnectedEnvironmentStep.ts - 0% covered
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/DeploymentScriptTypeStep.ts - 0% covered
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/adoDeploymentScriptsSteps/GenerateADODeploymentScriptsStep.ts - 0% covered

Please add tests for the uncovered files before merging.

…ng, comment cleanup

- Remove secret placeholders (sqlConnectionString, fileSharePassword, aadClientSecret)
  from generated ARM parameters file - secrets must be supplied via ADO pipeline
  secret variables only
- Filter connected environments by selected resource group location to avoid
  cross-region mismatches
- Use case-insensitive matching for Microsoft.Web/Sites in access policy identity
  fixup (handles both Sites and sites casing from API responses)
- Clean up NOTE(anandgmenon) comment prefixes across all files
@anandgmenon anandgmenon added the risk:medium Medium risk change with potential impact label May 11, 2026
@anandgmenon anandgmenon changed the title Add Hybrid (Container Apps) deployment script generation for ADO pipe… Add Hybrid (Container Apps) deployment script generation for ADO May 11, 2026
@anandgmenon anandgmenon marked this pull request as ready for review May 12, 2026 05:43
Copilot AI review requested due to automatic review settings May 12, 2026 05:43
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

Adds support in the VS Code “Generate Deployment Scripts” flow to generate Azure DevOps CI/CD artifacts for Hybrid Logic Apps (Container Apps) in addition to the existing Standard (App Service) path.

Changes:

  • Introduces a deployment-target selection step (Standard vs Hybrid) and stores the chosen target in the wizard context/telemetry.
  • Adds Hybrid artifact generation in the ADO pipeline path (Hybrid ARM template + parameters + pipeline YAML), and post-processes managed connection templates for Hybrid.
  • Adds validations/constants and exposes a new DeploymentTargetType model in the vscode-extension library.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
libs/vscode-extension/src/lib/models/project.ts Adds exported DeploymentTargetType enum/type for consumers.
apps/vs-code-designer/src/constants.ts Adds Connected Environment / resource group name validation regexes.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/DeploymentTargetStep.ts New wizard step to choose Standard vs Hybrid and branch prompt steps accordingly.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/DeploymentScriptTypeStep.ts Hooks the new target-selection step into the ADO pipeline flow.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/adoDeploymentScriptsSteps/GenerateADODeploymentScriptsStep.ts Implements Hybrid artifact generation, Hybrid pipeline YAML generation, and managed-connection template transforms.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/adoDeploymentScriptsSteps/ConnectedEnvironmentStep.ts New wizard step to select a Connected Environment for Hybrid deployments.
apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScripts.ts Extends wizard context with deployment target + Connected Environment fields.

Comment on lines +460 to +464
parameters: {},
variables: {},
resources: [
{
apiVersion: '2024-02-02-preview',
- Add expressionEvaluationOptions.scope: outer to nested storage deployment
  so inner resources can reference outer template parameters/variables
- Replace escaped \ with proper  in generated ADO pipeline YAML
  so Azure DevOps variable substitution works correctly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:medium Medium risk change with potential impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants