Merge lp://staging/~lukasz-czyzykowski/rnr-server/preflight into lp://staging/rnr-server

Proposed by Łukasz Czyżykowski
Status: Merged
Approved by: Michael Nelson
Approved revision: 140
Merged at revision: 131
Proposed branch: lp://staging/~lukasz-czyzykowski/rnr-server/preflight
Merge into: lp://staging/rnr-server
Diff against target: 298 lines (+91/-89)
10 files modified
debian/control (+2/-1)
django_project/config_dev/config/main.cfg (+1/-0)
django_project/config_dev/urls.py (+6/-0)
setup.py (+1/-0)
src/reviewsapp/preflight.py (+73/-0)
src/reviewsapp/templates/reviewsapp/versions.html (+0/-24)
src/reviewsapp/tests/__init__.py (+1/-1)
src/reviewsapp/tests/test_preflight.py (+6/-6)
src/reviewsapp/urls.py (+1/-5)
src/reviewsapp/views/versions.py (+0/-52)
To merge this branch: bzr merge lp://staging/~lukasz-czyzykowski/rnr-server/preflight
Reviewer Review Type Date Requested Status
Michael Nelson (community) Approve
Review via email: mp+50941@code.staging.launchpad.net

Commit message

Replace /versions/ view with /preflight/ introducing django-preflight as a dependency.

Description of the change

Overview
========
This branch adds a /preflight/ page which replaces /versions/.

Details
=======
This branch adds django-preflight powered page which, besides showing what was previously displayed on /versions/ page, also checks that API access is configured properly. Two checked items are:

- SSO APIUser access
- Anonymous Launchpad API access

In both cases the actual checks try to fetch a piece of data from the services. SSO check pulls list of tokens (using ``authentications.list_tokens()`` call) with obviously wrong consumer key, that way, the list will be always empty but the call will only succeed when the credentials are correct.

Similarly with Launchpad API, it pulls details of bug with id=1 and makes sure that at least that item is correct.

Additionally this branch removes now unnecessary /versions/ view. Both the python code and template were removed. The test was retrofitted to check access to new preflight page.

Testing
=======
To test this branch follow instructions in ``README`` file and then run ``make test``.

To post a comment you must log in.
140. By Łukasz Czyżykowski

Added django-preflight as a debian package dependency.

Revision history for this message
Michael Nelson (michael.nelson) wrote :

Great stuff!

{{{
16:46 < lukasz> noodles, https://code.edge.launchpad.net/~lukasz-czyzykowski/rnr-server/preflight/+merge/50941
16:46 < noodles> hah! Great timing :)
16:46 < lukasz> I know :)
16:48 < noodles> lukasz: **nice** MP - I love actually understanding exactly what the MP is about before looking at the code :)
16:48 * dsowen looks at the mp
16:48 < lukasz> noodles, taking an example from your MPs
16:50 < noodles> lukasz: how will we get preflight on the servers - have you already packaged it in our PPA? If so, should we update the debian requires?
16:50 < lukasz> noodles, also, since I've discovered bzr lp-propose-merge I can write them in emacs
16:51 < lukasz> noodles, yes, django-preflight is packaged
16:51 < lukasz> although only in daily ppa
16:51 < lukasz> I can copy a package to isd ppa right away
16:52 < lukasz> noodles, updated control file and pushed
16:56 < noodles> lukasz: great - thanks. I haven't run the tests or run it locally, but in the interest of speed, I'll trust you've done that and approve :)
16:56 < noodles> lukasz: the rnr-configs branch will need updating too right? (for the url)
}}}

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches