Skip to content

Instantly share code, notes, and snippets.

View lonnen's full-sized avatar
:shipit:

Lonnen lonnen

:shipit:
View GitHub Profile
2013-11-21 09:45:03,309 DEBUG - MainThread - successfully ran <class 'socorro.cron.jobs.bugzilla.BugzillaCronApp'> on 2013-11-21 17:45:03.309786+00:00
2013-11-21 09:45:03,318 DEBUG - MainThread - error when running <class 'socorro.cron.jobs.bugzilla.BugzillaCronApp'> on 2013-11-21 17:45:03.309786+00:00
Traceback (most recent call last):
File "/data/socorro/application/socorro/cron/crontabber.py", line 960, in _run_one
self._remember_success(job_class, last_success, t1 - t0)
File "/data/socorro/application/socorro/cron/crontabber.py", line 1022, in _remember_success
""", (app_name, success_date, '%.5f' % duration))
ProgrammingError: column "duration" of relation "crontabber_log" does not exist
LINE 5: duration
^
This service hook posts comments on Bugzilla bugs when commit messages
reference a bug by id number when commits are made to master
Bugs are recognised by the following formats, which are case-insensitive:
Ticket 123
Bug 123
Tracker item 123
Multiple bugs can also be specified by separating them with a comma,
git fetch origin pull/12/head:pr
# fetches Pull Request #12 into a branch named "pr"
# without adding remotes, etc
# can be used in an alias
$home = "/Users/${::boxen_user}"
$repos = "${home}/repos"
repository { "${repos}/install-all-firefox":
source => 'omgmog/install-all-firefox',
alias => 'clone-install-all-firefox'
}
exec { "${repos}/install-all-firefox/install-all-firefox.sh":
alias => 'install-firefox',
@lonnen
lonnen / gist:5922836
Created July 3, 2013 21:06
Summarized upcoming changes to the Socorro release process proposed June 05, 2013. Blocked only on the ability of engineers to push releases without operations involvement. Focus was on what could be implemented immediately (heh).

So we have some problems:

  • patches wait 7-14 days before shipping
  • there's lots of incentive for cherry picking, out-of-band releases, and holding off from releasing or freezing
  • it's difficult to keep track of the state
  • our branching model makes it easy for commits to go missing from one branch or another
  • our week is dominated by brief periods of intense action
    • the release is the central event of the week
    • all QA, the weekly meeting, and the overwhelming majority of our commits all happen within 24 hours of a release[1]
  • most of the time things are on stage the environment is idle and unwatched.

congratulations! high five

#!/usr/bin/env python
'''
Fetch /toolkit/components/telemetry/Histograms.json for various firefox
branches and store them in the local FS in `validation/[branch]/Histograms.json
'''
import os
import requests
build_map = {
@lonnen
lonnen / matching.py
Last active December 18, 2015 10:39
Produces a stable matching of Mozillians to summit locations based on each Mozillian's preferences over the different summit locations. see: http://xor.lonnen.com/2013/05/04/gale-shapley.html
# !/usr/bin/env python
# coding=utf-8
"""
Produces a stable matching of Mozillians to summit locations based on each
Mozillian's preferences over the different summit locations.
see: http://xor.lonnen.com/2013/05/04/gale-shapley.html
"""
import csv
@lonnen
lonnen / crimsontwins.coffee
Last active December 17, 2015 18:09
working draft of a crimsontwins hubot script powering crimsonguardcommanders in `#bots` drop it in your `/scripts` folder to play along at home
# Description
# push content to your crimsontwins
#
# Dependencies:
# None
#
# Configuration:
# CRIMSONTWINS_HOST
#
# Commands:

I'm playing with Boxen for setting up my new work machine. I really like the idea of setting up open source boxens for working on Mozilla stuff -- this could be very useful for onboarding new contributors, interns, employees, etc. Hack days get significantly easier to manage when people can just pull down a box.

Beyond that I end up managing several machines for my first degree relatives... and there's something appealing about being able to push updates to them magically with boxen + cron. This gets even more attractive if boxen could interface to the app store.

I want to remove editing puppet as a requirement to get what you want. I really like the basic homebrew interface for this and think part of it could be coopted for boxen to remove the need to edit puppet for basic things:

 brew install FORMULA...
 brew uninstall FORMULA...
 brew search [foo]