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

adjust workspace_status to respect tags #9726

Merged
merged 2 commits into from Feb 13, 2024
Merged

adjust workspace_status to respect tags #9726

merged 2 commits into from Feb 13, 2024

Conversation

jrockway
Copy link
Member

@jrockway jrockway commented Feb 12, 2024

This is somewhat hairy. I tested against master (2.10.0-pre.g1828ed42e4) and v2.9.0-rc.1. In the case where HEAD isn't an exact tag, we fall back to the 2.10.0 + pre.gXXXXXX. In the case where HEAD is an exact tag, we strip off the v and split at the first -; v2.9.0-rc.1 becomes APP_VERSION 2.9.0 ADDITIONAL_VERSION -rc.1.

Some attention is paid to the status of the working copy. As you edit the code, you create new versions, but git has no way to know this. Prior to this commit, we just tacked on "dirty", but that means when you have a dirty version running and want to re-push, the version checking logic in pachdev can't know if the new code is running or not. For that reason, the "dirty" annotation is now the first 10 bytes of the sha256 of the diffs. It sounds crazy, but basically only changes when you edit stuff, so should result in perfect fidelity. It's also not noticeably slow on my machine.

I think this is the algorithm we want.

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1b87d37) 59.34% compared to head (09a4119) 59.23%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9726      +/-   ##
==========================================
- Coverage   59.34%   59.23%   -0.12%     
==========================================
  Files         583      583              
  Lines       71139    71139              
==========================================
- Hits        42220    42136      -84     
- Misses      28295    28391      +96     
+ Partials      624      612      -12     

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

Copy link
Contributor

@molinamelendezj molinamelendezj left a comment

Choose a reason for hiding this comment

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

and this is so it wont show 0.0.0-sha anymore right.

@jrockway jrockway merged commit 1b25a53 into master Feb 13, 2024
21 checks passed
@jrockway jrockway deleted the jonathan/version branch February 13, 2024 21:01
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.

None yet

2 participants