Visitar URL original
Convert change detection to a Python script by AA-Turner · Pull Request #129627 · python/cpython · GitHub
Skip to content

Convert change detection to a Python script - #129627

Merged
AA-Turner merged 14 commits into
python:mainfrom
AA-Turner:change-detection-py
Feb 5, 2025
Merged

AA-Turner merged 14 commits into
python:mainfrom
AA-Turner:change-detection-py

Conversation

@AA-Turner

Copy link
Copy Markdown
Member

The change detection workflow is becoming increasingly complex.

We have grown from a fairly simple grep command to skip documentation files (#19983) to a large and complex shell script (embedded within a YAML document), indeed one sufficiently complex to merit a dedicated workflow file (#122336)

A potted history of significant revisions is thus:

There are further proposed changes, such as skipping Windows tests on changes to the Unix build configuration:

Even having recently improved readability of the central grep command (#128754), this workflow remains difficult to correctly modify (#128450).

This PR converts the core logic into a short Python script, Tools/build/compute-changes.py, which determines which workflows to run. I imagine this will make it easier to introduce future conditional workflows, which we should probably adopt more of to reduce time and resources spent waiting for CI.

I have reused the "changed files" logic introduced in #108065, meaning we can also combine the duplicative MSI and Docs changes steps, which reduces the overall work done.

I've tested this quite a bit on my fork and detection works well, as does workflow dispatch.

A

cc @webknjaz (sorry for the ping; I can't request-review)

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants