Skip to content

fix(vscode): Fix 'Deploy to logic app' from Azure Resources tree - #9503

Open
Andrew Eldridge (andrew-eldridge) wants to merge 3 commits into
mainfrom
aeldridge/vscode-deploy-azure-resources-fix
Open

fix(vscode): Fix 'Deploy to logic app' from Azure Resources tree#9503
Andrew Eldridge (andrew-eldridge) wants to merge 3 commits into
mainfrom
aeldridge/vscode-deploy-azure-resources-fix

Conversation

@andrew-eldridge

@andrew-eldridge Andrew Eldridge (andrew-eldridge) commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

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

  • 'Deploy to logic app' command from logic app tree item in Azure Resources tree currently results in error "Cannot read properties of undefined (reading 'appSettingsTreeItem')" due to false assumption that deploy node is a SlotTreeItem. When selected from Azure Resources tree, the node is ResolvedAppResourceTreeItem. Updated accesses of node properties to handle both types correctly.
  • uploadAppSettings currently runs even if deployment fails (located in finally block). Moved to try block after deployment to ensure app settings aren't uploaded unless deployment succeeds.

Impact of Change

  • Users: Fixes 'Deploy to logic app' command from Azure Resources tree, avoids app setting upload on deployment failure
  • Developers: N/A
  • System: N/A

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in:

Contributors

Andrew Eldridge (@andrew-eldridge)

Closes #8708

@andrew-eldridge Andrew Eldridge (andrew-eldridge) added the VSCode Issues or PRs specific to VS Code extension label Aug 4, 2026
Copilot AI balanced review requested due to automatic review settings August 4, 2026 22:28
@andrew-eldridge Andrew Eldridge (andrew-eldridge) added the risk:medium Medium risk change with potential impact label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🤖 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: fix(vscode): Fix 'Deploy to logic app' from Azure Resources tree
  • Issue: None — valid fix prefix with a scope, and clearly describes the bug being fixed.
  • Recommendation: No change needed.

Commit Type

  • Exactly one type selected (fix), which matches a bug fix to the deploy command.
  • No overloading detected.

Risk Level

  • Medium is selected in the body and the risk:medium label is present, and both match my advised estimate. Changes touch extension-distribution code (apps/vs-code-designer) and alter deploy/app-settings-upload runtime behavior — Medium is correct.

What & Why

  • Current: Explains the appSettingsTreeItem undefined error caused by assuming a SlotTreeItem, plus moving uploadAppSettings out of finally so it only runs on successful deploy.
  • Issue: None.
  • Recommendation: No change needed.

Impact of Change

  • Users/Developers/System all addressed (Developers/System marked N/A, which is acceptable for this scoped fix).
  • Recommendation:
    • Users: Fixes 'Deploy to logic app' from Azure Resources tree; avoids uploading app settings on failed deploy.
    • Developers: N/A (acceptable).
    • System: N/A (acceptable).

Test Plan

  • Unit tests added (slotTreeUtils.test.ts) covering both SlotTreeItem and ResolvedAppResourceTreeItem resolution paths, plus manual testing. Satisfies CHECK TESTS.

Contributors


⚠️ Screenshots/Videos

  • Diff touches apps/vs-code-designer command/util logic, not the visual UI paths (libs/designer-ui/src, libs/designer/src, apps/vs-code-react UI). No screenshots required — optional nudge only.

Summary Table

Section Status Recommendation
Title No change needed
Commit Type No change needed
Risk Level Medium correctly declared and labeled
What & Why No change needed
Impact of Change No change needed
Test Plan Unit tests present
Contributors Credited
Screenshots/Videos ⚠️ Optional — non-visual change

All required checks pass. This PR is compliant and cleared to merge.


Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Wed, 05 Aug 2026 05:27:02 GMT

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

📊 Coverage Check

🎉 All changed files have adequate test coverage!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Not ready to approve

Successful hybrid deployments now fail when the unavailable app-settings node is resolved.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Fixes deployment from Azure Resources by supporting both slot and resolved resource nodes.

Changes:

  • Adds helpers for app settings and hybrid secrets.
  • Uploads settings only after successful deployment.
  • Adds unit tests for node-shape handling.
File summaries
File Description
slotTreeUtils.ts Adds node-property extraction helpers.
slotTreeUtils.test.ts Tests both supported node shapes.
hybridLogicApp/index.ts Uses the hybrid-secret helper.
deploy.ts Reorders settings upload and uses the new helper.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread apps/vs-code-designer/src/app/commands/deploy/deploy.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Ready to approve

No unresolved defects were found, and validation, coverage, builds, and tests pass.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

}
if (!isHybridLogicApp) {
await uploadAppSettings(context, getAppSettingsFromNode(node), workspaceFolder, settingsToExclude);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With the finally case, we should upload app settings regardless, now we are gating to only uploading settings if its not a hybrid logic app.

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 VSCode Issues or PRs specific to VS Code extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot read properties of undefined (reading 'appSettingsTreeItem')

3 participants