Tools for managing community goals.
Go to file
Andreas Jaeger 948b13513b Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update classifiers
- Remove install_command from tox.ini, the default is fine
- Stop py35 testing, OpenStack has py36 as minimal version

Change-Id: Iee8ffab15e11afe417f7369d907491b62ba063fb
2020-04-11 14:48:40 +02:00
burndown-generator Add initial tools for burndown charts 2018-01-18 16:45:16 +00:00
goal_tools Replace openstack.org git:// URLs with https:// 2019-03-24 20:33:42 +00:00
queries add an ocata-em report showing contributions by org and project 2019-04-25 11:43:28 -04:00
tools Replace openstack.org git:// URLs with https:// 2019-03-24 20:33:42 +00:00
.gitignore new command to build sql database directly from gerrit 2019-01-07 18:37:34 -05:00
.gitreview OpenDev Migration Patch 2019-04-19 19:42:05 +00:00
.stestr.conf set up stestr 2018-04-29 17:09:07 -04:00
.zuul.yaml Cleanup py27 support 2020-04-11 14:48:40 +02:00
README.rst Replace openstack.org git:// URLs with https:// 2019-03-24 20:33:42 +00:00
requirements.txt add instructions about tracking status 2018-08-06 11:52:27 -04:00
setup.cfg Cleanup py27 support 2020-04-11 14:48:40 +02:00
setup.py Cleanup py27 support 2020-04-11 14:48:40 +02:00
test-requirements.txt set up stestr 2018-04-29 17:09:07 -04:00
tox.ini Cleanup py27 support 2020-04-11 14:48:40 +02:00

README.rst

Community-wide Goal Tools

To use the tools, run tox -e venv --notest to create a virtualenv with all of the dependencies. The tools will then be installed into .tox/venv/bin and can be run directly from there or via tox -e venv -- COMMAND_NAME.

import-goal

import-goal can be used to create stories, tasks, and boards in storyboard for tracking work on completing the goals.

who-helped

who-helped is a tool for looking at the contributor statistics for a set of patches.

python3-first

Setup

To set up a workspace to use the python3-first tools:

$ mkdir python3-first
$ cd python3-first
$ git clone https://git.openstack.org/openstack-infra/project-config
$ git clone https://git.openstack.org/openstack-infra/openstack-zuul-jobs
$ git clone https://git.openstack.org/openstack-infra/zuul-jobs
$ git clone https://git.openstack.org/openstack/goal-tools
$ mkdir Output

Preparing Patches

Before preparing any patches for a team, make sure that all of the changes to modify the .gitreview file for the stable/rocky branches in the repositories have been merged. Failing to do this will mean some rocky branch changes will be proposed against master.

To prepare the patches for one team, use do_team.sh:

$ cd goal-tools
$ ./tools/python3-first/do_team.sh ../Output Documentation

The script will create a subdirectory in the output location using the team name, clone all of the repositories owned by the team, then process each one to create a patch for each branch that needs to have job settings imported.

It will also create a log file in the output directory called do_team.TIMESTAMP.log (where "TIMESTAMP" is replaced with a real timestamp. The log file should show all of the work done, including the diffs for all of the patches created.

$ ls -1 ../Output/Documentation/
do_team.2018-08-04T08:15:29-04:00.log
master
ocata
openstack
pike
queens

Proposing Patches

BEFORE PROPOSING ANY PATCHES FOR A TEAM, talk to the PTL of that team via email or IRC to ensure they are ready to receive them.

Review the log file created by do_team.sh before proposing the patches to ensure that there are no extraneous changes (the YAML parser does not produce exactly the same format output as input, and we have seen a couple of cases where it introduces errors by changing the indentation level incorrectly).

Then use propose.sh to submit the patches:

$ ./tools/python3-first/propose.sh ../Output Documentation

The script will provide a list of all of the patches to be proposed and a count, then wait for you to press <Return>. After you do, it will submit all of the patches to gerrit.

The project-config patch

do_team.sh will trigger the script to create the patch to remove the settings from openstack-infra/project-config for all of the repos for a team. propose.sh WILL NOT submit the patch, though, because we do not want it to accidentally be approved before the jobs are added in each repository. YOU SHOULD PROPOSE IT early and mark it as a work-in-progress by setting the Workflow flag to -1 so teams can use it while reviewing the other patches.

$ cd ../Output/Documentation/openstack-infra/project-config
$ git review

Marking the Team "In Progress"

  1. Assign yourself to the task from https://storyboard.openstack.org/#!/story/2002586 for the team you are working on and set the status to "Review".

  2. The Infrastructure team needs to know not to approve changes to job configurations for a team while the team's settings are being migrated. To inform them, send email to the openstack-infra@lists.openstack.org list. The migration announce command will build a message body containing all of the repository names.:

    $ .tox/venv/bin/python3-first migration announce Oslo
    
    The Zuul project settings for the Oslo repositories
    has begun. Please do not approve any changes to
    openstack-infra/project-config/zuul.d/projects.yaml for
    the following repositories:
    
    - openstack-dev/cookiecutter
    - openstack-dev/oslo-cookiecutter
    - openstack-dev/pbr
    - openstack/automaton
    ...

    See http://lists.openstack.org/pipermail/openstack-infra/2018-August/006039.html for an example.

Marking the Team "Complete"

  1. Update the sign-up task from https://storyboard.openstack.org/#!/story/2002586 and set the status to "Merged".
  2. Reply to the preivous message on the openstack-infra mailing list to announce that the migration for the team is completed.

Tools

python3-first is the parent command for a set of tools for implementing the python3-first goal.

The jobs extract sub-command reads the Zuul configuration from the openstack/project-config repository and then for a given repository and branch prints the set of job definitions that should be copied into that branch of that project.

$ git clone https://git.openstack.org/openstack-infra/project-config
$ git clone https://git.openstack.org/openstack/goal-tools
$ cd goal-tools
$ tox -e venv -- python3-first jobs extract --project-config ../project-config \
openstack-dev/devstack stable/queens

The jobs retain sub-command reads the same Zuul configuration data and prints the settings that need to stay in openstack/project-config.

$ tox -e venv -- python3-first jobs retain --project-config ../project-config \
openstack-dev/devstack

The jobs update command will modify the zuul settings in a repository to include all of the settings shown by jobs extract.

$ git clone https://git.openstack.org/openstack/oslo.config
$ cd oslo.config
$ git checkout -b python3-first
$ cd ../goal-tools
$ tox -e venv -- python3-first jobs update --project-config ../project-config \
../oslo.config

The repos clone command will use the project governance data to find a list of all of the git repositories managed by a project team and then clone local copies of all of them. This makes it easier to work on all of the projects for a single team as a batch.

$ mkdir Oslo
$ cd goal-tools
$ tox -e venv -- python3-first repos clone ../Oslo Oslo

Use the -v option to python3-first to see debug information on stderr (allowing stdout to be redirected to a file safely).

There are several higher-level wrapper scripts for running these tools in tools/python3-first.

do_team.sh takes as input a goal URL, a working directory and a team name. It clones all of the repositories owned by the team and prepares local branches with patches to import jobs into master and all of the relevant stable branches.

$ cd goal-tools
$ ./tools/python3-first/do_team.sh ../Py3FirstGoalWork Documentation

process_team.sh can be used to re-run one stage of the patch creation process for all of the repos and a single branch.

$ ./tools/python3-first/process_team.sh ../Py3FirstGoalWork Documentation stable/rocky

do_repo.sh creates the branch and patch for a single repository.

$ ./tools/python3-first/do_repo.sh ../Py3FirstGoalWork/openstack/whereto stable/rocky

After all of the patches for a team are prepared locally, they can be submitted for review using propose.sh.

$ ./tools/python3-first/propose.sh ../Py3FirstGoalWork Documentation