Differences between revisions 9 and 10
Revision 9 as of 2015-08-27 14:06:35
Size: 5186
Editor: ?MattSingleton
Comment:
Revision 10 as of 2015-08-27 22:51:37
Size: 5210
Comment:
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
||<rowstyle="background-color: #F5F6F7;"> /package/ ||<|14 style="vertical-align:middle;text-align:left"> package.py || ||
||<rowstyle="background-color: #F5F6F7;"> /package/{source}/ || ||
||<rowstyle="background-color: #F5F6F7;"> /package/{source}/{version}/ || ||
||<rowstyle="background-color: #F5F6F7;"> /package/ ||<|14 style="vertical-align:middle;text-align:left"> package.py || orestis ||
||<rowstyle="background-color: #F5F6F7;"> /package/{source}/ || orestis ||
||<rowstyle="background-color: #F5F6F7;"> /package/{source}/{version}/ || orestis ||

Summary

Repo

https://anonscm.debian.org/cgit/py3porters/snapshot.debian.org.git

Clone

$ git clone ssh://<user>@anonscm.debian.org/git/py3porters/snapshot.debian.org.git

Who's doing what

Shared Infrastructure

Task

Name (IRC)

Notes

Port DB layer

Matt Singleton (xcolour)

Just a quick hackjob to get it working. Will need proper connection pooling.

Routes

Route

View

Name (IRC)

/error/{action}

error.py

/error/{action}/{id}

/

root.py

Matt (xcolour)

/oldnews

Matt (xcolour)

/archive/

archive.py

Matt (xcolour)

/archive/{archive}/

Matt (xcolour)

/archive/{archive}/{date}/

Matt (xcolour)

/archive/{archive}/{date}/*url

Matt (xcolour)

/file/{hash}

Matt (xcolour)

/package/

package.py

orestis

/package/{source}/

orestis

/package/{source}/{version}/

orestis

/binary/

/binary/{binary}/

/mr/package/

/mr/package/{source}/

/mr/package/{source}/{version}/srcfiles

/mr/package/{source}/{version}/binpackages

/mr/package/{source}/{version}/binfiles/{binary}/{binary_version}

/mr/package/{source}/{version}/allfiles

/mr/binary/{binary}/

/mr/binary/{binary}/{binary_version}/binfiles

/mr/file/{hash}/info

/removal/

removal.py

/removal/{id}

/project/trace/

misc.py

Outstanding Questions

  • Mako or Jinja2? Jinja2! (decided by fiat due to lack of interest)

    • There will be a fair amount of rewriting either way since the way Flask and Pylons expose variables to the templates differs fairly significantly. May be worth going to extra mile to port to Jinja2 since that's the Flask Way. The syntax isn't too different.
    • Mako
      • Pro: Existing app uses Mako
      • Pro: Not going anywhere (used by Reddit)
      • Con: Requires a Flask addon
    • Jinja2:
      • Pro: Flask's default template language
      • Con: Would have to port template code

Tasks

  • Set up Flask shell app

  • Answer outstanding questions

  • Get current app running in a dev environment

    • This will give us something to compare the new app to and a local database to work against
  • Port DB layer
    • Probably makes sense for one person to get this going first
  • Divide up the controllers and start porting!

Running the Legacy App

Get postgres:
 sudo apt-get install postgresql-9.4 postgresql-9.4-debversion postgresql-plperl-9.4
 (On wheezy use 9.1 instead.)

and create users:
 sudo -u postgres createuser -P snapshot
 sudo -u postgres createuser -P guest  # I used 'guest' as password.

Fetch a tiny sample database dump (630k) from
 https://www.palfrader.org/volatile/2015-04-21-03Yx375znrU/snapshottst.xz
and have it create and populate the database.

 xzcat snapshottst.xz | sudo -u postgres psql


To get the current pylons code to work:

Configure database info in development.ini.  Here's mine:
 https://www.palfrader.org/volatile/2015-04-21-59ylxSmijic/development.ini

and run
 paster serve --reload development.ini
} Starting subprocess with file monitor
} Starting server in PID 1696.
} serving on http://127.0.0.1:5002

visit http://127.0.0.1:5002