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 |
||
---|---|---|
candidates | ||
doc/source | ||
openstack_election | ||
tools | ||
.gitignore | ||
.gitreview | ||
.testr.conf | ||
.yamllint | ||
bindep.txt | ||
configuration.yaml | ||
exceptions.txt | ||
README.rst | ||
requirements.txt | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
tox.ini |
openstack/election
This repository contains OpenStack Elections reference documents and tooling to run elections.
Election officials process
PTL Elections
Selecting Election Dates
Things to keep in mind when selecting election dates:
- At least 48 hours in between email deadline and poll start
- Consider extra-atcs approval deadlines
- Should start around R-4 for nominations period
- Allow at least a week for nomination period
Preparation
A month before election starts:
- Edit elections details (timeline, cycle timeframe):
- edit configuration.yaml
- Prepare new election, e.g.:
- tox -evenv -- create-directories
- Update index.rst to include ptl.rst
- Commit to update website
- Update Release Schedule
A couple of weeks before election starts * Send 'PTL Election Season' email
PTL Candidacy Round
When PTL Candidacy start * Send 'PTL Nominations Kickoff' email
During the PTL Candidacy round: * Validate candidacy, e.g.: * tox -evenv -- check-all-candidacies, or * tox -evenv -- check-candidacy change_id * To +2 a candidate: * check commit link is indeed valid * check filename is email address * cursory check the candidacy statement * To +Workflow, checks the previous +2 details, find another commits using --limit 5 (optionals)
- Check candidate list and fix badly generated names through changes to the exception.txt file
Once the email deadline is reached: * Ask the TC chair to tag the governance repository
A couple of days before the candidacy submission ends: * Render statistics and send 'Motivation call for PTL candidacy round', e.g.: * tox -evenv -- render-statistics * Send 'PTL Nominations Last Days' email
When PTL Candidacy submission ends: * Send 'PTL Nominations End' email
When PreferredEmailDeadLine is reached: * Ask the TC chair to tag the governance repository with the tag defined in the configuration.yaml * When the tag is available, generate ATC rolls, e.g.: * tox -evenv -- generate-rolls * Compare ATC rolls with at least one other election official
PTL Election Round
When PTL Election begins: * Create CIVS page ( https://wiki.openstack.org/wiki/Election_Officiating_Guidelines#Running_the_election_itself ) * Upload rolls * CIVS has a maximum number of electorate emails you can upload at a time without crashing, limit to 500 at a time * Send 'PTL Voting Kickoff' email
A couple of days before the PTL Election ends: * Send 'PTL Voting Last Days' email
When PTL Election ends: * Close the election and udpate the results: * tox -evenv -- close-election ptl * edit doc/sources/pike/ptl.yaml to set election winners to True * Update index.rst to comment ptl.rst candidate list * Commit the change and review the results * Send 'PTL Results' email * Update governance repo: * tox -e venv update-governance -- --governance-repo ../governance/
TC Elections
Selecting Election Dates
Things to keep in mind when selecting election dates:
- Needs to conclude by S-3 (3 Weeks prior to OpenStack Summit)
- Allow for at least 48 hours between email deadline and polling begininning
- Allow at least a week for nomination and campaign periods
Preparation
A month before election starts:
- Edit elections details (timeline, cycle timeframe):
- Edit configuration.yaml
- Update index.rst to include tc.rst instead of ptl.rst
- Commit to update website
- Update Release Schedule
A couple of weeks before election starts * Send 'TC Election Season' email
TC Candidacy Round
When TC Candidacy starts: * Send 'TC Nominations Kickoff' email
During the TC Candidacy round: * To +2 a candidate: * check candidate profile using https://www.openstack.org/community/members/ * check filename is email address * cursory check the candidacy statement * To +Workflow, check the previous +2 details
A couple of days before the candidacy submission ends: * Send 'TC Nominations Last Days' email
When TC Candidacy submission ends: * Send 'TC End Nominations' email
When PreferredEmailDeadLine is reached: * Generate ATC rolls, e.g.: * tox -evenv -- generate-rolls
TC Election Round
When PTL Election begins: * Create CIVS page * Upload rolls * Send 'TC Voting Kickoff' Email
A couple of days before the TC Election ends: * Send 'TC Voting Last Days' email
When TC Election ends: * close the election and update the results: * tox -e venv -- close-election tc * edit doc/source/pike/tc.yaml * Commit the change and review the results * Send 'TC Results' * Update tc-election-summary.py with election statistics * Send 'TC Election Statistics'