Skip to content

Instantly share code, notes, and snippets.

@ahal
ahal / fetch-content
Last active July 11, 2022 15:11
fetch-content
#!/usr/bin/python3 -u
# 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/.
import argparse
import bz2
import concurrent.futures
import gzip
import hashlib
@ahal
ahal / community-aws-worker-pools.md
Last active January 25, 2022 22:31
Firefox-CI Worker Pools on AWS
@ahal
ahal / try_usage_last_month.md
Last active November 26, 2020 20:49
How try selectors are used over various time intervals
Method Pushes Percent Users Push / User Hours / Push
total 4730 100.0 245 19.31 45.1
mach try fuzzy 1773 37.5 139 12.76 27.9
mach try again 865 18.3 62 13.95 48.3
mach try chooser 728 15.4 83 8.77 62.0
mach try auto 725 15.3 78 9.29 54.0
other 235 5.0 5 47.0 0.0
vanilla try syntax 129 2.7 11 11.73 0.0
mach try syntax 116 2.5 18 6.44 72.1
from typing import Callable, Type
def register() -> Callable:
def wrap(cls: Type) -> Type :
return cls
return wrap
@ahal
ahal / last-month.md
Last active July 7, 2020 16:03
`mach try auto` decision task statuses
Status Count Percent
completed 566 89.8
failed 61 9.7
canceled 2 0.3
claim-expired 1 0.2

It's late and I'm tired, but I was lying in bed thinking about test scheduling (yeah, yeah), and had a moment of clarity. This is my attempt to write my thoughts down before falling asleep and losing them all.

We've been trying to think of ways to integrate code coverage into our scheduling algorithms somehow. The problem is that we don't have a reliable way of mapping test paths to chunks. Chunks vary by platform and even within the same platform tests can move around between chunks from one push to another. My realization is that to date we have been thinking of code coverage (or machine learning) reduction as something that happens during the optimization phase. Here are the full set of

diff --git a/tools/lint/docs/usage.rst b/tools/lint/docs/usage.rst
--- a/tools/lint/docs/usage.rst
+++ b/tools/lint/docs/usage.rst
@@ -1,14 +1,28 @@
Running Linters Locally
=======================
Using the Command Line
----------------------
Traceback (most recent call last):
File "/home/ahal/dev/mozilla-central/python/mozlint/mozlint/roller.py", line 39, in _run_worker
res = func(paths, config, **lintargs) or []
File "/home/ahal/dev/mozilla-central/python/mozlint/mozlint/types.py", line 50, in __call__
return self._lint(paths, config, **lintargs)
File "/home/ahal/dev/mozilla-central/python/mozlint/mozlint/types.py", line 134, in _lint
return func(files, config, **lintargs)
File "/home/ahal/dev/mozilla-central/tools/lint/rst/__init__.py", line 100, in lint
filename, lineno, error, level, message = parse_with_split(errors)
File "/home/ahal/dev/mozilla-central/tools/lint/rst/__init__.py", line 65, in parse_with_split
diff --git a/tools/lint/license.yml b/tools/lint/license.yml
--- a/tools/lint/license.yml
+++ b/tools/lint/license.yml
@@ -1,28 +1,44 @@
---
license:
description: License Check
include:
- .
exclude:
Poetry
======
* Version: 0.12.11
* Python: 3.6.8
Virtualenv
==========