Add AliCloud parity testing and simplify template generation#35
Open
Add AliCloud parity testing and simplify template generation#35
Conversation
- Add parity-test-alicloud.yml GitHub Actions workflow that generates alicloud output (aliyun + terraform) from both TypeScript and Python implementations and diffs the results, mirroring the Azure/AWS pattern - Sync Python alicloud availability zones to match TypeScript config (cn-hangzhou-a..f instead of cn-hangzhou-h..k) - Rewrite process_alicloud_aliyun_template to use pre-calculated zones and --output cols=VSwitchId format, matching TypeScript output exactly - Rewrite process_alicloud_terraform_template to use static vswitch zone variables instead of a dynamic alicloud_zones data source, matching TypeScript output exactly - Update Python aliyun.template.sh to use --output cols=VpcId for VPC ID extraction, matching the TypeScript template - Add security group resources and security_group_id output to Python terraform.template.tf to match the TypeScript template https://claude.ai/code/session_01FPJXHgjRWCVA2g92YWabgW
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.
Summary
This PR introduces automated parity testing between TypeScript and Python implementations for AliCloud infrastructure templates, and refactors the AliCloud template generation to use simpler, more maintainable approaches.
Key Changes
New Parity Testing Workflow
.github/workflows/parity-test-alicloud.ymlto automatically compare TypeScript and Python outputs for AliCloud templatesTemplate Generation Simplification
Aliyun Shell Script (
aliyun.template.sh):aliyunCLI output formatting:--output cols=VpcId rows=VpcId | tail -n 1 | tr -d ' 'Terraform Template (
terraform.template.tf):data "alicloud_zones"data source for zone lookupvswitch1_zone,vswitch2_zone)Python Script Updates (
template_processor.py)Configuration Updates (
cloud_provider_config.py)Implementation Details
https://claude.ai/code/session_01FPJXHgjRWCVA2g92YWabgW