Horizon requires pbr at runtime

Bug #1304253 reported by Matthias Runge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Won't Fix
Undecided
Unassigned

Bug Description

The only occurance of pbr is:
grep -r 'pbr' *

version.py:import pbr.version
version.py:version_info = pbr.version.VersionInfo('horizon')

That can be replaced by something like this:
class VersionInfo(object):
    release = "2014.1"
    version = "1"

    def version_string(self):
        return self.version

    def release_string(self):
        return self.release

version_info = VersionInfo()

Matthias Runge (mrunge)
tags: added: low-hanging-fruit
Revision history for this message
Julie Pichon (jpichon) wrote :

This seems to be the way all OpenStack projects use pbr and do versioning. If this needs to be changed I'm not sure that should happen only in Horizon, pbr does other handy things that a hard-coded version would not cover.

Changed in horizon:
status: New → Incomplete
Revision history for this message
Matthias Runge (mrunge) wrote :

Yes, I'm aware of that. Still, pbr is used to create static texts at each call. It will be sufficient to do this once for a release. And I'm sure, pbr can do that, too (at build time).

Changed in horizon:
status: Incomplete → New
Revision history for this message
Julie Pichon (jpichon) wrote :

It also infers version number based on git commits for intermediate versions, and I wouldn't be surprised if it was required for parts of the release process. I think Horizon should keep consistent with the other OpenStack projects. Perhaps bring it up on list to see if the pbr dependency could be handled differently, consistently across the projects?

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

This might be a change done at least initially downstream.

Does it work to set this in the rpm before the setup.py build?
  export OSLO_PACKAGE_VERSION=%{version}

An alternative approach is to do as you suggest in the description,
but more parameterized like:
  http://pkgs.fedoraproject.org/cgit/openstack-neutron.git/tree/0001-remove-runtime-dependency-on-pbr.patch
Then in the rpm build one can do:
  sed -i 's/RPMVERSION/%{version}/; s/RPMRELEASE/%{release}/' horizon/version.py

Revision history for this message
Julie Pichon (jpichon) wrote :

Removing the low-hanging-fruit tag, since this will first require an on-list discussion to make sure the resolution is agreed on by and kept consistent across the projects.

tags: removed: low-hanging-fruit
Revision history for this message
Matthias Runge (mrunge) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/92814

Changed in horizon:
assignee: nobody → Matthias Runge (mrunge)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Matthias Runge (<email address hidden>) on branch: master
Review: https://review.openstack.org/92814
Reason: lack of interest upstream horizon

Matthias Runge (mrunge)
Changed in horizon:
assignee: Matthias Runge (mrunge) → nobody
status: In Progress → Confirmed
Revision history for this message
David Lyle (david-lyle) wrote :

I think this is a larger OpenStack issue and not for Horizon to solve independently. You can't really do much Horizon without OpenStack, the same is not true of swift.

Changed in horizon:
status: Confirmed → Won't Fix
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.