4d898fbb31
Currently even if we have closed an election when we build the docs we still determine the full name, email address and IRC nick for all candidates for a series (i.e both PTL and TC candidates for Rocky while only running the rocky TC election) Stop doing that. This means that we reduce the REST-API hits during doc builds, generally speed up the docs generation and importantly allow us to change the process from looking this up from git to probing the OpenStack Foundation membership DB. Adding a flag to state the election type (or phase) will also allow us to, in future changes, auto-validate candidates and generally streamline the process. NOTE: This change also forces all calls to filter() to be "listified" to work the same under py2 and py3 As you can see from the results below, before we were looking up PTL data from git, which this change stops. After this change the expected git queries still happen: Before: [tony@thor election]$ time strace -fo ./strace -s200 tox -e docs <SNIP> ___________________________________ summary ____________________________________ docs: commands succeeded congratulations :) real 1m21.627s user 0m16.268s sys 0m9.921s [tony@thor election]$ grep -Erin '/usr/bin/git.*--follow' strace | wc -l 125 [tony@thor election]$ grep -Erin '/usr/bin/git.*--follow' strace | head -n1 395670:6892 execve("/usr/bin/git", ["git", "log", "--follow", "--format=%aE", "candidates/rocky/Barbican/alee.txt"], 0x56333426b590 /* 8 vars */ <unfinished ...> After (PTL) [tony@thor election]$ time strace -fo ./strace -s200 tox -e docs <SNIP> ___________________________________ summary ____________________________________ docs: commands succeeded congratulations :) real 1m23.211s user 0m17.283s sys 0m10.573s [tony@thor election]$ grep -Erin '/usr/bin/git.*--follow' strace | wc -l 125 After (TC / no TC candidates) [tony@thor election]$ time strace -fo ./strace -s200 tox -e docs <SNIP> ___________________________________ summary ____________________________________ docs: commands succeeded congratulations :) real 0m35.943s user 0m9.443s sys 0m5.897s [tony@thor election]$ grep -Erin '/usr/bin/git.*--follow' strace | wc -l 0 After (TC / 1 fake TC candidate) [tony@thor election]$ time strace -fo ./strace -s200 tox -e docs <SNIP> ___________________________________ summary ____________________________________ docs: commands succeeded congratulations :) real 0m15.497s user 0m9.623s sys 0m5.991s [tony@thor election]$ grep -Erin '/usr/bin/git.*--follow' strace | wc -l 2 [tony@thor election]$ grep -Erin '/usr/bin/git.*--follow' strace 397279:9143 execve("/usr/bin/git", ["git", "log", "--follow", "--format=%aE", "candidates/rocky/TC/tonyb.txt"], 0x55cfc3ca9590 /* 8 vars */ <unfinished ...> 397686:9144 execve("/usr/bin/git", ["git", "log", "--follow", "--format=%aE", "candidates/rocky/TC/tonyb.txt"], 0x55cfc3ca9590 /* 8 vars */ <unfinished ...> Change-Id: I81fc2df78c48aea1b594a7c9f174eee32a7b4128
25 lines
468 B
YAML
25 lines
468 B
YAML
---
|
|
release: rocky
|
|
election_type: tc
|
|
|
|
tag: 'apr-2018-elections'
|
|
|
|
timeframe:
|
|
name: 'Pike-Queens'
|
|
start: '2017-02-21T23:59'
|
|
end: '2018-02-28T23:59'
|
|
email_deadline: '2018-04-18T00:00'
|
|
|
|
tc_seats: 7
|
|
|
|
timeline:
|
|
- name: 'TC Nomination'
|
|
start: '2018-04-10T23:59'
|
|
end: '2018-04-17T23:45'
|
|
- name: 'TC Campaigning'
|
|
start: '2018-04-17T23:45'
|
|
end: '2018-04-22T23:45'
|
|
- name: 'TC Election'
|
|
start: '2018-04-23T23:59'
|
|
end: '2018-04-30T23:45'
|