Skip to content

Instantly share code, notes, and snippets.

View lonnen's full-sized avatar
:shipit:

Lonnen lonnen

:shipit:
View GitHub Profile
@lonnen
lonnen / heroku-pr-cleanup.sh
Last active February 12, 2016 23:55
heroku pr app cleanup script
# we've been hitting a bug with PR apps under the older permissions system
# which leaves a bunch of dead ones lying around. this will clean them up.
# adjust the grep pattern and organization as necessary
for APP in `heroku apps -o $ORGANIZATION | grep -e -pr-`
do
heroku apps:destroy --app $APP --confirm $APP
done
@lonnen
lonnen / 00-order-of-operations.md
Last active December 30, 2015 22:49
Socorro build investigation

Build steps identified in Jenkins log output.

Timestamps are the amount of time MM:SS until the next call to make. This may be misleading. It's unclear when make is calling a build dependency and when we're executing a new line of build.sh.

Stars indicate how many times previously the make target has already been run during this single build.

  00:02 [jenkins] Lets Commence
  00:06 [jenkins] checkout the repo
  00:00 [make] clean
 00:01 [make] bootstrap
#!/bin/bash
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Jenkins build script for building Breakpad
# any failures in this script should cause the build to fail
set -e
@lonnen
lonnen / 00
Last active December 30, 2015 12:39
draft socorro makefile target changes
what we've got now:
all
test
test-socorro
test-webapp
bootstrap
install
reinstall
install-socorro
lint
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