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

Different hash (length) in generated name #1052

Open
senysenyseny16 opened this issue Jun 25, 2024 · 6 comments
Open

Different hash (length) in generated name #1052

senysenyseny16 opened this issue Jun 25, 2024 · 6 comments

Comments

@senysenyseny16
Copy link

Wheels are built in the same environment, periodically some of the wheels have a different hash, differing in length by one digit.

package_name-3.7.2.dev52+g84cda2814-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
package_name-3.7.2.dev52+g84cda281-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
package_name-3.7.2.dev52+g84cda281-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
g84cda281   [3.9, 3.10]
g84cda2814  [3.8]

version: latest

@RonnyPfannschmidt
Copy link
Contributor

What git versions are the different builders using

It may be necessary to as always use the long describe

@senysenyseny16
Copy link
Author

All three wheels are built in the same image with the same version of Git:

❯ docker run -it --rm quay.io/pypa/manylinux2014_x86_64
[root@b9d0ea36c864 /]# git --version
git version 2.45.2

From build to build, the incorrect names change for different versions of Python.

@RonnyPfannschmidt
Copy link
Contributor

Thanks for the details, it seems like we hit a non-deterministic case in git and need to ensure a consistent minimum length

@shenxianpeng
Copy link
Contributor

shenxianpeng commented Jul 9, 2024

I tried to reproduce it on Python 3.8, 3.9, and 3.10 using this image quay.io/pypa/manylinux2014_x86_64, but it didn't reproduce. Did I miss something?

Click to see the reproduce outputs
(venv) sxp@pc ~/test (main)> docker run -it --rm quay.io/pypa/manylinux2014_x86_64
[root@5af35412ad10 /]# cd home/
[root@5af35412ad10 home]# ls
[root@5af35412ad10 home]# git clone https://github.com/shenxianpeng/test_setuptools_scm_1052.git
Cloning into 'test_setuptools_scm_1052'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 6 (delta 0), reused 6 (delta 0), pack-reused 0
Receiving objects: 100% (6/6), done.
[root@5af35412ad10 home]# cd test_setuptools_scm_1052/
[root@5af35412ad10 test_setuptools_scm_1052]# git --version
git version 2.45.2

#
# test with Python 3.8
# 
[root@5af35412ad10 test_setuptools_scm_1052]# python3.8 -m venv 38venv
[root@5af35412ad10 test_setuptools_scm_1052]# source 38venv/bin/activate
(38venv) [root@5af35412ad10 test_setuptools_scm_1052]# python3 -V
Python 3.8.19
(38venv) [root@5af35412ad10 test_setuptools_scm_1052]# pip install -e .
Obtaining file:///home/test_setuptools_scm_1052
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: test_issue
  Building editable for test_issue (pyproject.toml) ... done
  Created wheel for test_issue: filename=test_issue-0.1.dev1+g04e93a2-0.editable-py3-none-any.whl size=2842 sha256=1342767a78318fed8aaca41fe217c51aa553ef87e6bbc43afb015b0700a56ef0
  Stored in directory: /tmp/pip-ephem-wheel-cache-80hha3gn/wheels/62/d0/0e/44193a61fd339ff14753364905482ef08cddea9ea81763ac72
Successfully built test_issue
Installing collected packages: test_issue
Successfully installed test_issue-0.1.dev1+g04e93a2

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

#
# test with Python 3.9
# 
(38venv) [root@5af35412ad10 test_setuptools_scm_1052]# python3.9 -m venv 39venv
(38venv) [root@5af35412ad10 test_setuptools_scm_1052]# source 39venv/bin/activate
(39venv) [root@5af35412ad10 test_setuptools_scm_1052]# python3 -V
Python 3.9.19
(39venv) [root@5af35412ad10 test_setuptools_scm_1052]# pip install -e .
Obtaining file:///home/test_setuptools_scm_1052
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: test_issue
  Building editable for test_issue (pyproject.toml) ... done
  Created wheel for test_issue: filename=test_issue-0.1.dev1+g04e93a2-0.editable-py3-none-any.whl size=2842 sha256=a25d13987938686db91e3dda51b874d027d35dc587921982f064568794c7439c
  Stored in directory: /tmp/pip-ephem-wheel-cache-v71i4s1o/wheels/ee/72/cb/e0bdaf0973e29187ccdce5437d9651c56c0f8d28a9b179a13a
Successfully built test_issue
Installing collected packages: test_issue
Successfully installed test_issue-0.1.dev1+g04e93a2

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

#
# test with Python 3.10
# 
(39venv) [root@5af35412ad10 test_setuptools_scm_1052]# python3.10 -m venv 310venv
(39venv) [root@5af35412ad10 test_setuptools_scm_1052]# source 310venv/bin/activate
(310venv) [root@5af35412ad10 test_setuptools_scm_1052]# python3 -V
Python 3.10.14
(310venv) [root@5af35412ad10 test_setuptools_scm_1052]# pip install -e .
Obtaining file:///home/test_setuptools_scm_1052
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
Building wheels for collected packages: test_issue
  Building editable for test_issue (pyproject.toml) ... done
  Created wheel for test_issue: filename=test_issue-0.1.dev1+g04e93a2-0.editable-py3-none-any.whl size=2842 sha256=a68a5d790b670024182ba7520c7731b891e1be3657830ccd4ca396870d5647a5
  Stored in directory: /tmp/pip-ephem-wheel-cache-5_gis1by/wheels/26/26/88/98aee2f877ce57050772b31f5f64d1c54af27c37d1f608a8b2
Successfully built test_issue
Installing collected packages: test_issue
Successfully installed test_issue-0.1.dev1+g04e93a2

[notice] A new release of pip is available: 23.0.1 -> 24.1.2
(310venv) [root@5af35412ad10 test_setuptools_scm_1052]#

@senysenyseny16
Copy link
Author

hi @shenxianpeng

I tried to look into this a little deeper and discovered that a different name is generated by unique runner from the entire set of runners in our CI. What can I do to help reproduce the problem?

@RonnyPfannschmidt
Copy link
Contributor

I believe the safest way is to go for full nodes anytime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants