Review getter call doesn't have a unique prefix

Bug #718898 reported by Anthony Lenton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ratings and Reviews server
Fix Released
Low
Michael Nelson

Bug Description

Our current review filter/getter api call is at
"/reviews/api/1.0/(?P<language>\w+)/(?P<origin>\w+)/(?P<distroseries>\w+)/(?P<package_name>[\w%+.;-]+)/$"
This doesn't have a unique prefix path, as there are also url patterns for /reviews/api/1.0/reviews/ and others.
With a bit of bad luck this will mean that at some point we'll be bitten by this pattern matching something we don't want it to match (get all reviews in language "reviews", origin "124", distroseries "flag"...).
Even atm, when we don't have that problem, setting up Apache to avoid redirecting the right urls to https is proving to be a chore due to this badly chosen url layout.

We should probably add a unique prefix to this call, for example,
"/reviews/api/1.0/filter/(?P<language>\w+)/(?P<origin>\w+)/(?P<distroseries>\w+)/(?P<package_name>[\w%+.;-]+)/$"
or
"/reviews/api/1.0/get_reviews/(?P<language>\w+)/(?P<origin>\w+)/(?P<distroseries>\w+)/(?P<package_name>[\w%+.;-]+)/$"
or something.

This is a backwards incompatible change, so we'll need to support the old api still for a while, until the client is updated to use the newer api.

QA Notes:
Once you're certain that the USC version you are using includes rnr-client r31, ensuring that the client still pulls reviews from the server when displaying packages demos that this is qa-ok.

Related branches

Changed in rnr-server:
importance: Undecided → Medium
tags: added: kb-task
tags: added: kb-improvement
removed: kb-task
Changed in rnr-server:
assignee: nobody → Michael Nelson (michael.nelson)
importance: Medium → Low
status: New → In Progress
Changed in rnr-server:
status: In Progress → Fix Committed
description: updated
Changed in rnr-server:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.