Building docs without git information results in failed build

Bug #1896609 reported by Stephen Finucane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstackdocstheme
Fix Released
Low
Stephen Finucane

Bug Description

If we're unable to extract the project version from the package, we leave things unversioned. Unfortunately, that means setting the 'version' and 'release' config options to 'None'. These should be strings and setting them to 'None' results in the following errors:

  WARNING: The config value `release' has type `NoneType', defaults to `str'.
  ...

  Exception occurred:
    File ".../sphinx/builders/html/__init__.py", line 475, in prepare_writing
      'release': return_codes_re.sub('', self.config.release),
  TypeError: expected string or bytes-like object

Changed in openstack-doc-tools:
status: New → Confirmed
importance: Undecided → Low
tags: added: openstackdocstheme
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstackdocstheme (master)

Fix proposed to branch: master
Review: https://review.opendev.org/753284

Changed in openstack-doc-tools:
assignee: nobody → Stephen Finucane (stephenfinucane)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/753285

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstackdocstheme (master)

Reviewed: https://review.opendev.org/753284
Committed: https://git.openstack.org/cgit/openstack/openstackdocstheme/commit/?id=6876b7276bed6432c30e2f46e8f7dd242113e067
Submitter: Zuul
Branch: master

commit 6876b7276bed6432c30e2f46e8f7dd242113e067
Author: Stephen Finucane <email address hidden>
Date: Tue Sep 22 11:07:37 2020 +0100

    Store empty string for release

    If we're unable to extract the project version from the package, we
    leave things unversioned. Unfortunately, that means setting the
    'version' and 'release' config options to 'None'. These should be
    strings and setting them to 'None' results in the following errors:

      WARNING: The config value `release' has type `NoneType', defaults to `str'.
      ...

      Exception occurred:
        File ".../sphinx/builders/html/__init__.py", line 475, in prepare_writing
          'release': return_codes_re.sub('', self.config.release),
      TypeError: expected string or bytes-like object

    Simply set an empty string instead.

    Change-Id: I6df4a90b04f3ed89c69fb7669027feda6c5ffe79
    Signed-off-by: Stephen Finucane <email address hidden>
    Closes-Bug: #1896609

Changed in openstack-doc-tools:
status: In Progress → 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.