ITADN

VCS hash on lock create differs from VCS hash on lock consume.

#3148Closedjsirois 创建于 2026-04-14
bug
J
jsiroiscommented
This is specifically for the case where: 1. The `--avoid-downloads` flag is active for `pex3 lock create` (the default for modern Pip). 2. The VCS repo contains symlinks. When both are true, a bug in Pex VCS hashing is exposed that causes the hash of a VCS checkout to differ from the hash of that same VCS checkout zipped up by Pip. Repro case: ```console :; pex3 lock create --python python3.12 "nautobot @ git+https://github.com/utsc-networking/nautobot@utsc-custom" --intransitive --indent 2 -o lock.avoid-downloads.json --avoid-downloads :; pex3 lock create --python python3.12 "nautobot @ git+https://github.com/utsc-networking/nautobot@utsc-custom" --intransitive --indent 2 -o lock.no-avoid-downloads.json --no-avoid-downloads :; diff lock.avoid-downloads.json lock.no-avoid-downloads.json 17c17 < "hash": "814aa5468450b3a9d7a6d7c5e217b915ef8ae541e259c76f9204d136d88150e5", --- > "hash": "4ea93d4a93006bd293a618c24f4c77c1cfb669f80f2a3596be3778660bcb6e06", :; pex --python python3.12 --lock lock.no-avoid-downloads.json --intransitive -o example.pex example.pex :; pex --python python3.12 --lock lock.avoid-downloads.json --intransitive -o example.pex There was 1 error downloading required artifacts: 1. nautobot 2.4.2 from git+https://github.com/utsc-networking/nautobot@utsc-custom Expected sha256 hash of 814aa5468450b3a9d7a6d7c5e217b915ef8ae541e259c76f9204d136d88150e5 when downloading nautobot but hashed to 4ea93d4a93006bd293a618c24f4c77c1cfb669f80f2a3596be3778660bcb6e06. ```
关闭于 2026-04-15 0 条评论