azd up fix for postgres and improved CLI help output#524
Merged
Conversation
- Add IaC support for Azure Database for PostgreSQL Flexible Server, including parameters, deployment logic, and outputs in main.bicep/main.json. - Update SQL Server VNet rule logic to use direct VNet name reference. - Add environment variables for PostgreSQL outputs. - Enhance BatchManager to handle pool subnet changes by recreating pools if needed. - Downgrade Azure.ResourceManager.AppContainers to 1.4.1. - Downgrade Microsoft.Data.SqlClient to 6.1.4 across projects for compatibility. - Minor formatting and whitespace fixes in .csproj files.
…environment variable
Introduces OptionGroup and GroupedHelpAction to enable grouped, visually enhanced help output using Spectre.Console. Adds SetGroupedHelp extension and applies it to all major commands, organizing options under logical headings for improved CLI usability. No changes to command execution logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements across infrastructure, scripts, and the .NET command-line interface. The main changes include enhanced validation and usability for test scripts, improved command-line help organization via grouped options, infrastructure refactoring for VNet/subnet handling, and a fix to ensure Azure Batch pools are recreated if their network configuration changes.
Infrastructure and Azure Resource Management
database.bicepto use an existing VNet resource instead of deploying a new network module. This simplifies the deployment and ensures correct references in virtual network rules. [1] [2] [3]identityResourcefor thedatabasesmodule inmain.bicepto ensure proper deployment order.Azure Batch Pool Management
BatchManager.csto detect mismatches in subnet configuration for Batch pools. If a mismatch is found (since subnets are immutable), the pool is deleted and recreated with the correct network configuration.Command-Line Interface Usability
CommandLineBuilder.Aci.cs,CommandLineBuilder.Batch.cs,CommandLineBuilder.ContainerApp.cs). This organizes options into logical groups, making help output much easier to read and use. [1] [2] [3] [4] [5] [6] [7] [8] [9]Test Script Improvements
run_all_external_tests_in_aci.ps1andrun_dependent_tests_in_aci.ps1to resolve the-prefixparameter from the environment variableAZURE_NAME_PREFIXif not provided, and display clear error messages if missing. This improves script robustness and user experience. [1] [2] [3]Infrastructure improvements:
database.bicepto use an existing VNet resource, simplifying deployments and ensuring correct subnet IDs in SQL server VNet rules. [1] [2] [3]dependsOnforidentityResourcein thedatabasesmodule withinmain.bicepto ensure correct deployment sequencing.Azure Batch enhancements:
BatchManager.csto detect and correct subnet mismatches for Batch pools by deleting and recreating the pool if necessary.CLI usability:
Test script robustness:
-prefixparameter from the environment or prompt the user, reducing errors and setup friction. [1] [2] [3]