Page MenuHomeSoftware Heritage

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

Authored by ardumont on Thu, Oct 10, 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 created this revision.Thu, Oct 10, 5:32 AM
ardumont edited the summary of this revision. (Show Details)
ardumont edited the summary of this revision. (Show Details)
ardumont added a reviewer: anlambert.
ardumont updated this revision to Diff 7069.Thu, Oct 10, 10:36 AM
  • deposit/webapp: Use django core's wsgi application to start server
vlorentz accepted this revision.Thu, Oct 10, 10:42 AM
This revision is now accepted and ready to land.Thu, Oct 10, 10:42 AM
ardumont closed this revision.Thu, Oct 10, 10:52 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

ardumont added inline comments.Tue, Oct 15, 10:05 AM
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.