Commit Graph

249 Commits

Author SHA1 Message Date
Zuul fa457d1a95 Merge "Election template fix: combined end nominations" 2024-02-29 09:59:26 +00:00
Ian Y. Choi 219ec769d1 Election template fix: combined end nominations
Moving project lists for election to "PTL Election Details"
section and describe TC candidates information on "TC Election Details"
section.

Change-Id: If80fae88e375ddb4f94d8451fb93446d55217c3c
2024-02-29 12:50:55 +09:00
Ian Y. Choi 3b6ac0b042 Fix minor election tool bugs
1. no_extra_atcs in generate_rolls needs to change to no_extra_acs
 - https://paste.opendev.org/show/b3sU4uxlP6yHYPdFFOy6/
2. fromtmiestamp -> fromtimestamp
 - https://paste.opendev.org/show/bpROEF1BBGFyT9guRSoa/
3. datetime and string comparison error
 - https://paste.opendev.org/show/bgqWqfvxo3pDQKxKbdkc/

Change-Id: Ia50e466354f510cb86243a2e29d179d7b7dae395
2024-02-29 12:47:24 +09:00
Zuul 7bbd305758 Merge "[trivial] fix minor typo on election_season template" 2024-02-24 04:24:39 +00:00
Zuul 9132940385 Merge "Get historical affiliations from the summit API" 2024-02-24 04:24:03 +00:00
Ian Y. Choi a9846a714b [trivial] fix minor typo on election_season template
Change-Id: I5ad83be7394f824f02576844b95b850c65d49be1
2024-02-15 02:21:18 +09:00
Jeremy Stanley 15a6518a78 Get historical affiliations from the summit API
During the transition from OpenStackID to OpenInfraID, some aspects
of the backend "summit" API changed. Historical affiliations ceased
to be reflected in the "affiliations" array, and now need to be
extracted from "all_affiliations" instead. Further, organization
names are not included unless "all_affiliations.organization" is
expanded.

Change-Id: If6260e6a44fd66ab5df8aa207cb8f4f4bb6ef220
2024-01-26 18:43:39 +00:00
Tony Breeds dacf78b113 [trivial] Remove addition whitespace in string
When constructing the description there is trainling whitespace *and*
leading whitespace.  This is redundant.

Change-Id: I84f2fbc5daed10b34b8e2285f7ead7bffd6d8c52
2024-01-10 15:13:05 +11:00
Zuul a01395be82 Merge "Update nominations_last_days templates to prompt about CIVS opt-in" 2023-09-22 00:00:53 +00:00
Zuul f5ced1d3bc Merge "Update render-statistics to include TC seats" 2023-09-22 00:00:42 +00:00
Ghanshyam Mann 7b1887c486 Convert ATC to AC term
TC passed a resolution in 2021[1] to convert the term
ATC to AC and this is not just wording change but also
it change the definition of it which include the AUC also
in AC. Previously ATC and AUC were two different things.

Reflecting the TC resolution in election tooling also.

[1] https://governance.openstack.org/tc/resolutions/20210602-atc-renamed-to-ac.html

Depends-On: https://review.opendev.org/c/openstack/governance/+/893831
Change-Id: Ic0570ae9a2bb2b31538179d3246b4475cdbeac45
2023-09-07 11:56:57 -05:00
Ian Y. Choi fb6a674adb Add template for CIVS opt-in
CIVS opt-in needs to be announced before voting kickoff so that
electorates participate in voting.
Creating template named: "voting_optin_civs".

Change-Id: I778ee2fcbcdd85599db3ec53c68fc1e6563d92df
2023-09-07 06:46:07 +09:00
Tony Breeds e62869fd1f Update nominations_last_days templates to prompt about CIVS opt-in
Change-Id: I3f0c47746611ff3eddad192b15e175476088411e
2023-08-29 08:39:54 -07:00
Tony Breeds ee7ae43b71 Update render-statistics to include TC seats
Change-Id: Id0528f6fae7946e96391c4c06e0c520f984b25a9
2023-08-29 08:37:29 -07:00
Tony Breeds b94b982090 Add combined_campaigning_kickoff.j2
Also while there change footnoting style

Change-Id: I6eaa238ae8f223c6c76fcc53b59b335a0ba6b381
2023-08-11 13:31:03 -05:00
Tony Breeds 52680e976e Update election_season season templates
This is a small refresh to link to relevant documents and call out
the CIVS opt-in process.

Change-Id: I3ea67953841ed029ff2899b8e8041f84c9f515ff
2023-08-11 13:31:03 -05:00
Zuul 9127c80969 Merge "Add a tool to update the releases repo" 2023-07-31 18:51:17 +00:00
Zuul 3359ff7a45 Merge "Add a Sorting function." 2023-07-31 18:51:16 +00:00
Zuul 96a98d39f6 Merge "Exclude projects under the distributed leadership model" 2023-07-31 18:46:32 +00:00
Tony Breeds 056184c363 Add a tool to update the releases repo
Change-Id: I216b77823281abe390e35395ac8d9ccc7f3064b9
2023-07-13 16:39:46 +10:00
Tony Breeds cb661a42f8 Add a Sorting function.
Currently we're reverse sorting with a simple sort, this sadly puts
newer released (antalope, bobcat) at the end of the list.  Add a
key function that has context around our release names and release ids
to sort "2024.1/cantaloupe"[1] at the top.

[1] As of now the c name isn't selected cantaloupe is my placeholder

Change-Id: Ie7a9ffcdbe6a28cd2a80289ec06259ec869d306f
2023-07-13 16:39:42 +10:00
Tony Breeds eb4636f483 Exclude projects under the distributed leadership model
Currently there are 2 leadership types "distributed" and the
Default/unspecified which we treat as the long established PTL model.
Projects that have selected to use the "distributed" model do not
require a PTL election and in fact projects under this model should
reject a PTL nomination as the correct process involves a change the
governance repo.

This change updates 'create-directories' to exclude those projects,
and also updates the ci checks to fail PTL nominations for "distributed"
projects.

Change-Id: Ib4a2ce1e4ee74e8e9a49975017e14172b4d1f576
2023-07-12 15:15:24 +10:00
Ghanshyam Mann 3021ebe674 Fix the tag to be used for setting election config
When we start the election configuration for dates and
other deadlines, we use the dummy tag generated with election
month and which gets updated once governance release the
actual tag of semver. It is confusing that initial tag
generated by setup_election_config cmd is actual tag or just
a placeholder.

Governance repo has switched to semver type tag since 2018
- https://github.com/openstack/governance/tags?after=oct-2017-elections

Election repo started the below process since 2019:
1. Add placeholder/dummy tag in election config (election month tag generated by script)
- https://review.opendev.org/c/openstack/election/+/661673
2. On email_deadline, release a new tag of governance repo
- https://review.opendev.org/c/openstack/releases/+/680691
3. Update the released tag in election config
- https://review.opendev.org/c/openstack/election/+/681274

This commit does not change the existing process and make the placeholder tag more
clear so that we know that we need to release a new tag in governance at the email_deadline
and update here.

Change-Id: Id8d5e4689ad2374a197e63e7fb41c6b5c265ff5c
2023-06-22 21:40:46 +00:00
Zuul 474001d298 Merge "Fix setup_election_config for combined election events" 2023-03-25 01:49:18 +00:00
Zuul b9756409bd Merge "Update package metadata and tox4 setup" 2023-03-24 22:00:38 +00:00
Ghanshyam Mann ecbdd0dbb9 Fix setup_election_config for combined election events
Most of the election tooling work on seperate events
of PTL and TC election. If election is combined then
setup_election_config generate the combined event(
for example 'TC & PTL Election') and it does not work
with those tools/scripts.

This fixes it and even for combined election it generates
the separate events. If we look at the election site, the
separate events are more clear for users.

Generated config looks like below:

Change-Id: I7d2e540dea9d89c832f6d9e3e9da743fe8d39295

---
release: 2023.2
election_type: combined
tag: mar-2023-elections
tc_seats: 4
timeframe:
  name: Zed-2023.1
  start: 2022-03-11T00:00
  end: 2023-02-15T00:00
  email_deadline: 2023-02-15T00:00
timeline:
- name: TC Nominations
  start: 2023-02-01T23:45
  end: 2023-02-15T23:45
- name: PTL Nominations
  start: 2023-02-01T23:45
  end: 2023-02-15T23:45
- name: TC Campaigning
  start: 2023-02-15T23:45
  end: 2023-02-22T23:45
- name: TC Election
  start: 2023-02-22T23:45
  end: 2023-03-08T23:45
- name: PTL Election
  start: 2023-02-22T23:45
  end: 2023-03-08T23:45

Change-Id: I5b1766d0fce9eb7ded000a7b582a8e4086314831
2023-03-08 08:15:26 -08:00
Ghanshyam Mann 61bc1d5bed Update setup_election_config as per new TC charter
As per TC charter, nomination and voting period
has been changed from 1 week to 2 week. Updating
the setup_election_config.py script to select the
duration according to TC charter.

Also, updating the validate_tc_charter() to validate
the latest TC charter.

Below is output of this updated script:

Change-Id: I209db4d8a21af79047aee061b51802a7d2bac74b
---
release: 2023.2
election_type: combined
tag: mar-2023-elections
tc_seats: 4
timeframe:
  name: Zed-2023.1
  start: 2022-03-11T00:00
  end: 2023-02-15T00:00
  email_deadline: 2023-02-15T00:00
timeline:
- name: TC & PTL Nominations
  start: 2023-02-01T23:45
  end: 2023-02-15T23:45
- name: TC Campaigning
  start: 2023-02-15T23:45
  end: 2023-02-22T23:45
- name: TC & PTL Election
  start: 2023-02-22T23:45
  end: 2023-03-08T23:45
2023-03-03 15:00:09 -08:00
Ghanshyam Mann aae968f2af Migrate election tooling to release versions
From Antelope (2023.1) onwards, primary identifier
of any release is release version instead of name[1],
we should use release versions in the election tooling
also.

This migrate the election tooling to use the release version
As release repo is not fully migrated to release version yet,
we still need to use the release name to fetch the data from
release repo.

Keeping relaese version as float so that we edit the
configuration file with release version a float not
with string even string is passed.

All the election tools/script/flow has been tested with it and
it is working now.

[1] https://governance.openstack.org/tc/reference/release-naming.html

Change-Id: Ia8a60a9514b1dca5ac97ed8099c34c6c6c7d24e2
2023-03-03 11:01:20 -08:00
Tony Breeds edfebf3dcc Update package metadata and tox4 setup
The current tox setup results in an 'editable-wheel' install which,
while it works, generates unhelpful warnings.  Switch to the 'editable'
type which is what you got under tox <= 4.

While we are reducing noise in the logs, correctly setup
openstack_elections.templates as a module.  We need it as a module as
we rely on Jinja2 to be able to use the module loader to locate the
templates.

Change-Id: Icbdca2f72c0777c587d6f95b3fab1911be179f97
2023-02-22 03:37:10 +00:00
Zuul be33161a26 Merge "Add CIVS policy to combined voting kickoff template" 2023-02-02 01:58:06 +00:00
Zuul e8ea3abdd5 Merge "Skip if e-mail in Gerrit is None" 2023-02-02 01:53:47 +00:00
Tony Breeds 84c50c9878 Simplify date conversions
Also do a sneaky update to switch from dict() to list()

Change-Id: I71b65b82e8609fc4b3b48ef58acdf434ce69fe5c
2023-02-02 11:33:23 +11:00
Tony Breeds 5701eea441 Update select_release_end_date() to work cross release
Currently the event name is limited to 'x-final', this doesn't
work for current releases.  Update that to determine the correct
tag.

Change-Id: I14a2d71a0bc26c837ebe4dfebbcfc9b05f02b069
2023-02-02 11:32:18 +11:00
Tony Breeds d084748d44 Gracefully exit if we can't find a date
If the release name passed into the tool doesn't yet have a schedule,
which is actually the most common use case, we won't be able to
auto-detect a date.  In that case let's bail somewhat nicely.

Change-Id: I4072e73c15d0299755fcce43f8b35798179719c3
2023-02-02 11:31:10 +11:00
Tony Breeds bb587d0ff4 Remove stupid think-o
Setting a variable to itself should be a no-op right?  Frankly I have
no idea why I did this so remove it.

Change-Id: I9f9851c76455e5d559ba68921dfd29557a64b574
2023-02-02 11:30:00 +11:00
Tony Breeds 4ef299381b Switch election timing to Wednesday
Tuesday was selected because it was early in the week and was "safe"
for APAC and US timezones.   Releases actually happen on Wednesdays
so for something more like consistency lets do make elections also
happen on Wednesdays

Change-Id: If66602b12eb77b17904427149ab81ce7a21d9492
2023-02-02 07:23:45 +09:00
Ian Y. Choi d5c2dfdc98 Skip if e-mail in Gerrit is None
Need to skip to work properly if E-mail address preferred in Gerrit
for owner's account is None

Change-Id: I2f222c9c58b9db9df1eb8370b1703ef690c1243d
2022-09-13 15:51:15 +09:00
Ian Y. Choi a135c4c310 Add CIVS policy to combined voting kickoff template
Adding the policy statement to combined election which was already
added in PTL and TC election voting kickoff templates

Change-Id: I10fbbab9d11512cb66a3e3eaaa3cfd4159e48513
2022-09-13 09:20:44 +09:00
Ghanshyam Mann e0424270a2 Add release cycle info in sub line of template emails
Change-Id: I155ba8e2c5e40ee4eccd873fff68af6b18832e49
2022-02-07 14:49:37 -06:00
Zuul da549addaf Merge "remove unicode from code" 2022-01-27 16:42:02 +00:00
Belmiro Moreira e0748e63af Add CIVS opt in information in kickoff voting emails
Due to a new CIVS policy, to vote in a private CIVS pool,
participants must opt in to email communication.

This information is now added in the PTL and TC voting kickoff
emails.

Change-Id: Ib1dbd9a388bc8d88dc1ae95e0f92f953612f25b2
2021-09-03 10:32:10 +02:00
liyou01 b7454910e4 remove unicode from code
All strings are considered as unicode string from Python 3.

This patch drops the explicit unicode literal (u'...')
appearances from the unicode strings.

Change-Id: Ifd455c425249cefa0082607993c157e7b884f0e2
2021-07-24 02:01:09 +09:00
Ghanshyam Mann 500d2c1ed0 Automate the 'date' in setup_election_config
Current we need to pass 'date' as mandatory argument
in setup_election_config CLI and it is sometime confusion
on what date to pass.

This commit automatically select the end date of release if
date is not passed. This will help to generate the correct
election dates without worry about release date to pass.

Change-Id: I444885800b26ca84689d550f81bbe349eae3bd30
2021-07-21 12:40:14 -05:00
Ghanshyam Mann c4667d15ef Add TC charter validation in setup_election_config
setup_election_config generate the election dates as per
the given release date but there is no validation of those
generated dates against TC charter.

This commit adds TC charter validation in this script which
will help to generate the correct dates macthing with what
TC charter says.

Change-Id: Ic79f4903e26785de4c6cb1f5908c5b5839975096
2021-07-21 12:36:08 -05:00
Ghanshyam Mann b75831be28 Add 'combined' election support in setup-election-config
setup-election-config script is used to generate the
election dates. As we started doing the combined election
of PTL and TC, we need to add that type of election support
in this tool which will help to generate dates for any
type of election.

Below the is generated data will looks like:

release: yoga
election_type: combined
tag: oct-2021-elections
tc_seats: 4
timeframe:
  name: Wallaby-Xena
  start: 2020-09-25T00:00
  end: 2021-08-24T00:00
  email_deadline: 2021-08-24T00:00
timeline:
- name: TC & PTL Nominations
  start: 2021-08-17T23:45
  end: 2021-08-24T23:45
- name: TC Campaigning
  start: 2021-08-24T23:45
  end: 2021-08-31T23:45
- name: TC & PTL Election
  start: 2021-08-31T23:45
  end: 2021-09-07T23:45

Change-Id: Ib97f7ba794078ed78c9241dce7d40b3fc3519948
2021-07-21 12:35:43 -05:00
Ghanshyam Mann 6d6494721d Fix setup-election-config script for TC election dates
setup-election-config script is still using the old
dates for TC election
"The election is held no later than 6 weeks prior to each
 OpenStack Summit (on or before 'S-6' week)"

and set the offset of 6 weeks of summit or release. As we do not
have summit in every cycle so we need to update it to take
reference from release dates.

Also TC charter is changed 2 year back about new recommended dates
for TC election, which is:

"The election is held no earlier than 6 weeks and no later
than 4 weeks prior to each cycle final release date (between 'R-6' and 'R-4'
week)"

- https://review.opendev.org/c/openstack/governance/+/699277/6/reference/charter.rst

This commit fix the script with the offset as 4 weeks from release date
so that generated dates will be as per the TC charter.

Change-Id: Id43b67add3ec405bd94c64a9d2d324247914031a
2021-07-21 12:35:43 -05:00
Zuul fe297b0cf5 Merge "Only associate preferred addresses with owners" 2021-04-07 00:31:18 +00:00
Jeremy Stanley cfd2cd6a94 Only associate preferred addresses with owners
Our recent Gerrit upgrade has made the emails method of the REST API
require essentially administrator permissions, making it no longer
feasible to find secondary addresses for change owners. Secondary
addresses really only served minor uses in this library anyway,
helping identify redundant accounts (which new Gerrit is forcing us
to clean up) and allowing slightly looser association to foundation
profiles.

Drop our use of the emails method, relying instead on the preferred
address provided with the owner record. In rare cases where an
account lacks a preferred address, substitute the committer address
from the first revision of the change where we initially encounter
that user.

Change-Id: Iee58c38a728343776354260c8b2d3fad09633ffa
2021-04-03 01:21:23 +00:00
Jeremy Stanley b4809462aa Omit leaderless list from TC election results
The close_election command treats TC elections as a single-team PTL
election, essentially. The leaderless list, however, is generated
from the full list of projects included in an election which, in a
parallel TC/PTL election will include more projects than just the
TC. Rather than heavily refactor the utility function where that
data is summarized, just delete the leaderless list from the
election results when reporting for the TC round in a parallel
TC/PTL election.

Change-Id: Ia8bb11addb9f70283b3e676d90e5e7b48494b8e1
2021-03-10 19:51:44 +00:00
Zuul da30559418 Merge "Add E-mail template for Combined Voting Kick-Off" 2021-01-15 20:55:58 +00:00