bodhi_utils: use Bodhi2Client explicitely
ClosedPublic

Authored by kparal on Aug 19 2015, 11:00 AM.

Details

Summary

This partially reverts 206ba5f1c. It uses a simpler approach - create
Bodhi2Client directly. The API has changed, so we wouldn't be able to
support Bodhi1 anyway. And this is a simple change which doesn't
complicate our BodhiUtils code as much as the aforementioned commit.

Please note that I've created a ticket asking for simplification in the python-fedora library itself:
https://github.com/fedora-infra/bodhi/issues/183
But even if BodhiClient itself gets rid of the version detection logic, it still seems reasonable to rely on an explicitely version class in the future, so it might not change much for us.

This clashes a bit with D511 (currently in review, some of those changes won't be needed anymore).

Test Plan

test suite works, upgradepath as well, but it hard to test because none of the builds are found in the staging instance

Diff Detail

Repository
rLTRN libtaskotron
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kparal retitled this revision from to bodhi_utils: use Bodhi2Client explicitely.Aug 19 2015, 11:00 AM
kparal updated this object.
kparal edited the test plan for this revision. (Show Details)
kparal added reviewers: tflink, jskladan, lbrabec.
tflink added a subscriber: lmacken.Aug 19 2015, 1:57 PM

I talked to @lmacken about this yesterday and the Bodhi2Client class is going away after the migration (becoming BodhiClient, removing the Bodhi1Client class), so I'm not sure it's a good idea to explicitly use it if we have no idea when it would go away. I probably would have written the patch this way otherwise.

If the Bodhi2Client class is not going away, I agree this is a simpler approach. If it is going away, an alternative approach would be to remove the @property stuff once the Bodhi2Client class has disappeared from python-fedora.

tflink accepted this revision.Aug 19 2015, 2:29 PM
This revision is now accepted and ready to land.Aug 19 2015, 2:29 PM

After further discussion, it turns out that Bodhi2Client is not going away. Agreed we would push this.

This revision was automatically updated to reflect the committed changes.