Repository navigation
Conversation
… tag Same issue as pytorch#187058, but for the macOS arm64 binary wheel build. The wheel-build job checks out a pinned commit SHA with the default shallow checkout and 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 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. Do a full fetch (fetch-depth: 0) on tag pushes and keep the shallow checkout for nightlies: fetch-depth: ${{ github.ref_type != 'tag' && 1 || 0 }} fetch-tags: ${{ github.ref_type == 'tag' }} The condition is negated (matching pytorch#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 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: ``` 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.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/187139
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 77 PendingAs of commit 83cdaab with merge base 9efe9b4 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Don't you need to do the same but for Windows? |
|
@pytorchbot merge -f "Lint is green, binary workflows have started" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot cherry-pick --onto release/2.13 -c critical |
Cherry picking #187139The cherry pick PR is at #187172 and it is recommended to link a critical cherry pick PR with an issue. The following tracker issues are updated: Details for Dev Infra teamRaised by workflow job |
… tag (#187172) Full git fetch on tag pushes so macOS release wheel builds detect the 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) Co-authored-by: atalman <[email protected]>
… tag (pytorch#187139) ## Problem Same issue as pytorch#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 pytorch#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: pytorch#187139 Approved by: https://github.com/malfet
… tag (pytorch#187139) ## Problem Same issue as pytorch#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 pytorch#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: pytorch#187139 Approved by: https://github.com/malfet
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.