Skip to content

Conversation

@Roopan-Microsoft
Copy link
Contributor

@Roopan-Microsoft Roopan-Microsoft commented Nov 3, 2025

Purpose

  • This pull request refactors the sample data import workflow and documentation to better support both azd-based and custom Azure deployments. The changes clarify instructions for post-deployment steps, improve the user experience for importing sample data, and enhance the robustness of the sample data script by modularizing environment variable retrieval and validation.

Documentation improvements:

  • Updated docs/AVMPostDeploymentGuide.md and docs/DeploymentGuide.md to clearly distinguish between azd and custom/ARM deployments, providing step-by-step instructions for each scenario and emphasizing which command to use based on deployment type. Also improved formatting, added tips and notes, and clarified authentication and troubleshooting steps. [1] [2]
  • Renamed "Deploy in VS Code" section to "Deploy in VS Code Dev Containers" in the deployment guide for clarity.
  • Simplified and clarified the "Configurable Deployment Settings" section in the deployment guide.

Sample data script enhancements (infra/scripts/process_sample_data.sh):

  • Refactored the script to modularize environment variable retrieval: added functions to get values from azd environment, Azure deployment outputs, or prompt the user interactively if necessary. Improved validation and error handling for missing values. [1] [2]
  • Added logic to automatically detect and use the correct Azure subscription from the environment or prompt the user if mismatched, ensuring the script runs in the intended context.
  • Improved cleanup and network access restoration logic for robustness and maintainability.

Azure deployment hooks:

  • Updated deployment hooks in azure.yaml to print the correct sample data import command for both PowerShell and Bash, removing the unnecessary resource group argument for azd-based deployments. [1] [2]

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.

What to Check

Verify that the following are valid

  • ...

Other Information

Kingshuk-Microsoft and others added 3 commits October 29, 2025 17:04
* docs: update deployment guide to clarify VS Code Dev Containers and bash command usage

* docs: update post-deployment instructions to simplify sample data import command
… deployment script (#726)

* Refactor process_sample_data.sh to streamline required variable retrieval

* prompt for Azure CLI authentication in process_sample_data.sh
Copy link
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 refactors the process_sample_data.sh script to support multiple deployment methods and improves the documentation accordingly. The script now intelligently detects whether values should be sourced from Azure Developer CLI (azd) environment, Azure deployment outputs, or manual user input.

Key changes:

  • Added support for azd environment variable retrieval as the default method when no resource group is provided
  • Restructured the script to check for deployment method and fall back gracefully with improved error handling
  • Updated documentation to clarify usage for both azd-based deployments and custom ARM/Bicep deployments
  • Simplified the command usage by removing the resource group parameter from azd deployments

Reviewed Changes

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

File Description
infra/scripts/process_sample_data.sh Refactored to support multiple value retrieval methods (azd env, deployment outputs, manual input) with improved flow control and error handling
docs/DeploymentGuide.md Updated post-deployment instructions to distinguish between azd and custom deployment methods with clearer formatting
docs/AVMPostDeploymentGuide.md Enhanced documentation structure with better formatting and clarified usage instructions for AVM deployments
azure.yaml Simplified the command by removing the resource group parameter to leverage azd environment

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

@Prajwal-Microsoft Prajwal-Microsoft merged commit 831b012 into main Nov 3, 2025
15 checks passed
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.

6 participants