Python: ci: validate dependency bounds for metadata changes - #7476
Python: ci: validate dependency bounds for metadata changes#7476alectimison-maker wants to merge 1 commit into
Conversation
|
@alectimison-maker please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull request overview
This PR adds a lightweight, blocking CI gate to the existing Python Code Quality workflow to enforce Python package dependency-bound validation when package metadata changes, closing the gap between weekly maintenance validation and day-to-day merges.
Changes:
- Adds a new
Dependency Boundsjob to.github/workflows/python-code-quality.yml. - Computes a stable base SHA/ref for PRs and merge groups, detects whether package
pyproject.tomlmetadata changed, and conditionally runsuv run poe validate-python-release.
| id: package-metadata | ||
| shell: bash | ||
| run: | | ||
| if git diff --quiet "${BASE_REF}" HEAD -- 'python/packages/*/pyproject.toml'; then |
Motivation & Context
Python package dependency bounds are validated by weekly maintenance, but a broken floor or ceiling can still merge before that schedule catches it. The repository now has a bounded
validate-python-releasetask that probes only changed package metadata and its affected package closure, but no CI workflow invokes it.This closes the enforcement gap without putting the exhaustive workspace matrix on every Python PR, matching the cost concern discussed in #6582.
Description & Review Guide
Dependency Boundsjob to the existing Python Code Quality workflow. It resolves the immutable PR/merge-group base, detects changes to published packagepyproject.tomlfiles, and conditionally runsvalidate-python-releaseagainst that base.git diff; project setup and validation are skipped.Related Issue
Fixes #6582
Validation
actionlint .github/workflows/python-code-quality.ymlgit diff --checkContribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.