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

fix[ci]: fix commithash calculation for pypi release #4309

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

charles-cooper
Copy link
Member

@charles-cooper charles-cooper commented Oct 15, 2024

What I did

fix #4308

How I did it

How to verify it

Commit message

there is a mismatch between the commit hash in the binary of the github
release vs the pypi release. for example,
```bash
~ $ vyper --version  # pipx install vyper==0.4.0
0.4.0+commit.e9db8d9
```
```bash
~ $ .vvm/vyper-0.4.0 --version
0.4.0+commit.e9db8d9f
```

this is due to how git computes the shorthash. when checkout is run for
release-pypi.yml, it doesn't fetch the full commit history, and so there
are fewer commits, so `git rev-parse --short HEAD` returns a smaller
fingerprint for the commit hash.

this commit amends the pypi release checkout step so that it matches the
github release workflow.

it also adds a debug step to the relevant workflows so that we can debug
the commit hash during the github action.

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

there is a mismatch between the commit hash in the binary of the github
release vs the pypi release. for example,
```bash
~ $ vyper --version  # pipx install vyper==0.4.0
0.4.0+commit.e9db8d9
```
```bash
~ $ .vvm/vyper-0.4.0 --version
0.4.0+commit.e9db8d9f
```

this is due to how git computes the shorthash. when checkout is run for
release-pypi.yml, it doesn't fetch the full commit history, and so there
are fewer commits, so `git rev-parse --short HEAD` returns a smaller
fingerprint for the commit hash.

this commit amends the pypi release checkout step so that it matches the
github release workflow.
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.12%. Comparing base (a70a024) to head (bd5b4f1).
Report is 6 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (a70a024) and HEAD (bd5b4f1). Click for more details.

HEAD has 138 uploads less than BASE
Flag BASE (a70a024) HEAD (bd5b4f1)
139 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4309       +/-   ##
===========================================
- Coverage   91.40%   46.12%   -45.29%     
===========================================
  Files         112      112               
  Lines       15917    15923        +6     
  Branches     2693     2693               
===========================================
- Hits        14549     7344     -7205     
- Misses        934     8025     +7091     
- Partials      434      554      +120     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@pcaversaccio pcaversaccio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend maybe making a special test release called 0.4.0.post1 (it's PEP 440 compatible) on TestPyPI and make a local test as well. I know, they might prune some accounts periodically (see here), but it's a special situation. That's also how I do test my snekmate CI release pipeline here.

@charles-cooper charles-cooper merged commit 039d369 into vyperlang:master Oct 15, 2024
157 of 158 checks passed
@charles-cooper charles-cooper deleted the fix/pip-commit-hash branch October 15, 2024 17:03
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.

Version string inconsistent depending on installation method
4 participants