Add workflow to validate source repos definitions and synchronise existing definitions#508
Add workflow to validate source repos definitions and synchronise existing definitions#508
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a Python script to validate that repository definitions are consistent between Terraform and Ansible configurations. The review feedback identifies a bug in the group extraction logic where trailing spaces in Jinja2 templates would cause matching failures, and it recommends properly propagating the script's exit code using sys.exit() within a standard main entry block to ensure CI/CD pipelines can detect validation failures.
a775163 to
718fd7a
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a validation script, scripts/validate-source-repos.py, designed to synchronize repository lists and codeowner group assignments between Terraform and Ansible configurations. The review feedback focuses on improving the robustness and idiomatic quality of the script, specifically by using more efficient file-loading methods for JSON and YAML, preventing potential KeyError exceptions when accessing repository data, and ensuring group names are correctly normalized during parsing.
Adds a script which checks if the source repositories definitions in ansible/inventory/group_vars/all/source-repositories and terraform/github/terraform.tfvars.json are out of sync. Calls this script via a workflow on PR and pushes to main.
718fd7a to
24426fb
Compare
Terraform Format and Style 🖌
|
|
Example failure here: https://github.com/stackhpc/stackhpc-release-train/actions/runs/24990491954/job/73174589214 |
258d2b0 to
d0056ed
Compare
d0056ed to
7cd9eb2
Compare
No description provided.