Coder Social home page Coder Social logo

ktaeleman / relman-auto-nag Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozilla/bugbot

0.0 0.0 0.0 1.17 MB

A Mozilla release management tool to sent reminders to Firefox developers and improve Bugzilla metadata

License: BSD 3-Clause "New" or "Revised" License

Python 85.70% HTML 12.18% Shell 2.00% Mako 0.13%

relman-auto-nag's Introduction

https://travis-ci.org/mozilla/relman-auto-nag.svg?branch=master

This tool is used by Mozilla release management to send emails to the Firefox developers. It will query the bugzilla.mozilla.org database and send emails to Mozilla developers and their managers (if Mozilla staff).

The tool will also notify release managers about potential issues in bugzilla and autofix some categories of issues.

The list of checkers is documented on the Mozilla wiki: https://wiki.mozilla.org/Release_Management/autonag

This package currently uses Mozilla's Bugzilla REST API, and optionally the Mozilla IAM phonebook (to access bug assignees' managers & Mozilla email addresses).

Installation

  1. Check out the code:

    git clone git://github.com/mozilla/relman-auto-nag.git
    
  2. (optional) Create your virtualenv using virtualenvwrapper:

    virtualenv -p python3 venv
    source venv/bin/activate
    
  3. Install pip:

    easy_install pip
    
  4. Install the dependencies for Python 3 too:

    pip3 install -r requirements.txt
    

To run it into production, you will need the full list of employees + managers.

Automated Nagging Script

Before running:

  1. The LDAP + SMTP infos are used to send emails
  2. Need to generate an API key from bugzilla admin ( https://bugzilla.mozilla.org/userprefs.cgi?tab=apikey )
  3. Should generate an API key from Phabricator ( https://phabricator.services.mozilla.com/settings/user )
  4. The IAM secrets are used to generate a dump of phonebook, so they're mandatory but you still need to have such a dump
  5. The private entry contains URLs for private calendar in ICS format:
# in scripts/configs/config.json
{
  "ldap_username": "[email protected]",
  "ldap_password": "xxxxxxxxxxxxxx",
  "smtp_server": "smtp.xxx.xxx",
  "smtp_port": 314,
  "smtp_ssl": true,
  "bz_api_key": "xxxxxxxxxxxxxx",
  "phab_api_key": "xxxxxxxxxxxxxx",
  "iam_client_secret": "xxxxxxxxxxxxxx",
  "iam_client_id": "xxxxxxxxxxxxxx",
  "private":
  {
    "Core::General": "https://..."
  }
}
Do a dryrun::
python -m auto_nag.scripts.stalled -d

There is a ton of scripts in auto_nag/scripts/ so you should be able to find some good examples.

Setting up 'Round Robin' triage rotations

One use case for this tool is managing triage of multiple components across a team of multiple people.

To set up a new Round Robin rotation, a manager or team lead should create a Google Calendar with the rotation of triagers.

Then the administrators will need to create a configuration file:

# in scripts/configs/<name of rotation>_round_robin.json
{
    "fallback": "<Name of manager or lead>",
    "components":
    {
        "Product::Component": "default",
        "Product::Component": "default",
        
    },
    "default":
    {
        "calendar": "private://<Name of calendar>"
    }
}

The person requesting the round robin schedule must provide the URL of the calendar's .ics file.

In the calendar, the title of the events must be the full name of triage owner as it appears in Phonebook.

And then you just have to add an entry in auto_nag/scripts/config/tools.json in the round-robin section.

Once everything is set-up you can make a PR similar too https://github.com/mozilla/relman-auto-nag/pull/858/files

Running on a server

This needs to run on a private server because it will have login for smtp and bugzilla key so it can't currently be shared access.

Cronjob:

00 14 * * 1-5 $HOME/run_autonags_daily.sh &> /tmp/autonag.log
15 */1 * * * $HOME/runauto_nag_hourly.sh &> /tmp/autonag-hour.log

relman-auto-nag's People

Contributors

calixteman avatar sylvestre avatar lsblakk avatar marco-c avatar anoopvalluthadam avatar pyup-bot avatar dependabot-preview[bot] avatar jcristau avatar legneato avatar anubnair avatar lothiraldan avatar emceeaich avatar daviddahl avatar svoisen avatar bbajaj avatar ayush-1506 avatar bkerensa avatar davehunt avatar mozfreddyb avatar jbalogh avatar jensstutte avatar mozilla-github-standards avatar pascalchevrel avatar padenot avatar hsinyi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.