-
Notifications
You must be signed in to change notification settings - Fork 26.3k
For sdists, replace symlink with copy for docs requirements #157811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/157811
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit cdbc3a0 with merge base 334b38c ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Starting merge as part of PR stack under #157813 |
atalman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. Thank you.
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…157811) Before this change, there was the requirements file `.ci/docker/requirements-docs.txt` which was symlinked as `../.ci/docker/requirements-docs.txt` from `docs/requirements.txt` since pytorch#151796. In this situation, [because `.ci` is excluded from the source tarball](https://github.com/pytorch/pytorch/blob/3173616532ecf0d5c0b78595d6054f1b4bd2bd75/.github/workflows/create_release.yml#L67), we end up with a broken symlink, that additionally is [invalid in a Python source distribution](https://packaging.python.org/en/latest/specifications/source-distribution-format/#unpacking-without-the-data-filter). The broken symlink can be confirmed in [the rc sources](https://github.com/pytorch/pytorch/actions/runs/15892205745). ~After this change, there is still a single source of truth, which now is `docs/requirements.txt`, symlinked as `../docs/requirements.txt` from `.ci/docker/requirements-docs.txt`, which would also be invalid in a Python source distribution, but is not included in the tarball (see above). Additionally, the docs requirements that were missing from the previous tarball, are now actually included, allowing users to build the documentation again.~ @malfet clarified offline that there is a problem with the docs workflows because they use a cache with a key that includes the hash of the requirements document in the `.ci` folder, which now does no longer change when the requirements change. Hence, a different solution is needed~, though for now the problem remains~. The solution in this PR is simply to copy the actual document to replace the symlink just prior to creating the source distribution. This way, a single document needs to be maintained, git checkouts remain as they are, and the source distributions contain the before-missing document. A better solution may be implemented at a later stage with a better build system. Pull Request resolved: pytorch#157811 Approved by: https://github.com/atalman
…157811) Before this change, there was the requirements file `.ci/docker/requirements-docs.txt` which was symlinked as `../.ci/docker/requirements-docs.txt` from `docs/requirements.txt` since pytorch#151796. In this situation, [because `.ci` is excluded from the source tarball](https://github.com/pytorch/pytorch/blob/3173616532ecf0d5c0b78595d6054f1b4bd2bd75/.github/workflows/create_release.yml#L67), we end up with a broken symlink, that additionally is [invalid in a Python source distribution](https://packaging.python.org/en/latest/specifications/source-distribution-format/#unpacking-without-the-data-filter). The broken symlink can be confirmed in [the rc sources](https://github.com/pytorch/pytorch/actions/runs/15892205745). ~After this change, there is still a single source of truth, which now is `docs/requirements.txt`, symlinked as `../docs/requirements.txt` from `.ci/docker/requirements-docs.txt`, which would also be invalid in a Python source distribution, but is not included in the tarball (see above). Additionally, the docs requirements that were missing from the previous tarball, are now actually included, allowing users to build the documentation again.~ @malfet clarified offline that there is a problem with the docs workflows because they use a cache with a key that includes the hash of the requirements document in the `.ci` folder, which now does no longer change when the requirements change. Hence, a different solution is needed~, though for now the problem remains~. The solution in this PR is simply to copy the actual document to replace the symlink just prior to creating the source distribution. This way, a single document needs to be maintained, git checkouts remain as they are, and the source distributions contain the before-missing document. A better solution may be implemented at a later stage with a better build system. Pull Request resolved: pytorch#157811 Approved by: https://github.com/atalman
Before this change, there was the requirements file
.ci/docker/requirements-docs.txtwhich was symlinked as../.ci/docker/requirements-docs.txtfromdocs/requirements.txtsince #151796.In this situation, because
.ciis excluded from the source tarball, we end up with a broken symlink, that additionally is invalid in a Python source distribution.The broken symlink can be confirmed in the rc sources.
After this change, there is still a single source of truth, which now isdocs/requirements.txt, symlinked as../docs/requirements.txtfrom.ci/docker/requirements-docs.txt, which would also be invalid in a Python source distribution, but is not included in the tarball (see above). Additionally, the docs requirements that were missing from the previous tarball, are now actually included, allowing users to build the documentation again.@malfet clarified offline that there is a problem with the docs workflows because they use a cache with a key that includes the hash of the requirements document in the
.cifolder, which now does no longer change when the requirements change. Hence, a different solution is needed~, though for now the problem remains~.The solution in this PR is simply to copy the actual document to replace the symlink just prior to creating the source distribution. This way, a single document needs to be maintained, git checkouts remain as they are, and the source distributions contain the before-missing document.
A better solution may be implemented at a later stage with a better build system.
Stack from ghstack (oldest at bottom):