Page MenuHomeSoftware Heritage

deposit: initialize Sentry when gunicorn starts
ClosedPublic

Authored by vlorentz on Dec 21 2020, 1:42 PM.

Diff Detail

Repository
rSPSITE puppet-swh-site
Branch
production
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18061
Build 27889: arc lint + arc unit

Event Timeline

testing in staging with a manual change in the code to force an assertion, It works well

root@deposit:/etc/gunicorn/instances# diff -U3 /usr/lib/python3/dist-packages/swh/deposit/api/urls.py /tmp/urls.py 
--- /usr/lib/python3/dist-packages/swh/deposit/api/urls.py	2020-12-22 10:24:22.743902919 +0000
+++ /tmp/urls.py	2020-12-22 10:24:16.755645346 +0000
@@ -21,6 +21,7 @@
 
 
 def api_view(req):
+    assert False
     return render(req, "api.html")

After a restart of gunicorn,

root@deposit:/etc/gunicorn/instances# curl -v http://localhost:5006/1/
...
> GET /1/ HTTP/1.1
> Host: localhost:5006
> User-Agent: curl/7.64.0
> Accept: */*
> 
< HTTP/1.1 500 Internal Server Error
< Server: gunicorn/19.9.0
...

The exception is present on sentry : https://sentry.softwareheritage.org/share/issue/beca6637fed947dfb2ff0e592fe98e1d/

This revision is now accepted and ready to land.Dec 22 2020, 11:26 AM