#216 Improve spacing in IRC format template
Opened 3 months ago by adamwill. Modified 2 months ago
fedora-qa/ adamwill/blockerbugs irc-spacing  into  develop

@@ -21,8 +21,10 @@ 

  #link {{ bug.discussion_link }}

  {% endif -%}

  #info {{ buglist | replace("Blockers", "Blocker") }}, {{ bug.component }}, {{ bug.status }} {%- if bug.depends_on %}, depends on other bugs {% endif %}

- {% if buglist.startswith('Proposed') -%}

+ {% if buglist.startswith('Proposed') and vote_info[bug.bugid] -%}

  {{ vote_info[bug.bugid] }}

+ 

+ {% else %}

  {% endif -%}

  

  

This consistently gives us exactly one line between items in the
IRC template, whether proposed or accepted and whether they have
ticket votes or not. Currently we get a space between proposed
items without a ticket vote, but no spaces between any other
items. The space was 'accidental' but kind of useful, this makes
it consistent.

Unfortunately it's kinda not obvious how it works (it's to do
with jinja's rather odd whitespace control) and it's not really
possible to do inline comments in jinja to explain it, so people
may look at this code and wonder why it's the way it is, but I
can't see a way around that.

Signed-off-by: Adam Williamson awilliam@redhat.com

I tested this on a local dev instance by hacking a tracker link and vote count into one bug so I could check the results. It looks like this:

============================================================
Blocker Bugs List - Review Meeting IRC Format
Milestone: Fedora 35 Final
Last Update: 2021-09-27 23:17:20 UTC
============================================================

#info 4 Proposed Blockers
#info 7 Accepted Blockers
#info 0 Accepted 0-day Blockers
#info 0 Accepted Previous Release Blockers
#info 0 Proposed Freeze Exceptions
#info 3 Accepted Freeze Exceptions



============================================================
Proposed Blockers
============================================================

#topic (2007993) gnome-shell-extension-background-logo is not compatible with GNOME 41
#link https://bugzilla.redhat.com/show_bug.cgi?id=2007993
#info Proposed Blocker, gnome-shell-extension-background-logo, POST

#topic (2006632) Abrt doesn't work well
#link https://bugzilla.redhat.com/show_bug.cgi?id=2006632
#link https://pagure.io/fedora-qa/blocker-review/issue/475
#info Proposed Blocker, libreport, ASSIGNED
#info Ticket vote: FinalBlocker (+2,0,-0) (+sumantrom, +imsedgar)

#topic (2006746) Mouse cursor position has a horizontal and vertical offset after changing resolution in a VM
#link https://bugzilla.redhat.com/show_bug.cgi?id=2006746
#info Proposed Blocker, spice-vdagent, NEW

#topic (2006393) [DNS over TLS] following connection to a wifi AP, internet is not available for ~30s
#link https://bugzilla.redhat.com/show_bug.cgi?id=2006393
#info Proposed Blocker, systemd, NEW



============================================================
Accepted Blockers
============================================================

#topic (1997315) abrt-dbus segmentation faulted in abrt_p2_service_dbus when shutting down, rebooting, or logging out of Plasma
#link https://bugzilla.redhat.com/show_bug.cgi?id=1997315
#info Accepted Blocker, abrt, ASSIGNED

#topic (2006028) Non-root user cannot join an Active Directory domain through Cockpit
#link https://bugzilla.redhat.com/show_bug.cgi?id=2006028
#info Accepted Blocker, cockpit, POST

#topic (2007742) Selecting Xorg doesn't work as when you login you still end up with Wayland
#link https://bugzilla.redhat.com/show_bug.cgi?id=2007742
#info Accepted Blocker, gdm, ASSIGNED

#topic (2007602) gedit crashes when searching for files
#link https://bugzilla.redhat.com/show_bug.cgi?id=2007602
#info Accepted Blocker, gedit, MODIFIED

#topic (1989726) [abrt] gnome-shell: cogl_texture_get_gl_texture(): gnome-shell killed by SIGSEGV
#link https://bugzilla.redhat.com/show_bug.cgi?id=1989726
#info Accepted Blocker, mesa, NEW

#topic (2001837) The switch for Fedora Third Party repositories does not switch them on.
#link https://bugzilla.redhat.com/show_bug.cgi?id=2001837
#info Accepted Blocker, selinux-policy, ASSIGNED

#topic (1991075) time is transiently incorrect when Automatic Time Zone is enabled
#link https://bugzilla.redhat.com/show_bug.cgi?id=1991075
#info Accepted Blocker, xdg-desktop-portal, NEW



============================================================
Accepted 0-day Blockers
============================================================



============================================================
Accepted Previous Release Blockers
============================================================



============================================================
Proposed Freeze Exceptions
============================================================



============================================================
Accepted Freeze Exceptions
============================================================

#topic (1980460) Obsolete packages that used to require Python 3.9 but are gone in Fedora 35
#link https://bugzilla.redhat.com/show_bug.cgi?id=1980460
#info Accepted Freeze Exceptions, fedora-obsolete-packages, MODIFIED

#topic (2007672) Rename failure of Application group text label
#link https://bugzilla.redhat.com/show_bug.cgi?id=2007672
#info Accepted Freeze Exceptions, gnome-shell, NEW

#topic (2007697) Encrypted zip exctracts weirdly with wrong passphrase
#link https://bugzilla.redhat.com/show_bug.cgi?id=2007697
#info Accepted Freeze Exceptions, nautilus, NEW

Build succeeded.

Ugh, I guess I broke the empty lines in one of the previous updates. Sorry about that! You didn't need to provide a PR, just complaining would be enough :-) I'll look into this, including adding a code comment if possible, add adding a unit test for this perhaps.

Given how many big changes we have pending in develop already, I'm reluctant to update the production instance so close to F35 GA, because it might break something. Is it ok if this patch is deployed only after F35 GA? Or do you consider this issue so annoying that a hotfix rebased for current production is preferred?

I don't actually remember if there were empty lines before, honestly. There may not have been, and I just noticed the accidentally-added empty lines for proposed items with no ticket vote and realized it was more usable that way :D

it is moderately annoying, but if it really bugs me I can just run the meeting off my dev instance, so it's not a big deal to update the prod instance.

Metadata