Fix sentry reporting to use git sha for release

If there's no version (tag name), use the git commit sha as the release
in sentry reporting. This makes it easier to figure out bugs when we're
auto-deploying to stage when things land in the master branch.
This commit is contained in:
Will Kahn-Greene
2019-10-21 20:22:11 -04:00
parent 53c4ab5692
commit 586c7749ad
2 changed files with 5 additions and 5 deletions

View File

@@ -89,7 +89,8 @@ def configure_raven(transport=None, _client=None):
dsn = settings("sentry_dsn")
klass = DebugRavenClient if not dsn else RavenClient
release = version_info()["tag"]
info = version_info()
release = info.get("version") or info.get("commit") or "unknown"
client = klass(dsn=dsn, transport=transport, release=release)
return client

View File

@@ -1,7 +1,6 @@
{
"build": null,
"commit": "HEAD",
"source": "https://github.com/mozilla/ichnaea",
"tag": "master",
"version": "dev"
"version": "unknown",
"commit": "HEAD",
"build": "unknown"
}