JJB: package name does not match and breaks PBR

Bug #1384238 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Committed
Critical
Clark Boylan
PBR
Invalid
Undecided
Unassigned

Bug Description

Running JJB from master:

bash-4.2$ jenkins-jobs update --delete-old /etc/jenkins_jobs/jobs
Traceback (most recent call last):
  File "/bin/jenkins-jobs", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 121, in main
    parser = create_parser()
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 107, in create_parser
    version=version(),
  File "/usr/lib/python2.7/site-packages/jenkins_jobs/cmd.py", line 241, in version
    jenkins_jobs.version.version_info.version_string()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 78, in version_string
    for part in self.release_string().split('.'):
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 70, in release_string
    self.release = self._get_version_from_pkg_resources()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 62, in _get_version_from_pkg_resources
    return packaging.get_version(self.package)
  File "/usr/lib/python2.7/site-packages/pbr/packaging.py", line 870, in get_version
    raise Exception("Versioning for this project requires either an sdist"
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?

This issue appears since this commit (which uses PBR):
https://github.com/openstack-infra/jenkins-job-builder/commit/b77a9991eed45a31dea7941ed0acf5935dc3869e

Because package name in setup.cfg is different from package_name discovered by PBR:
[metadata]
name = jenkins-job-builder

[files]
packages = jenkins_jobs

Tags: jjb
Revision history for this message
Jeremy Stanley (fungi) wrote :

The traceback for this looks like bug 1379579 though Emilien mentioned in IRC that he observed this with setuptools 0.9.8 on RHEL 7.

tags: added: jjb
Changed in openstack-ci:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to jenkins-job-builder (master)

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

Changed in openstack-ci:
assignee: nobody → Emilien Macchi (emilienm)
status: Confirmed → In Progress
Changed in openstack-ci:
assignee: Emilien Macchi (emilienm) → Clark Boylan (cboylan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to jenkins-job-builder (master)

Reviewed: https://review.openstack.org/130260
Committed: https://git.openstack.org/cgit/openstack-infra/jenkins-job-builder/commit/?id=8c187f859507dd3ec891f4e1db1ca40b5f876d04
Submitter: Jenkins
Branch: master

commit 8c187f859507dd3ec891f4e1db1ca40b5f876d04
Author: Emilien Macchi <email address hidden>
Date: Wed Oct 22 11:31:26 2014 -0400

    Get verison info for jenkins-job-builder

    Old setuptools/distribute VersionInfo() needs the dist name not the
    package name to get the correct version info. Switch to using
    'jenkins-job-builder' which is the dist name instead of using
    'jenkins_jobs' which is the package name so that we get the right data
    when processing versions on old setuptools.

    Closes-Bug: #1384238
    Change-Id: I94a6bc6a5580ea8861eb603e5dfab2825475b45f

Changed in openstack-ci:
status: In Progress → Fix Committed
Jeremy Stanley (fungi)
Changed in pbr:
status: New → Invalid
Changed in openstack-ci:
importance: Undecided → Critical
milestone: none → kilo
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.