Correct update URLs (just take them from Bodhi API)
ClosedPublic

Authored by adamwill on Nov 8 2016, 11:33 PM.

Details

Summary

We currently try to figure out the correct URL for updates by
ourselves, which is finicky and vulnerable to changes in Bodhi.
For example, right now the URLs are wrong because the Bodhi
base URL is just 'https://bodhi.fedoraproject.org/' and the
correct update URL form is '(base_url)updates/(updateid)' but
we're not including the 'updates/' part, I guess because it
wasn't needed with the old Bodhi base URL.

Instead of tweaking our URL construction code, let's just throw
it out and get the update URL from Bodhi now it provides one,
which should be both easier and safer. I've checked that if you
use a non-default Bodhi base URL, the API uses that base URL for
the update's url property - that is, if you run against staging,
you do get a url that starts with
'https://bodhi.stg.fedoraproject.org'. So this should be fine.

Test Plan

Run a test instance without the fix, try to click on
an update link, notice it's 404. Run a test instance with the
fix, try to click on an update link, it should work.

Diff Detail

Repository
rBLKR blockerbugs
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to Correct update URLs (just take them from Bodhi API).Nov 8 2016, 11:33 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: tflink, mkrizek.
mkrizek accepted this revision.Nov 11 2016, 8:47 AM

Works, LGTM.

This revision is now accepted and ready to land.Nov 11 2016, 8:47 AM
This revision was automatically updated to reflect the committed changes.