Skip to content
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

Clean build is failing due to missing hash associated with python-extension-manager-ssl-requirements #7112

Closed
jcfr opened this issue Jul 20, 2023 · 3 comments · Fixed by #7113
Assignees
Labels
Type: Bug Something isn't working correctly
Milestone

Comments

@jcfr
Copy link
Member

jcfr commented Jul 20, 2023

Summary

Following the integration of #7046, build has been failing on macOS, Linux and Windows with an error like the following:

  1 ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
  2     pyjwt[crypto]>=2.4.0 from https://files.pythonhosted.org/packages/2b/4f/e04a8067c7c96c364cef7ef73906504e2f40d690811c021e1a1901473a19/PyJWT-2.8.0-py3-none-any.whl (from PyGithub==1.59.0->-r /work/    Preview/Slicer-0-build/python-extension-manager-ssl-requirements-requirements.txt (line 85))

Since at the same time the preview build was failing due to an unrelated error, we missed the failure:

Steps to reproduce

Currently looking into this. Since prior integrating #7046, the build completed1 locally without errors after removing the python-* directories, looking into how it can be reproduced.

Update: See #7112 (comment)

Expected behavior

No failure

Environment

  • Slicer version: 7d58308
  • Operating system: Windows / Linux / Mac

References

Footnotes

  1. https://github.com/Slicer/Slicer/pull/7046#issuecomment-1636780063

@jcfr jcfr added the Type: Bug Something isn't working correctly label Jul 20, 2023
@jcfr jcfr added this to the Slicer 5.3 milestone Jul 20, 2023
@jcfr jcfr self-assigned this Jul 20, 2023
@jcfr
Copy link
Member Author

jcfr commented Jul 20, 2023

After running VERBOSE=1 make python-extension-manager-ssl-requirements/fast -B, we can extract the command installing the requirements:

CMAKE=/home/jcfr/Support/cmake-3.22.2-linux-x86_64/bin/cmake
SLICER_BUILD_DIR=/home/jcfr/Projects/Slicer-Release

${CMAKE} \
  -P ${SLICER_BUILD_DIR}/python-extension-manager-ssl-requirements-prefix/src/python-extension-manager-ssl-requirements-stamp/python-extension-manager-ssl-requirements-install-Release.cmake

and observe it locally output the following

-- python-extension-manager-ssl-requirements install command succeeded.  See also /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-prefix/src/python-extension-manager-ssl-requirements-stamp/python-extension-manager-ssl-requirements-install-*.log

Looking at python-extension-manager-ssl-requirements-install-Release.cmake, we can then extract the pip install command:

SLICER_BUILD_DIR=/home/jcfr/Projects/Slicer-Release

${SLICER_BUILD_DIR}/python-install/bin/PythonSlicer \
-m pip install \
  --require-hashes \
  -r ${SLICER_BUILD_DIR}/python-extension-manager-ssl-requirements-requirements.txt

and observe it locally output the following

Requirement already satisfied: cryptography==41.0.1 in ./python-install/lib/python3.9/site-packages (from -r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 12)) (41.0.1)
Requirement already satisfied: PyJWT==2.7.0 in ./python-install/lib/python3.9/site-packages (from -r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 23)) (2.7.0)
Requirement already satisfied: wrapt==1.15.0 in ./python-install/lib/python3.9/site-packages (from -r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 35)) (1.15.0)
Requirement already satisfied: Deprecated==1.2.14 in ./python-install/lib/python3.9/site-packages (from -r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 45)) (1.2.14)
Requirement already satisfied: pycparser==2.21 in ./python-install/lib/python3.9/site-packages (from -r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 48)) (2.21)
Requirement already satisfied: cffi==1.15.1 in ./python-install/lib/python3.9/site-packages (from -r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 58)) (1.15.1)
Requirement already satisfied: PyNaCl==1.5.0 in ./python-install/lib/python3.9/site-packages (from -r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 75)) (1.5.0)
Requirement already satisfied: PyGithub==1.59.0 in ./python-install/lib/python3.9/site-packages (from -r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 85)) (1.59.0)
Requirement already satisfied: requests>=2.14.0 in ./python-install/lib/python3.9/site-packages (from PyGithub==1.59.0->-r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 85)) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in ./python-install/lib/python3.9/site-packages (from requests>=2.14.0->PyGithub==1.59.0->-r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 85)) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in ./python-install/lib/python3.9/site-packages (from requests>=2.14.0->PyGithub==1.59.0->-r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 85)) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./python-install/lib/python3.9/site-packages (from requests>=2.14.0->PyGithub==1.59.0->-r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 85)) (2.0.3)
Requirement already satisfied: certifi>=2017.4.17 in ./python-install/lib/python3.9/site-packages (from requests>=2.14.0->PyGithub==1.59.0->-r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 85)) (2023.5.7)

[notice] A new release of pip is available: 23.1.2 -> 23.2
[notice] To update, run: pip install --upgrade pip

@jcfr
Copy link
Member Author

jcfr commented Jul 20, 2023

After locally removing these files, I am able to reproduce the issue:

SLICER_BUILD_DIR=/home/jcfr/Projects/Slicer-Release

rm -rf \
  ${SLICER_BUILD_DIR}/python-install/lib/python3.9/site-packages/PyJWT-2.7.0.dist-info/ \
  ${SLICER_BUILD_DIR}/python-install/lib/python3.9/site-packages/jwt/

... and it reports:

ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    pyjwt[crypto]>=2.4.0 from https://files.pythonhosted.org/packages/2b/4f/e04a8067c7c96c364cef7ef73906504e2f40d690811c021e1a1901473a19/PyJWT-2.8.0-py3-none-any.whl (from PyGithub==1.59.0->-r /home/jcfr/Projects/Slicer-Release/python-extension-manager-ssl-requirements-requirements.txt (line 85))

@jcfr
Copy link
Member Author

jcfr commented Jul 20, 2023

For reference, the need for specifying [crypto] was introduced in the following pull request:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working correctly
Development

Successfully merging a pull request may close this issue.

1 participant