15 Commits

Author SHA1 Message Date
Tony Breeds
db3d30a466 Include current affiliation in job output
We can't fail a nomination based on affiliaton, but it's somewhat useful
to see it when evaluation a candidate.  This change displays the current
affiliation for the candidate under review.

Change-Id: I7a28e6cec6c46af35ac9bf5ebf30fcec71fbbd43
2024-08-08 10:04:37 +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
Jeremy Stanley
4570981c1b Don't test candidate files if they're removed
The routine to determine which files to check for candidacies, when
used to analyze files being changed with --HEAD, should only test
those files if they are being kept by the change. If they're being
deleted, then there is no reason to test them. Further, testing
files which are slated for removal makes it basically impossible to
revert a previously merged candidacy which has since been
invalidated (for example, by resigning OSF Individual Membership).

Mock os.path.exists in test_find_modified_candidate_files_all_good
to just return True, since we aren't actually creating the file in
that test.

Change-Id: I4d5d9b1d55379adfd1c7d7765324306abf40cdb7
2020-09-28 13:21:06 +00:00
Hervé Beraud
d113fc7087 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I2f9d4c9a760bd9a9dbb9cde5bcb8af24fd4b34b9
2020-07-24 13:44:46 +02:00
Andreas Jaeger
546b046800 Switch to newer openstackdocstheme version
Switch to openstackdocstheme 2.2.1 version. Using
this version will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Disable openstackdocs_auto_version to not auto-version the documents.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Remove python 2.7 stanza from setup.py, cleanup tox.ini for python3,
update hacking version and fix problem found.

Change-Id: Ic0721e60f6583abb52bb665fbf113c8017318e2c
2020-06-10 16:59:45 +02:00
Jeremy Stanley
c24fab9d73 Include a -v/--verbose option for check commands
So as to increase transparency of the candidate verification checks,
add a --verbose option to all of the various candidate checking
command scripts. Supplying it once returns check result URLs for
clarity, while adding it twice also displays the query URLs used.

Set double verbosity for the check review tox testenv, to aid
election officials in reviewing nominees for valid candidacy.

Also update the Gerrit and Git URLs for the OpenDev transition and
correct a couple of docstrings for utility functions.

Change-Id: I5f6fa4e2c2c6058ba5090078bbdf9dd9f31f692e
2019-10-11 13:38:07 +00:00
Tony Breeds
c6406fdbd5 Add new combined election type
This type is for when TC and PTL elections must overlap.  There is a
built in assumption that each "phase" of an election:
 - Nominations
 - Campaigning
 - Election

are completely synchronous

NOTE: This change leaves the template-emails broken, as I do not add new
functions for combined_$email.  This is because I'd like to
If64c075b4a799574bc51ccd13019d472ee9a4b0e merge first, and I'd also like
to avoid to many rebases

Change-Id: Id39c50e71dc91bea8034ce443287463094e2f37f
2019-05-28 15:43:35 +10:00
Andy McCrae
8e021580ad Only check Candidates during Active election
The CI jobs will fail outside of election time due to name mismatches,
but we don't need to run an election candidate CI job when there is no
active election.

Change-Id: I5b8d37d1c66fd96564741aa0aa69cc840ad39950
2019-05-04 17:37:54 +01:00
Tony Breeds
3bf36b7128 Don't validate .placeholder
When creating a new election we need to add a directory per project
(including the 'TC' as a pseudo project) we can't just create an empty
directory in git so we add a '.placeholder' file.

We have recently added a voting job that will run try to validate all
candidate files added in a review.  This includes the placeholder file.
CLearly this file will not pass validation and cause the job to fail.

Adding .placeholder to the zuul irrelevant-files variable wont work, so
instead filter .placeholder from the interesting files.

Change-Id: Ibd2224a5479d4ab9afbac227bac38080359a98bf
2019-01-10 15:50:24 +11:00
Tony Breeds
60fb423adf Add a tox environment for flexible candidate checking
By default ci_check_all_candidate_files.py, does as it implies and
checks all candidates for the current election.

Add new operation modes for:
 1. Checking all files for the current git commit '--HEAD'
 2. Checking all files specified on the command line

We also add a voting job on the check pipeline only for validating
the current review.  Local users are encouraged to use this as:

 tox -e ci-checks-review ; or
 tox -e ci-checks-review -- path/to/file

Change-Id: I0c82c59409bb58169840de42c02072aeae182b2b
Co-authored-by: Doug Hellmann <doug@doughellmann.com>
2018-12-12 14:09:05 +11:00
Tony Breeds
3efc347226 Use find_candidate_files() to determine which candidates to validate
We have utils.find_candidate_files() which correctly detects the type of
election and returns the appropriate list of files.  Lets use that
so limit the CI checks we do.

Change-Id: I36ccfa82137d0f05a031ab2a50dd4eb87a32094b
2018-12-12 14:09:05 +11:00
Doug Hellmann
fe0a1945e4 fix typo
candiate -> candidate

Change-Id: I455bf89f7d9fe8b819a0fa48c9341c02cc10eb9f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-05 08:40:04 +10:00
Doug Hellmann
386e19be05 fix tc project validation
We do not require TC candidates to have landed any patches, so skip that
test for those nominations.

Change-Id: I2a782f1ce1c52523f009dbd02c85d237c86e5c17
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-05 08:36:10 +10:00
Tony Breeds
609f5f4809 Make the errors more visible in ci-checks
Change-Id: Ia91a38666604df543133b16346f05acd1049bab6
2018-07-27 14:21:51 +10:00
Tony Breeds
8a3f32a01d Add a new tool meant for CI to validate all files under candidates
The new tool validates the current release looks to exist ; assuming it
does it performs the following checks against every file found:

1. The file looks like an email address (currently contains an '@')
2. The email address is found in the OSF directory
3. The email address has a merged commit in the expected timeframe for a
   deliverable under the governance of the project team the candidate is
   nominating for.

While this is meant to be used in CI, the output should be reasonably
readable by a person, either official or candidate.

Change-Id: I51e80f5d185e3ef0be53fd8c9fba19338d9a049a
2018-07-27 14:21:51 +10:00