Repository navigation
refactor(build): reduce Python script dependencies - #13527
Conversation
Remove the test-only SemVer validator and replace the Terraform recipe publisher with Bash. Keep the XML transformer and authorization-log collector in Python, and update publisher wiring, prerequisites, and regression coverage. Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
There was a problem hiding this comment.
🟢 Approval recommended
The scoped migration preserves the publishing interface, updates prerequisites consistently, and includes focused regression coverage with no identified blocking defects.
No open issues 🎉
What changed in this PR
This PR reduces Python dependencies in Radius development and CI tooling while preserving the public Terraform recipe publishing Make target. The XML transformer and authorization-log collector remain in Python.
Changes:
- Replace the Python Terraform recipe publisher with Bash,
zip, andkubectl, with focused regression coverage. - Remove the obsolete Python SemVer validator and retain malformed-version checks against the active Bash policy.
- Update callers, tool prerequisites, and contributor documentation.
| File | Description |
|---|---|
docs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md |
Document ZIP prerequisites and publisher verification. |
docs/contributing/contributing-code/contributing-code-github-workflows/README.md |
Remove Python from release-metadata prerequisites. |
build/test.mk |
Include Terraform publisher regression tests. |
build/scripts/local-functional.sh |
Replace the Python prerequisite with zip. |
build/scripts/local-functional_test.sh |
Update mocks and check missing zip handling. |
build/recipes.mk |
Invoke Bash through the existing publishing target. |
.github/workflows/lint.yaml |
Remove release-metadata Python setup. |
.github/scripts/validate_semver.py |
Delete the obsolete validator. |
.github/scripts/release-version-format_test.sh |
Remove Python helpers and extend Bash policy checks. |
.github/scripts/publish-test-terraform-recipes.sh |
Add Bash publishing with cleanup and failure propagation. |
.github/scripts/publish-test-terraform-recipes.py |
Delete the replaced Python publisher. |
.github/scripts/publish-test-terraform-recipes_test.sh |
Cover archives, inputs, failures, summaries, and cleanup. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13527 +/- ##
=======================================
Coverage 69.03% 69.03%
=======================================
Files 733 733
Lines 40185 40187 +2
=======================================
+ Hits 27740 27745 +5
+ Misses 12445 12442 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Remove the unused Python SemVer validator and replace the straightforward Terraform test-recipe publisher with Bash,
zip, andkubectl. Update the callers, prerequisites, and regression coverage without changing the public Make target.Keep the XML result transformer and authorization-log collector, including its tests, in Python: replacing those would require an XML dependency or a substantial process-management rewrite.
Validation evidence
make -f build/test.mk test-publish-recipes test-local-functional-runner— passed in WSL; both recipe publishers and the local runner passed.PYTHON=python-must-not-be-used bash .github/scripts/release-version-format_test.sh— passed on byte-identical files in an isolated WSL Git fixture. The Windows host lacks Make, and native WSL Git cannot resolve the Windows worktree metadata.fnm exec --using 24 -- node --test --test-name-pattern=Lint .github\scripts\changes_test.mjs— passed, 8 tests.shellcheck --external-sources --rcfile .github\linters\.shellcheckrc .github\scripts\publish-test-terraform-recipes.sh .github\scripts\publish-test-terraform-recipes_test.sh .github\scripts\release-version-format_test.sh build\scripts\local-functional.sh build\scripts\local-functional_test.sh— passed.pnpm exec markdownlint-cli2 docs\contributing\contributing-code\contributing-code-github-workflows\README.md --config .github\linters\.markdownlint-cli2.yaml— blocked before lint execution: pnpm's dependency policy could not validate the pinnedmarkdownlint-cli2@0.24.0against the registry manifest. Dependency versions and policies were not changed; Markdown tooling remains unavailable for the documentation edits.The full Go build, full test suite, and live-cluster functional tests were not run; the changes are scoped to development and CI scripts.
Reason for change
validate_semver.pywas referenced only by its own obsolete test helpers; release validation already uses the shared Bash policy. Terraform recipe publishing is simple shell orchestration and does not need a separate Python implementation. This removes those unnecessary Python requirements while leaving the more complex, actively used Python scripts alone.Related issue: N/A.
How to test
Use a normal Git checkout on Linux/WSL or macOS with Bash, GNU Make, Git,
zip,unzip, Node.js 24, and ShellCheck available. No cluster, registry, or cloud credentials are needed for these checks.Expect the release-version, Bicep publisher, Terraform publisher, and local-runner success messages; 8 passing Node tests; and no ShellCheck diagnostics. The publisher tests use a mocked
kubectland real ZIP tools to cover archive contents, hidden and empty recipes, relative paths and spaces, summary output, missing inputs/tools, failure propagation, and temporary-file cleanup.File change summary
.github/scripts/validate_semver.py.github/scripts/release-version-format_test.sh.github/workflows/lint.yaml.github/scripts/publish-test-terraform-recipes.py.github/scripts/publish-test-terraform-recipes.sh.github/scripts/publish-test-terraform-recipes_test.shbuild/recipes.mkbuild/test.mktest-publish-recipes.build/scripts/local-functional.shzip.build/scripts/local-functional_test.shzip.docs/contributing/contributing-code/contributing-code-github-workflows/README.mddocs/contributing/contributing-code/contributing-code-tests/running-functional-tests.md