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

More consistent version numbers #187

Closed
3 tasks
jakezhu9 opened this issue Mar 10, 2023 · 5 comments · Fixed by #190
Closed
3 tasks

More consistent version numbers #187

jakezhu9 opened this issue Mar 10, 2023 · 5 comments · Fixed by #190

Comments

@jakezhu9
Copy link
Member

jakezhu9 commented Mar 10, 2023

Your current Sonic version

latest

Describe this feature

I noticed that Sonic has different version numbers in different places, which can be confusing:

What I expected:

  • all version numbers should be consistent
  • the version number in the README should be up to date.
  • new version check and auto-updates (if possible)
@1379
Copy link
Contributor

1379 commented Mar 10, 2023

Very good question, which also shows that you are very attentive!

  • In REAME:
    The version number here is older. Now the new release of sonic is actually to create a tag in Github, and then the automation action will compile a corresponding release product. The problem is that the release page has released a new version, and the version number in README has not been updated. This should be an oversight. But I think the best way is to use a script to automatically install sonic, so that there is no need to write the version number in REAME.

  • In setup page:
    The version number here is defined in js in halo's console project, which is used for automatic update. I did not change the version number when fork the console project. The reasons will be discussed below

  • In admin page:
    This is a bug. The version number of sonic should be displayed here. But I want to show the version of Golang on this page at the same time, so there is confusion between the two field.

  • In Github release:
    Here is the real version number. And the reason why these versions are Pre-release is that I think there are many bugs at present and do not recommend using them(Their version number may be more appropriate from 0.0.x,and use alpha, beta, rc, and stable to distinguish). But now the basic functions are available, so I think we may release an official version

all version numbers should be consistent
the version number in the README should be up to date.
new version check and auto-updates (if possible)

I quite agree with you!

I think the best way may be as follows:

  1. Define a version constant in the backend service

  2. Return this version number to the front end

  3. The front end compares the version number with the latest release version of Github obtained, and then prompts to upgrade

  4. When using Github to release a new version, the Github action should automatically update the version number defined in the back-end code

  5. Provide automatic installation script, which can automatically obtain the latest version in github release, so that we don't need to write the version number in readme, and can avoid the trouble of updating README every time a new version is released

So, what do you think of the methods I put forward

@jakezhu9
Copy link
Member Author

Awesome! Thank you for your response, and the proposed methods are definitely good.

This is a bug. The version number of sonic should be displayed here. But I want to show the version of Golang on this page at the same time, so there is confusion between the two field.

I think there is no need to show the go version since it's defined in the build script. it rarely changes and is not the cause of bugs in most cases. Of course, if you really want to display it, it's okay to add a new field.

But now the basic functions are available, so I think we may release an official version

Agreed. I'm looking forward to it!

When using Github to release a new version, the Github action should automatically update the version number defined in the back-end code

That's what I think! We can use ldflags -X with go build to write version information into the variable.

Provide automatic installation script

Good idea! But implementing it may be a bit complex if we want users with different OS and architectures to use it. My original thought is to simply replace it with https://github.com/go-sonic/sonic/releases/latest/download/sonic-linux-amd64.zip, a link that always download the latest release (exclude pre-release so it's 404 now)

@1379
Copy link
Contributor

1379 commented Mar 11, 2023

I have replaced the links in README, but other methods need to be done for a long time,especially the front-end part

@1379
Copy link
Contributor

1379 commented Apr 24, 2023

It seems that we have solved this problem? :) @jakezhu9

@jakezhu9
Copy link
Member Author

yes!

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 a pull request may close this issue.

2 participants