Repository navigation
Full git fetch on tag pushes so macOS release wheel builds detect the tag - #187172
Merged
Merged
Conversation
… tag (#187139) ## Problem Same issue as #187058, but for the **macOS arm64 binary wheel** build. The `wheel-build` job checks out a pinned commit SHA with the default shallow `actions/checkout` (depth 1, no tags). On a release tag push (e.g. `v2.13.0-rc1`) the tag ref is never written into that checkout, so `tagged_version()` in `.ci/pytorch/binary_populate_env.sh` (`git describe --tags --exact`, invoked per-iteration by `.ci/wheel/build_all_macos_wheels.sh`) fails. The build then falls through to the `<version>.dev<DATE>` default, producing wheels versioned `2.13.0.devYYYYMMDD` instead of the release version. ## Fix Do a full fetch (`fetch-depth: 0`) on tag pushes and keep the shallow checkout for nightlies: ```yaml fetch-depth: ${{ github.ref_type != 'tag' && 1 || 0 }} fetch-tags: ${{ github.ref_type == 'tag' }} ``` The condition is negated (matching #187058) because GitHub Actions has no ternary and the `A && B || C` idiom only works when `B` is truthy; the naive `github.ref_type == 'tag' && 0 || 2` always yields the shallow value because `0` is falsy. Only the `wheel-build` checkout is changed; the libtorch `*-extract` job uses a sparse checkout of the already-built wheel artifact and does not need the tag. > Needs to be cherry-picked onto `release/2.13` for the RC builds to pick it up. ## Test Plan Regenerated the workflows from the template and confirmed only the macOS wheel workflow changed, with the conditional fetch on the build job's checkout: ``` python3 .github/scripts/generate_ci_workflows.py git diff --stat .github/workflows ``` Validated the regenerated YAML parses and passes actionlint (the only reported shellcheck warning, `SC2086` on `uv python install $DESIRED_PYTHONS`, is pre-existing and unrelated): ``` python3 -c "import yaml; yaml.safe_load(open('.github/workflows/generated-macos-arm64-binary-wheel-nightly.yml'))" lintrunner --take ACTIONLINT .github/workflows/generated-macos-arm64-binary-wheel-nightly.yml ``` *This PR was authored with the assistance of an AI coding agent.* Pull Request resolved: #187139 Approved by: https://github.com/malfet (cherry picked from commit fb17c34)
This was referenced Jun 12, 2026
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/187172
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
atalman
approved these changes
Jun 12, 2026
20 of 27 tasks
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.
Problem
Same issue as #187058, but for the macOS arm64 binary wheel build. The
wheel-buildjob checks out a pinned commit SHA with the default shallowactions/checkout(depth 1, no tags). On a release tag push (e.g.v2.13.0-rc1) the tag ref is never written into that checkout, sotagged_version()in.ci/pytorch/binary_populate_env.sh(git describe --tags --exact, invoked per-iteration by.ci/wheel/build_all_macos_wheels.sh) fails. The build then falls through to the<version>.dev<DATE>default, producing wheels versioned2.13.0.devYYYYMMDDinstead of the release version.Fix
Do a full fetch (
fetch-depth: 0) on tag pushes and keep the shallow checkout for nightlies:The condition is negated (matching #187058) because GitHub Actions has no ternary and the
A && B || Cidiom only works whenBis truthy; the naivegithub.ref_type == 'tag' && 0 || 2always yields the shallow value because0is falsy.Only the
wheel-buildcheckout is changed; the libtorch*-extractjob uses a sparse checkout of the already-built wheel artifact and does not need the tag.Test Plan
Regenerated the workflows from the template and confirmed only the macOS wheel workflow changed, with the conditional fetch on the build job's checkout:
Validated the regenerated YAML parses and passes actionlint (the only reported shellcheck warning,
SC2086onuv python install $DESIRED_PYTHONS, is pre-existing and unrelated):This PR was authored with the assistance of an AI coding agent.