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

Open
igor-sirotin opened this issue Oct 5, 2023 · 21 comments · Fixed by #16581 · May be fixed by #16652
Open

Wrong version displayed in night builds #12349

igor-sirotin opened this issue Oct 5, 2023 · 21 comments · Fixed by #16581 · May be fixed by #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

@caybro
Copy link
Member

caybro commented Aug 28, 2024

❯ git describe --tags --dirty="-dirty"
0.6.0-6149-gace5d0f9fb-dirty

Oh, I guess that's because we have release tags in release branches. So on master branch we don't have any latest tags 🤔 Not sure what's the right way to do it then.

Yeah, manually tagging master after each release, or manually increasing the VERSION number; I don't see much difference tbh 😄

@igor-sirotin
Copy link
Contributor Author

Yeah, manually tagging master after each release

Something like this, yes. When starting a release/2.N.x branch, we could create a v2.(N+1).0-dev.0 tag on the next commit in the develop branch. Because from that point we're working on 2.(N+1) version.

Something like this, but needs to be tested. And also this sounds a bit overcomplicated :D

It will be a manual process, but I don't think that's a problem.

@caybro caybro moved this from Next to In Progress in Status Desktop/Mobile Board Oct 23, 2024
caybro added a commit that referenced this issue Oct 23, 2024
- master should always have an up-to-date version, greater than the
current stable version
- for now this is 2.30.90; as 2.30 gets released, we bump it again to
2.31.90, and so on

Fixes #12349
@caybro caybro linked a pull request Oct 23, 2024 that will close this issue
2 tasks
@caybro caybro moved this from In Progress to Code Review in Status Desktop/Mobile Board Oct 23, 2024
@caybro caybro closed this as completed in 5d852b3 Oct 24, 2024
@github-project-automation github-project-automation bot moved this from Code Review to Done in Status Desktop/Mobile Board Oct 24, 2024
@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 caybro linked a pull request Oct 29, 2024 that will close this issue
2 tasks
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment