Absolute formatting used in help texts

Bug #1587821 reported by Erno Kuvaja
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Medium
Erno Kuvaja
OpenStack Compute (nova)
Fix Released
Undecided
Sean Dague
osprofiler
Confirmed
Medium
Dina Belova

Bug Description

Absolute formatting breaks configgenerator generated example configs.

Good example what happens is here:
https://review.openstack.org/#/c/323661/1/etc/glance-api.conf

The cache related options and [profiler] section helps gets broken due to line lenghts.

Erno Kuvaja (jokke)
Changed in glance:
assignee: nobody → Erno Kuvaja (jokke)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: New → In Progress
Erno Kuvaja (jokke)
Changed in glance:
importance: Undecided → Medium
Revision history for this message
Erno Kuvaja (jokke) wrote :

Nova seems to have the same issue (bit less visible): http://docs.openstack.org/developer/nova/sample_config.html F.E. config_drive_skip_versions

Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :

Agreed with Erno here. If we are improving text then formatting is a significant factor in that improvement. Let's make sure we keep the text well formatted when making these and other changes.

Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

FYI: "oslo.config", which generates the conf file, provides a "wrap_width" attribute (default: 70 chars)[1]. Nova sets it at 79 chars [2], which sometimes results in ugly line breaks if your line is 80 chars (AFAIK the default in the pep8 checks). I tend to make the manual line breaks in Nova config option multi-line help texts at ~77 chars. That tends to create the best output.

References:
[1] https://github.com/openstack/oslo.config/blob/d829109cb47bb19b5c25023ed50e7476c98d33e9/oslo_config/generator.py#L113
[2] https://github.com/openstack/nova/blob/a1f74c7dba758b0ab28d746fa69d814e7a55c7bf/etc/nova/nova-config-generator.conf#L3

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

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

Changed in nova:
assignee: nobody → Sean Dague (sdague)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/324576
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=11ed7bd39bedfae770ef29b6385ff7235ac2f7a2
Submitter: Jenkins
Branch: master

commit 11ed7bd39bedfae770ef29b6385ff7235ac2f7a2
Author: Sean Dague <email address hidden>
Date: Thu Jun 2 10:42:32 2016 -0400

    set wrap_width for config generator to 80

    pep8 is testing for 80 character lines. By force wrapping at 79 we get
    weird edge conditions in our detailed help blocks of very odd wraps
    with 80 character lines.

    pep8 and conf generator should agree on this value.

    Change-Id: I003964dfc46673bed3717862043d76bfb59ce217
    Closes-Bug: #1587821

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 14.0.0.0b2

This issue was fixed in the openstack/nova 14.0.0.0b2 development milestone.

Dina Belova (dbelova)
Changed in osprofiler:
status: New → Confirmed
assignee: nobody → Dina Belova (dbelova)
importance: Undecided → Medium
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Closing for glance as the comments indicate on the proposed patch that this is no longer needed.

Changed in glance:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by Erno Kuvaja (<email address hidden>) on branch: master
Review: https://review.openstack.org/323779

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.