Page MenuHomeSoftware Heritage

rpc-server: Use directly the package's server module to start server
ClosedPublic

Authored by ardumont on Oct 10 2019, 5:32 AM.

Details

Reviewers
douardda
vlorentz
anlambert
Group Reviewers
Reviewers
Summary

This stops using the wsgi module indirection. Which caused unneeded
complication [1].

I think those modules were to match what we do for deposit and swh-web (django apps).
Because django's doc mentions wsgi modules [2] [3]

So, in the end, it's not necessary to follow that convention here. That
introduces indirection and unneeded state (which can cause problem).

This will allow for the respective python3 packages to drop that unnecessary module (which is wip on my machine right now).

[1] Related D2101#48716

[2] https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/gunicorn/

[2] https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/

Test Plan

staging:

  • apply the diff's content
  • restart the impacted services
  • everything is fine

Diff Detail

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

Event Timeline

ardumont edited the summary of this revision. (Show Details)
ardumont edited the summary of this revision. (Show Details)
ardumont added a reviewer: anlambert.
  • deposit/webapp: Use django core's wsgi application to start server
This revision is now accepted and ready to land.Oct 10 2019, 10:42 AM

Forgot to plug back the diff from staging to production prior to push, so it landed but it's not detected here.

Related f147893
Related bd1e402

site-modules/profile/manifests/swh/deploy/webapp.pp
113

Beware the missing environment variable DJANGO_SETTINGS_MODULE...
It's expected here as it's not declared here because the old wsgi module set it (which it should have not).
Check the deposit example higher up in the diff.