You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In dashboard/templates/dashboard/_footer.html the version is displayed. It uses:
defhuman_readable_git_version_number() ->str:
"""Return the git tag name (if available) or the git commit hash (if not)"""returnsubprocess.check_output(
["git", "describe", "--always", "--tags"], encoding="UTF-8"
).strip()
from dashboard/utils.py under the hood.
In our deployment only some directories are owned and/or writable by the user (for security reasons) and git describe fails:
www-py311-2024Q2% git describe --always --tags
fatal: detected dubious ownership in repository at '/usr/local/www/sites/gbif-alert'
To add an exception for this directory, call:
git config --global --add safe.directory /usr/local/www/sites/gbif-alert
Another potential issue is that subprocess.check_output forks a new process which could be an issue if many clients are hitting the frontpage at the same time
The text was updated successfully, but these errors were encountered:
Thanks @silenius, indeed I wonder for a long time is this approach is sane (ideally, even having the git repository at the deployed location shouldn't be a requirement, I think). I'll look for another approach, the good thing about this one was that it worked everywhere and was easy, but something like running that command at release time and storing its output in a text file might be better!
In
dashboard/templates/dashboard/_footer.html
the version is displayed. It uses:from
dashboard/utils.py
under the hood.In our deployment only some directories are owned and/or writable by the user (for security reasons) and git describe fails:
Another potential issue is that
subprocess.check_output
forks a new process which could be an issue if many clients are hitting the frontpage at the same timeThe text was updated successfully, but these errors were encountered: