Skip to content

Conversation

@mayeut
Copy link
Contributor

@mayeut mayeut commented Jun 10, 2024

#267 introduced a regression in asset upload.

The layout of the artefacts to upload has changed. They're now all flatten in the working directory whereas before that PR, only the hashes.sha256 file was directly in the working directory. The change in layout caused .toString() to be called on python archives which corrupts the data that gets uploaded (as can be seen by comparing sha256 in hashes.sha256 with the ones from other uploaded assets).

This commit ensures that a "flat layout" is used and that toString() is only called for hashes.sha256.

actions#267 introduced a regression in asset upload.

The layout of the artefacts to upload has changed. They're now all flatten in the working directory whereas before that PR, only the `hashes.sha256` file was directly in the working directory.
The change in layout caused `.toString()` to be called on python archives which corrupts the data that gets uploaded (as can be seen by comparing sha256 in `hashes.sha256` with the ones from other uploaded assets).

This commit ensures that a "flat layout" is used and that `toString()` is only called for `hashes.sha256`.
@mayeut mayeut requested a review from a team as a code owner June 10, 2024 17:12
@mayeut
Copy link
Contributor Author

mayeut commented Jun 10, 2024

FYI: more debug runs in https://github.com/mayeut/python-versions/actions?query=branch%3Acheck-publish / https://github.com/mayeut/python-versions/blob/55b5d7a53a2da1db27d0bddbd86de071b9c6d8b4/.github/workflows/build-python-packages.yml#L199-L219

I'm not sure why toString() is needed in the first place but I'd rather do "same as before" rather than introduce a new regression.

A full build (including release publication) has been done, all files OK: https://github.com/mayeut/python-versions/actions/runs/9454191293

python-versions % curl -fsSLO https://github.com/mayeut/python-versions/releases/download/3.12.3-9454191293/hashes.sha256
python-versions % curl -fsSLO https://github.com/mayeut/python-versions/releases/download/3.12.3-9454191293/python-3.12.3-win32-x86.zip
python-versions % curl -fsSLO https://github.com/mayeut/python-versions/releases/download/3.12.3-9454191293/python-3.12.3-win32-x64.zip
python-versions % curl -fsSLO https://github.com/mayeut/python-versions/releases/download/3.12.3-9454191293/python-3.12.3-darwin-arm64.tar.gz
python-versions % curl -fsSLO https://github.com/mayeut/python-versions/releases/download/3.12.3-9454191293/python-3.12.3-darwin-x64.tar.gz
python-versions % curl -fsSLO https://github.com/mayeut/python-versions/releases/download/3.12.3-9454191293/python-3.12.3-linux-20.04-x64.tar.gz
python-versions % curl -fsSLO https://github.com/mayeut/python-versions/releases/download/3.12.3-9454191293/python-3.12.3-linux-22.04-x64.tar.gz
python-versions % curl -fsSLO https://github.com/mayeut/python-versions/releases/download/3.12.3-9454191293/python-3.12.3-linux-24.04-x64.tar.gz
python-versions % sha256sum -c hashes.sha256                            
python-3.12.3-darwin-arm64.tar.gz: OK
python-3.12.3-darwin-x64.tar.gz: OK
python-3.12.3-linux-20.04-x64.tar.gz: OK
python-3.12.3-linux-22.04-x64.tar.gz: OK
python-3.12.3-linux-24.04-x64.tar.gz: OK
python-3.12.3-win32-x64.zip: OK
python-3.12.3-win32-x86.zip: OK
python-versions % file python-3.12.3-*
python-3.12.3-darwin-arm64.tar.gz:    gzip compressed data, last modified: Mon Jun 10 19:13:32 2024, from Unix, original size modulo 2^32 45678592
python-3.12.3-darwin-x64.tar.gz:      gzip compressed data, last modified: Mon Jun 10 19:13:30 2024, from Unix, original size modulo 2^32 45678592
python-3.12.3-linux-20.04-x64.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 395048960
python-3.12.3-linux-22.04-x64.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 340613120
python-3.12.3-linux-24.04-x64.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 339957760
python-3.12.3-win32-x64.zip:          Zip archive data, at least v2.0 to extract, compression method=deflate
python-3.12.3-win32-x86.zip:          Zip archive data, at least v2.0 to extract, compression method=deflate

@mayeut
Copy link
Contributor Author

mayeut commented Jun 11, 2024

superseded by #286

@mayeut mayeut closed this Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant