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

Duplication of versioning #2858

Closed
lfield opened this issue Nov 30, 2018 · 8 comments · Fixed by #2861
Closed

Duplication of versioning #2858

lfield opened this issue Nov 30, 2018 · 8 comments · Fixed by #2861

Comments

@lfield
Copy link
Contributor

lfield commented Nov 30, 2018

The recent server versioning PR #2838 duplicates the functionality of generate_svn_version.sh. For example running db_dump --version on the server outputs:

2
2018-11-30 13:26:19.6759 db_dump starting
19a6483 [https://github.com/BOINC/boinc.git] (boincai05.cern.ch:/usr/local/boinc/software/boinc_src/boinc [(detached from server_release/1.0/1.0.1)])

The version should be stored on one place place and found by one mechanism. Thoughts?

@brevilo
Copy link
Contributor

brevilo commented Nov 30, 2018

I'm not sure how generate_svn_version.sh and db_dump are related but I agree with you that this feature should be centralized and not be implemented redundantly.

In fact, this is another reason to factor it out of and thus decouple it from setup_project.py (see #2838 and my comment on it).

To be honest, generate_svn_version.sh is more much along the lines of what I would expect from such a functionality than, in contrast to #2838, as it doesn't make any flawed assumptions on the repo used.

@brevilo
Copy link
Contributor

brevilo commented Nov 30, 2018

How about extending generate_svn_version.sh with the latest common server base tag detail (via git describe --abbrev=0 --match server_release/*) instead?

@lfield
Copy link
Contributor Author

lfield commented Nov 30, 2018

generate_svn_version.sh puts version.h in the source tree so as far as I understand the constant is built into the binary and is copied via install or upgrade. Adding a creating a release.inc file is sort of a similar approach. However the use of generate_svn_version.sh kind of invalidates the comment from @davidpanderson and release.inc should therefore be put in html/inc. But we could make generate_svn_version.sh put release.inc into the source tree and add it to git ignore as is done for svn_version.h.

@bema-aei
Copy link
Contributor

bema-aei commented Nov 30, 2018

First of all the 'server versioning' and generate_svn_version serve two different purposes: the server version should point to something generally understandable, like a version tag, for publication and subject to public inspection.
In contrast, generate_svn_version is mainly used to record the exact code version in the compiled binaries, thus it first and foremost gets the SHA1 from the git repo. This might be meaningless to the public when built from a private branch.
I agree, though, that having the server release (tag) recorded in the version string as well is useful. So I second Oliver in proposing to augment the version string generated in generate_svn_version with this information (if available), and maybe make get_project_config.php etc. read from that for consistency.

@brevilo
Copy link
Contributor

brevilo commented Nov 30, 2018

However the use of generate_svn_version.sh kind of invalidates the comment from @davidpanderson

Why? Doesn't he just argue to have a single file generated (e.g. in project root) and let all "consumers" use that file where needed? I share that that thought as it is what I meant by "centralized".

@lfield
Copy link
Contributor Author

lfield commented Nov 30, 2018

I guess but the C programs already have it included.

@brevilo
Copy link
Contributor

brevilo commented Nov 30, 2018

I guess but the C programs already have it included.

I can't follow. To whom is this addressed?

@lfield
Copy link
Contributor Author

lfield commented Nov 30, 2018

@brevilo and @bema-aei, please take a look at #2861.

@AenBleidd AenBleidd added this to the Server Release 1.2.0 milestone Aug 14, 2023
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.

4 participants