-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
when building from tarball, no version number #4087
Comments
All is based upon the git repo metadata locally. All tools, CI/CD, podman and docker bake script use the same git commands to extract this information. If you fully build your self without any git metadata, i suggest to set |
I can certainly do that. It's just that I haven't changed anything on my side. I wrote a script that either builds from the tarball or the git repo at hash XXXXX. And until not too long ago, a version number was shown without having to set But I'll try to set |
Can you see if an older version tarball still works? And if so provide which works and which doesn't? |
I can try later today, but as mentioned in my previous comment, there is even an issue when building from git. |
Then i would still like to know at which point this failed, since nothing has changed in regards to this between 1.30.0 and 1.30.1. It would help if you can share the script/tooling you use to download/build this. Since all tooling i checked seems to work just fine. I even tested a |
I was able to narrow down the incorrect version info when building from git. So... If I built version 1.30.0 (at git main at that point) and then do a git pull to retrieve the latest version (at the time of this writing 1.30.1), If there is a tag, no git hash is shown in the version output. So I am not entirely sure how it comes to My build script either
and then the |
We might need to invalidate the build script output by using https://doc.rust-lang.org/cargo/reference/build-scripts.html#rerun-if-changed and pointing it to some files in the .git directory? |
btw, how do I retrieve the version via the API? |
See Line 610 in 4883650
|
no, I mean from the binary (vaultwarden server). isn't there a config endpoint or version? I can't finf it though? ./vaulwarden -v works but I want to see what is returned by the admin page. and this is done via an API, is it not? |
I tried My solution is to only build from git moving forward. In case I will ever have to use the tarball, I'll remember to set
I would suggest to point it to Shall I close this issue or do you want to keep it around for reference? |
Let's keep it open for the fix to adjust |
I just read up on But according to the documentation using rerun-if-changed will only restrict the recompilation to the change of a file or dir. Thus I doubt that setting |
Well, there wasn't a change between the latest testing and stable release. Just a tag was created, maybe that is what is the issue here? Did you do a pull with |
That's why I mentioned:
There were 4 commits between those 2 versions. Definitely changes to the source tree. But yea, your idea makes sense, but unfortunately I wasn't at |
When a checked-out repo switches to a specific tag, and that tag does not have anything else changed in the files except the tag, it could happen that the build process doesn't see any changes, while it could be that the version string needs to be different. This commit ensures that if some specific paths are changed within the .git directory, cargo will be triggered to rebuild. Fixes dani-garcia#4087
* Fix BWDC when re-run with cleared cache Using the BWDC with a cleared cache caused invited users to be converted to accepted users. The problem was a wrong check for the `restore` function. Fixes #4114 * Remove useless variable During some refactoring this seems to be overlooked. This variable gets filled but isn't used at all afterwards. Fixes #4105 * Check some `.git` paths to force a rebuild When a checked-out repo switches to a specific tag, and that tag does not have anything else changed in the files except the tag, it could happen that the build process doesn't see any changes, while it could be that the version string needs to be different. This commit ensures that if some specific paths are changed within the .git directory, cargo will be triggered to rebuild. Fixes #4087 * Do not delete dir on file delete Previously during a `delete_file` check we also tried to delete the parent directory and ignored all errors, like not being empty for example. Since this function is called `delete_file` and does not mention anything in regards to a directory i have removed that code and it will now only delete the file and leave the rest as-is. If this somehow is still needed or wanted, which i do not think we want, then we should create a new function. Fixes #4081 * Fix healthcheck when using an ENV file If someone is using a `.env` file or configured the `ENV_FILE` variable to use that as it's configuration, this was missed by the healthcheck. So, `DOMAIN` and `ROCKET_TLS` were not seen, and not used in these cases. This commit fixes this by checking for this file and if it exists, then it will load those variables first. Fixes #4112 * Add missing route While there was a function and a derive, this endpoint wasn't part of the routes. Since Bitwarden does have this endpoint ill add the route instead of deleting it. Fixes #4076 Fixes #4144 * Update crates to update the openssl crate Because of a bug in the openssl-sys crate we pinned the version to an older version. This issue has been fixed and was released 2 days ago. This commit updates the openssl crates including others. This should also fix the issues with building Vaultwarden using newer versions of LibreSSL. Fixes #4051
Subject of the issue
When I build vw from the tarball, e.g. https://github.com/dani-garcia/vaultwarden/archive/refs/tags/1.30.1.tar.gz, no version is shown in the diagnostics admin page.
build command:
cargo build --features sqlite,mysql,postgresql --release
Generate Support String
does not work either.Deployment environment
Nothing happens, when I click on
Generate Support String
. This also seems to be a regression.Install method: built from source
Clients used: admin page
Reverse proxy and version: irrelevant (but it's Apache/2.4.58)
MySQL/MariaDB or PostgreSQL irrelevant (but it's MySQL 8.0.35)
Other relevant details:
Steps to reproduce
https://vault.example.com/admin/diagnostics
Expected behaviour
Server Installed
should show the version.When clicking on
Generate Support String
, the support string should be generated.Actual behaviour
Server Installed
is empty.No support string is generated.
Troubleshooting data
The text was updated successfully, but these errors were encountered: