Fix bicep CLI uninitialized path in container app deployments#6610
Fix bicep CLI uninitialized path in container app deployments#6610
Conversation
- Restore public EnsureInstalled() method in bicep.go - Remove automatic installation from Build() and BuildBicepParam() - Add explicit EnsureInstalled() calls in service_target_containerapp.go and bicep_provider.go - Update all test files to use public EnsureInstalled() method - Reverts incorrect changes from previous checkpoint commit This fix follows the same pattern as PR #6593 for GitHub CLI. Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…re/azure-dev into copilot/vscode-mksqf1nj-yg63
|
/azp run azure-dev - cli |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
* fix security issue with playwright/test 1.49.1 (#6592) * Checkpoint from VS Code for cloud agent session * Fix bicep CLI initialization by restoring EnsureInstalled calls - Restore public EnsureInstalled() method in bicep.go - Remove automatic installation from Build() and BuildBicepParam() - Add explicit EnsureInstalled() calls in service_target_containerapp.go and bicep_provider.go - Update all test files to use public EnsureInstalled() method - Reverts incorrect changes from previous checkpoint commit This fix follows the same pattern as PR #6593 for GitHub CLI. Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Checkpoint from VS Code for cloud agent session --------- Co-authored-by: Victor Vazquez <vhvb1989@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
* fix security issue with playwright/test 1.49.1 (#6592) * Checkpoint from VS Code for cloud agent session * Fix bicep CLI initialization by restoring EnsureInstalled calls - Restore public EnsureInstalled() method in bicep.go - Remove automatic installation from Build() and BuildBicepParam() - Add explicit EnsureInstalled() calls in service_target_containerapp.go and bicep_provider.go - Update all test files to use public EnsureInstalled() method - Reverts incorrect changes from previous checkpoint commit This fix follows the same pattern as PR #6593 for GitHub CLI. Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Checkpoint from VS Code for cloud agent session --------- Co-authored-by: Victor Vazquez <vhvb1989@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
* fix security issue with playwright/test 1.49.1 (#6592) * Checkpoint from VS Code for cloud agent session * Fix bicep CLI initialization by restoring EnsureInstalled calls - Restore public EnsureInstalled() method in bicep.go - Remove automatic installation from Build() and BuildBicepParam() - Add explicit EnsureInstalled() calls in service_target_containerapp.go and bicep_provider.go - Update all test files to use public EnsureInstalled() method - Reverts incorrect changes from previous checkpoint commit This fix follows the same pattern as PR #6593 for GitHub CLI. Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Checkpoint from VS Code for cloud agent session --------- Co-authored-by: Victor Vazquez <vhvb1989@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com>
* fix security issue with playwright/test 1.49.1 (#6592) * Checkpoint from VS Code for cloud agent session * Update parameter popup border color to cyan in concurX extension Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Complete concurX parameter popup color update Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * cspell * Remove unintended changes to azure.ai.finetune extension Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * azure.ai.agents - Set `CGO_ENABLED=0` for x64 Linux build (#6611) * Set CGO_ENABLED=0 for x64 Linux build * Bump version * Bump version to 0.1.8-preview (#6613) * Extension update fixes/enhancements (#6604) * Clarify extension list latest version column * Add update availability JSON property and show asterisk besides outdated extensions * Add upgrade hints to extension list output * Fix cooldown logic and shallow copy * Update AGENTS.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com> * Fix bicep CLI uninitialized path in container app deployments (#6610) * fix security issue with playwright/test 1.49.1 (#6592) * Checkpoint from VS Code for cloud agent session * Fix bicep CLI initialization by restoring EnsureInstalled calls - Restore public EnsureInstalled() method in bicep.go - Remove automatic installation from Build() and BuildBicepParam() - Add explicit EnsureInstalled() calls in service_target_containerapp.go and bicep_provider.go - Update all test files to use public EnsureInstalled() method - Reverts incorrect changes from previous checkpoint commit This fix follows the same pattern as PR #6593 for GitHub CLI. Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Checkpoint from VS Code for cloud agent session --------- Co-authored-by: Victor Vazquez <vhvb1989@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Add azure.ai.agent 0.1.8-preview to registry (#6615) * Release 1.23.2 (#6616) * Initial plan * Release 1.23.2 Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Increment CLI version after release (#6617) * Migrate to use new shared eng package (#6600) * Fix VS Code extension commands failing with undefined fsPath in virtual file systems (#6601) * Initial plan * Add defensive checks for undefined fsPath in VS Code extension commands This fixes the issue where provision and other commands would fail with "The 'path' argument must be of type string. Received undefined" when used with virtual file systems or certain VS Code contexts. Changes: - Added validation for selectedFile.fsPath before calling getWorkingFolder - Provides clear error messages that include URI scheme and selectedItem type - Suppresses automatic issue reporting since this is a user error - Applied fix to all affected commands: provision, deploy, up, down, restore, monitor, packageCli, and pipelineConfig - Added unit tests for the new validation logic Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Simplify provision.test.ts based on code review feedback Removed unused stub functions that weren't actually being used. Simplified tests to focus on the core validation logic. Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Refactor validation logic into shared utility function Based on code review feedback: - Extracted duplicated validation logic to validateFileSystemUri() in cmdUtil.ts - Updated all 8 command files to use the shared function - Simplified test assertions - Improved code maintainability by reducing duplication Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Fix validation to use strict equality check for undefined Changed condition from `!selectedFile.fsPath` to `selectedFile.fsPath === undefined` to avoid incorrectly rejecting empty string paths which are valid for root directories. Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Fix l10n.t() to use single string literal instead of concatenation The first argument to vscode.l10n.t() should be a single string literal for proper localization tooling compatibility. Removed string concatenation and used a single multi-line string literal instead. Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * Add missing keys to `azd config options` (#6619) * Add missing config options --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com> * Raising for missing method type (#6628) * adding project-endpoint to init command * adding 12 preview release * fixig default customization method & adding training type * correct version * RFT grader fixes (#6629) * adding project-endpoint to init command * adding 12 preview release * fixig default customization method & adding training type * correct version * adding grader to cloning code * adding missing grader functionality * merging master * including .14-preview to main registry (#6630) * Add a naive attempt at downloading manifest (#6631) * Add a naive attempt at downloading * Address PR comments Signed-off-by: trangevi <trangevi@microsoft.com> * Update download directory as well Signed-off-by: trangevi <trangevi@microsoft.com> * Use net/url parsing in parseGitHubUrlNaive to handle fragments and query params (#6634) * Initial plan * Use net/url parsing to handle query params and fragments in parseGitHubUrlNaive Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com> * Final review completed Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com> * Revert unintended changes to other extensions Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com> * Address PR comments Signed-off-by: trangevi <trangevi@microsoft.com> * Update download directory as well Signed-off-by: trangevi <trangevi@microsoft.com> * Initial plan * Rebased on latest base branch --------- Signed-off-by: trangevi <trangevi@microsoft.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com> Co-authored-by: trangevi <trangevi@microsoft.com> --------- Signed-off-by: trangevi <trangevi@microsoft.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com> * Dev container feature - allow installing extensions (#6460) * Add extensions option to the azd devcontainer feature to allow specifying extensions to install * Review updates * Revert whitespace changes * Address feedback on shell script. Add multiple extensions to the test config to validate * Enable full figspec generation for extensions with metadata capability (#6620) * Fix indentation * Add metadata capability checks and improve error handling * Support dynamic suggestions for `azd config` commands * Exclude global persistent flags --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com> * Add concurX binary to gitignore Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> * lint * Update TestAskerConsoleExternalPrompt to use new external prompt mechanism Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> --------- Signed-off-by: trangevi <trangevi@microsoft.com> Co-authored-by: Victor Vazquez <vhvb1989@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: vhvb1989 <24213737+vhvb1989@users.noreply.github.com> Co-authored-by: JeffreyCA <jeffreychen@microsoft.com> Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Brandon Waterloo [MSFT] <36966225+bwateratmsft@users.noreply.github.com> Co-authored-by: Amit Chauhan <70937115+achauhan-scc@users.noreply.github.com> Co-authored-by: Travis Angevine <trangevi@microsoft.com> Co-authored-by: trangevi <26490000+trangevi@users.noreply.github.com> Co-authored-by: Stuart Leeks <stuartle@microsoft.com>
Bicep CLI path was empty when deploying container apps, causing
azd deployto fail with "command must be provided if shell is not used" in v1.23.1.Root Cause
A previous commit removed explicit
EnsureInstalled()calls while simultaneously renaming the method to privateensureInstalledOnce(). This left the CLI'spathfield uninitialized when instances were created inline inservice_target_containerapp.go.Changes
Restored explicit installation pattern:
EnsureInstalled()public inbicep.goBuild()andBuildBicepParam()methodsEnsureInstalled(ctx)calls in:service_target_containerapp.go- inline CLI creation for bicepparam deploymentsbicep_provider.go- Initialize() methodThis follows the same pattern established in PR #6593 for GitHub CLI.
Original prompt
create a PR linked to #6607 as a fix.
[Chronological Review: The conversation began with the user referencing an issue on GitHub related to the bicep CLI and an error in the command_runner. The user suspected that the error could be due to improper initialization of the bicep CLI, leading to an empty command. The user then proposed a fix to make the EnsureInstalled method private and called from public methods to improve usability. The conversation evolved to address concerns about thread safety and concurrency, leading to a request to add comments in the bicep CLI file. The user then requested to remove a public method, expressing a preference for it not to be public unless necessary for interface implementation. The user repeatedly requested the creation of a pull request (PR) linked to the GitHub issue as a fix, and finally canceled a command to delegate to a cloud agent.][Intent Mapping:
[Technical Inventory:
[Code Archaeology:
[Progress Assessment:
[Context Validation: All critical information for continuation is captured, including the proposed changes to the bicep CLI and the need for a PR.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: User aims to fix an error in the bicep CLI related to command execution and improve usability by restructuring the code. - Session Context: The conversation flowed from identifying an error, proposing a fix, discussing concurrency, and requesting code modifications, culminating in multiple requests to create a PR. - User Intent Evolution: The user shifted from diagnosing an error to proposing structural changes and ensuring the usability of the bicep CLI.- Technical Foundation:
- Bicep CLI: A command-line interface for managing Azure resources, with a focus on usability improvements.
- EnsureInstalled: A method proposed to be made private to streamline the CLI's public interface.
- Codebase Status:
- Bicep CLI file:
- Purpose: Central to managing Azure resources via command line.
- Current State: Modifications proposed to improve usability and remove unnecessary public methods.
- Key Code Segments: Discussion around the EnsureInstalled method and its visibility.
- Dependencies: Related to the overall functionality of the bicep CLI.
- Problem Resolution:
- Issues Encountered: Error in command execution due to potential improper initialization of the bicep CLI.
- Solutions Implemented: Proposed making EnsureInstalled a private method and removing unnecessary public methods.
- Debugging Context: Ongoing discussions about concurrency and thread safety.
- Lessons Learned: Importance of usability and proper initialization in command-line tools.
- Progress Tracking:
- Completed Tasks: User has proposed a fix and discussed concurrency.
- Partially Complete Work: PR creation is pending, and public method removal is in progress.
- Validated Outcomes: No specific outcomes validated yet, as the focus is on proposed changes.
- Active Work State:
- Current Focus: Creating a PR linked to the GitHub issue a...
Created from VS Code.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.