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

Wrong version displayed in night builds #12349

Closed
igor-sirotin opened this issue Oct 5, 2023 · 21 comments · Fixed by #16581 or #16652
Closed

Wrong version displayed in night builds #12349

igor-sirotin opened this issue Oct 5, 2023 · 21 comments · Fixed by #16581 or #16652

Comments

@igor-sirotin
Copy link
Contributor

igor-sirotin commented Oct 5, 2023

Bug Report

Images downloaded from here: https://ci.infra.status.im/job/status-desktop/job/master/ shows 0.9.90 version instead of the actual one.

image

It seems to be coming from here:

0.9.90

@igor-sirotin igor-sirotin added the bug Something isn't working label Oct 5, 2023
@igor-sirotin igor-sirotin changed the title Invalid version displayed in night builds Wrong version displayed in night builds Oct 5, 2023
@caybro
Copy link
Member

caybro commented Oct 5, 2023

Yeah we stopped incrementing the VERSION number in master; instead the git hash should be shown... I wonder what's different here.

@jrainville
Copy link
Member

I think @caybro fixed this one lately?

@caybro
Copy link
Member

caybro commented Aug 26, 2024

I think @caybro fixed this one lately?

Yeah, fixed with this PR: #16085

@caybro
Copy link
Member

caybro commented Aug 26, 2024

Ehm, that was the status-go version; ours is (will be) still wrong probably... :/

@caybro caybro reopened this Aug 26, 2024
@caybro
Copy link
Member

caybro commented Aug 26, 2024

Either we update the VERSION file manually with each release, to be something "higher", or we need to figure out some generic "git-like version"

@caybro caybro self-assigned this Aug 26, 2024
@caybro
Copy link
Member

caybro commented Aug 26, 2024

I'll try to think about something

@igor-sirotin
Copy link
Contributor Author

I find it weird to see 2.30.90 as dev version, as it's just not true 😄
And while it's not super realistic, it is still theoretically possible to have 90 patches on release branch and eventually have a real 2.30.90 version, which would conflict.


How status-go does it

I like the simplicity of status-go about versioning. We use git describe --tags --dirty="-dirty" to automatically calculate the version from tags. This is a standard functionality of git.

EXAMPLE:

I now have v3.5.0-4-g6ee62061b, which means:

  • it's v3.5.0
  • with 4 commits on top
  • current commit it is 6ee62061b

How to apply it in desktop

We could do something similar, but there's one problem: we have vX.Y.Z tags on releases branch, not on master branch.
To fix this, as soon as the release branch is cut, we should create a tag with the next anticipated version.

And use the idea of @iurimatias of the -dev suffix.

EXAMPLE:

  • We cut release/v2.30.x
  • On the same commit, we create v2.31.0-dev (or `v2.31.0-alpha) tag

So until you cut a branch, you'll get versions like this: v2.31.0-dev-2-g6ee62061b.


What do you think?
cc @caybro @iurimatias @jrainville @osmaczko

@igor-sirotin
Copy link
Contributor Author

lol, turned out that I already proposed this in the comment above: #12349 (comment) 😄

@caybro
Copy link
Member

caybro commented Oct 25, 2024

Yeah I like the idea too, and I said it even before 😆. This will just require some manual intervention no matter what; in the end it doesn't matter much if it's editing VERSION file manually, or creating the tag

@caybro
Copy link
Member

caybro commented Oct 25, 2024

In current master:

❯ git describe --tags --dirty="-dirty"
0.6.0-6438-g016380a2bd-dirty

@caybro
Copy link
Member

caybro commented Oct 25, 2024

Oh and turns out if I do this:

❯ git describe --tags --dirty="-dev"
0.6.0-6438-g016380a2bd-dev

it will append the -dev there automatically :)

@caybro
Copy link
Member

caybro commented Oct 25, 2024

Last remark, the only thing I'm unsure (and quite frankly the only downside) is that only @iurimatias and maybe @jrainville are able to push git tags?

@caybro caybro reopened this Oct 25, 2024
@caybro caybro moved this from Done to Next in Status Desktop/Mobile Board Oct 25, 2024
@igor-sirotin
Copy link
Contributor Author

it will append the -dev there automatically :)

This just shows that you have some local uncommitted changes. -dirty makes more in this case than -dev I think.

@igor-sirotin
Copy link
Contributor Author

Last remark, the only thing I'm unsure (and quite frankly the only downside) is that only @iurimatias and maybe @jrainville are able to push git tags?

In status-go anyone can push tags. So I think it's the same in desktop.

@caybro caybro moved this from Next to In Progress in Status Desktop/Mobile Board Oct 29, 2024
caybro added a commit that referenced this issue Oct 29, 2024
caybro added a commit that referenced this issue Oct 29, 2024
- remove VERSION file
- some smaller cleanups and warning fixes

Fixes #12349
caybro added a commit that referenced this issue Oct 29, 2024
- remove VERSION file
- some smaller cleanups and warning fixes

Fixes #12349
caybro added a commit that referenced this issue Oct 29, 2024
- remove VERSION file
- some smaller cleanups and warning fixes

Fixes #12349
caybro added a commit that referenced this issue Oct 29, 2024
- remove VERSION file
- expose the `GIT_COMMIT`so that we can properly construct the web links
when the user clicks the version number in Settings/About
- some smaller cleanups and warning fixes

Fixes #12349
igor-sirotin pushed a commit that referenced this issue Nov 30, 2024
- remove VERSION file
- expose the `GIT_COMMIT`so that we can properly construct the web links
when the user clicks the version number in Settings/About
- some smaller cleanups and warning fixes

Fixes #12349
@caybro caybro moved this from Next to Code Review in Status Desktop/Mobile Board Dec 2, 2024
@jrainville jrainville modified the milestones: 2.32.0 Beta, 2.33.0 Beta Dec 4, 2024
igor-sirotin pushed a commit that referenced this issue Dec 4, 2024
- remove VERSION file
- expose the `GIT_COMMIT`so that we can properly construct the web links
when the user clicks the version number in Settings/About
- some smaller cleanups and warning fixes

Fixes #12349
@github-project-automation github-project-automation bot moved this from Code Review to Done in Status Desktop/Mobile Board Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment