election/openstack_election
Tony Breeds ae9fefbcc4 Handle the case when the gap between summit and release is small
Typically we have long enough post release to conduct an entire TC
election.  However with Train (and possibly others) the gap between
release and summit is too short to allow for that.  The current code
will set the eligibility criteria to allow for the release date meaning
that it's possibly for for electorate to change post-election which is a
bad thing.

Let's detect that and set the timeframe to a more logical value.

Before:
  Setting TC Election
  Summit is at: 2019-04-22
  Latest possible completion is at: 2019-03-11
  Moving back to Tuesday: 2019-03-05
  TC Election from 2019-02-26T23:45 to 2019-03-05T23:45
  TC Campaigning from 2019-02-19T23:45 to 2019-02-26T23:45
  TC Nominations from 2019-02-12T23:45 to 2019-02-19T23:45
  Set email_deadline to 2019-02-19T00:00
* Setting TC timeframe end to stein Release date 2019-04-10T00:00
  Begining of Rocky Cycle @ 2018-02-09 00:00:00+00:00
* End of Stein cycle @ 2019-04-10 00:00:00+00:00
* Election timeframe: 425 days, 0:00:00s
* Looks like election timespan is outside of 'normal'
* Minimum: 334 days, 14:00:00
* Current: 425 days, 0:00:00
* Maximum: 395 days, 10:00:00

After:
  Setting TC Election
  Summit is at: 2019-04-22
  Latest possible completion is at: 2019-03-11
  Moving back to Tuesday: 2019-03-05
  TC Election from 2019-02-26T23:45 to 2019-03-05T23:45
  TC Campaigning from 2019-02-19T23:45 to 2019-02-26T23:45
  TC Nominations from 2019-02-12T23:45 to 2019-02-19T23:45
  Set email_deadline to 2019-02-19T00:00
* Setting TC timeframe end to email_deadline
  Begining of Rocky Cycle @ 2018-02-09 00:00:00+00:00
* End of Stein cycle @ 2019-02-19 00:00:00+00:00
* Election timeframe: 375 days, 0:00:00s

Change-Id: I2ca38ea68cd179659a53a4bebe68215d91865e67
2019-01-10 14:09:14 +11:00
..
cmds Handle the case when the gap between summit and release is small 2019-01-10 14:09:14 +11:00
tests Factor out the logic to collect the candidate files 2018-12-12 14:09:05 +11:00
__init__.py Make all tools require python3 and remove python2 testing 2018-12-12 14:09:05 +11:00
check_candidacy.py Lookup gerrit username and use that for looking for changes 2018-07-31 10:03:48 +10:00
config.py Rewrite the event logic in javascript 2017-01-30 01:48:11 +00:00
exception.py Remove inappropriate pass in MemberNotFoundException 2018-07-26 10:37:12 +10:00
owners.py Make the owners code work with python3 2018-12-12 14:09:05 +11:00
require_py3.py Add a tool to pick some start dates for an election 2018-12-12 14:09:05 +11:00
utils.py Factor out the logic to collect the candidate files 2018-12-12 14:09:05 +11:00