Skip to content

[cherry-pick] Add Hybrid (Container Apps) deployment script generation for ADO (#9158)#9225

Merged
lambrianmsft merged 1 commit into
hotfix/v5.961from
anandgmenon/cherry-pick-v5.961
May 29, 2026
Merged

[cherry-pick] Add Hybrid (Container Apps) deployment script generation for ADO (#9158)#9225
lambrianmsft merged 1 commit into
hotfix/v5.961from
anandgmenon/cherry-pick-v5.961

Conversation

@anandgmenon
Copy link
Copy Markdown
Contributor

@anandgmenon anandgmenon commented May 29, 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

* Add Hybrid (Container Apps) deployment script generation for ADO pipelines

- 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

* Address PR review: security, location filter, case-insensitive matching, 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

* Fix nested ARM template scope and ADO YAML variable syntax

- 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

* test(vscode): add unit tests for Hybrid deployment script wizard steps and helpers

---------

Co-authored-by: Anand G Menon <anandgmenon@microsoft.com>
@anandgmenon anandgmenon changed the title Add Hybrid (Container Apps) deployment script generation for ADO (#9158) [cherr-pick] Add Hybrid (Container Apps) deployment script generation for ADO (#9158) May 29, 2026
@anandgmenon anandgmenon requested review from andrew-eldridge and lambrianmsft and removed request for andrew-eldridge May 29, 2026 04:46
@anandgmenon anandgmenon changed the title [cherr-pick] Add Hybrid (Container Apps) deployment script generation for ADO (#9158) [cherry-pick] Add Hybrid (Container Apps) deployment script generation for ADO (#9158) May 29, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 29, 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: [cherry-pick] Add Hybrid (Container Apps) deployment script generation for ADO (#9158)
  • Issue: None blocking. The title is specific, describes the feature, and includes the cherry-pick context.
  • Recommendation: No change required.

Commit Type

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

Risk Level

  • The selected risk level is Medium, and that matches the scope and impact of the code changes.

What & Why

  • Current: Clear and detailed.
  • Issue: None blocking.
  • Recommendation: No change required.

Impact of Change

  • Good coverage of users, developers, and system impact.
  • Recommendation: No mandatory edits, though you may optionally trim a few implementation details if you want the PR body to stay shorter.

Test Plan

  • Satisfied.
  • The diff includes updated unit tests, and the body also documents manual and E2E testing.
  • No issue here.

⚠️ Contributors

  • This section is blank.
  • Recommendation: Add contributors or a brief note acknowledging collaborators, PMs, or reviewers if applicable.

⚠️ Screenshots/Videos

  • TODO is present.
  • Recommendation: If this change has any visual impact in the VS Code wizard, add screenshots or remove the placeholder once they are no longer needed.

Summary Table

Section Status Recommendation
Title No change needed
Commit Type feature is correctly selected
Risk Level Medium matches the PR scope
What & Why Clear and sufficient
Impact of Change Optional minor trimming only
Test Plan Unit/E2E testing is backed by the diff
Contributors ⚠️ Add contributors if applicable
Screenshots/Videos ⚠️ Replace TODO with screenshots or remove if not needed

This PR passes. The advised risk level is not higher than the submitter's estimate; medium is appropriate for the change size and user impact.

Note: Since this is a cherry-pick PR and the body is already strong, only the optional metadata fields need attention.


Last updated: Fri, 29 May 2026 04:51:36 GMT

@anandgmenon anandgmenon added the risk:medium Medium risk change with potential impact label May 29, 2026
@lambrianmsft lambrianmsft enabled auto-merge (squash) May 29, 2026 04:50
@github-actions
Copy link
Copy Markdown
Contributor

📊 Coverage Check

The following changed files need attention:

⚠️ apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/adoDeploymentScriptsSteps/ConnectedEnvironmentStep.ts - 15% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/generateDeploymentScripts/generateDeploymentScriptsSteps/adoDeploymentScriptsSteps/GenerateADODeploymentScriptsStep.ts - 18% covered (needs improvement)

Please add tests for the uncovered files before merging.

@lambrianmsft lambrianmsft merged commit 6109ac6 into hotfix/v5.961 May 29, 2026
15 of 18 checks passed
@lambrianmsft lambrianmsft deleted the anandgmenon/cherry-pick-v5.961 branch May 29, 2026 04:53
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.

2 participants