Skip to content

Conversation

@Harsh-Microsoft
Copy link
Contributor

Purpose

This pull request introduces a robust fallback mechanism to the deployment and sample data processing scripts, allowing resource values to be retrieved using the solutionSuffix from resource group tags when deployment outputs are unavailable. It also ensures that the solutionSuffix is consistently tagged in resources, and improves the reliability of resource dependency ordering in the ARM template. These changes make the deployment process more resilient to missing or deleted deployments and maintain consistency in resource naming and metadata.

Script enhancements for resiliency and automation:

  • Added a fallback function get_values_from_solution_suffix to both process_custom_data.sh and process_sample_data.sh, enabling resource name and property generation using the solutionSuffix tag and Azure naming conventions when deployment outputs are missing. This includes logic to fetch managed identity client IDs, endpoints, and resource IDs, and prompts for manual use case entry if not found in tags. [1] [2]
  • Updated script logic so that if deployment outputs cannot be retrieved, the fallback method is attempted automatically, eliminating the need for manual entry unless both automated methods fail. [1] [2]
  • Improved error handling and messaging in both scripts to clearly indicate when fallback logic is triggered and when failures occur. [1] [2]
  • Ensured that the use case is always displayed in the sample data script output for clarity.

Infrastructure and template consistency:

  • Added the SolutionSuffix property to resource group tags in both the Bicep (main.bicep) and generated ARM template (main.json), ensuring the tag is always available for fallback logic and resource identification. [1] [2]
  • Corrected and reordered resource dependencies in the ARM template to ensure proper deployment sequencing, reducing the risk of deployment failures due to dependency issues. [1] [2] [3]

Other technical updates:

  • Updated the ARM template hash to reflect the template changes.

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

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 pull request introduces a fallback mechanism to retrieve resource configuration values from the solutionSuffix tag when deployment outputs are unavailable or deleted. The changes enhance the resilience of post-deployment scripts (process_sample_data.sh and process_custom_data.sh) by automatically attempting the fallback method when deployment outputs cannot be retrieved, eliminating the need for manual value entry in most cases.

Key changes include:

  • Addition of get_values_from_solution_suffix() function to both scripts that constructs resource names using Azure naming conventions and the solutionSuffix tag
  • Updated error handling to automatically fall back to the tag-based method when deployment outputs are missing
  • Addition of SolutionSuffix tag to resource group in both Bicep template and generated ARM template to support the fallback mechanism

Reviewed changes

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

File Description
infra/scripts/process_sample_data.sh Adds fallback function to derive resource values from solutionSuffix tag and naming conventions; updates deployment outputs retrieval to handle missing deployments gracefully; adds usecase to summary output
infra/scripts/process_custom_data.sh Adds fallback function to derive resource values from solutionSuffix tag and naming conventions; updates deployment outputs retrieval to handle missing deployments gracefully
infra/main.bicep Adds SolutionSuffix to resource group tags to support fallback mechanism
infra/main.json Updates template hash; adds SolutionSuffix to resource group tags; reorders DNS zone dependencies (cosmetic, auto-generated)

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

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.

2 participants