Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate requirements files to pickup new indirect dependencies #794

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/lint-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -e

LINTER_FILES="$(dirname "$0")/../.linter-files"

cat $LINTER_FILES | xargs isort --check-only --recursive
cat $LINTER_FILES | xargs isort --check-only
cat $LINTER_FILES | xargs flake8
2 changes: 1 addition & 1 deletion bin/lint-fix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -e

LINTER_FILES="$(dirname "$0")/../.linter-files"

cat $LINTER_FILES | xargs isort --recursive -y
cat $LINTER_FILES | xargs isort
cat $LINTER_FILES | xargs black
20 changes: 11 additions & 9 deletions docs/glean/metrics.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- AUTOGENERATED BY glean_parser. DO NOT EDIT. -->

# Metrics
This document enumerates the metrics collected by this project.
This document enumerates the metrics collected by this project using the [Glean SDK](https://mozilla.github.io/glean/book/index.html).
This project may depend on other projects which also collect metrics.
This means you might have to go searching through the dependency tree to get a full picture of everything collected by this project.

Expand All @@ -27,15 +27,17 @@ This ping includes the [client id](https://mozilla.github.io/glean/book/user/pin

The following metrics are added to the ping:

| Name | Type | Description | Data reviews | Extras | Expiration |
| --- | --- | --- | --- | --- | --- |
| usage.app |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The name of the app being used (firefox, gve, etc.) |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1581647#c9)||never |
| usage.bad_date |[datetime](https://mozilla.github.io/glean/book/user/metrics/datetime.html) |The bad date parameter used in a bisection, if present and specified as a date |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1651401#c5)||never |
| usage.build_type |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The build type being bisected (asan, debug, opt, pgo, shippable, ...) |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1651401#c5)||never |
| usage.good_date |[datetime](https://mozilla.github.io/glean/book/user/metrics/datetime.html) |The good date parameter used in a bisection, if present and specified as a date |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1651401#c5)||never |
| usage.launch_date |[datetime](https://mozilla.github.io/glean/book/user/metrics/datetime.html) |The launch parameter used when running a single build, if present and specified as a date |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1651401#c5)||never |
| usage.variant |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The variant of mozregression used to perform the bisection (gui, console, mach, etc.) |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1581647#c9)||never |
| Name | Type | Description | Data reviews | Extras | Expiration | [Data Sensitivity](https://wiki.mozilla.org/Firefox/Data_Collection) |
| --- | --- | --- | --- | --- | --- | --- |
| usage.app |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The name of the app being used (firefox, gve, etc.) |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1581647#c9)||never | |
| usage.bad_date |[datetime](https://mozilla.github.io/glean/book/user/metrics/datetime.html) |The bad date parameter used in a bisection, if present and specified as a date |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1651401#c5)||never | |
| usage.build_type |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The build type being bisected (asan, debug, opt, pgo, shippable, ...) |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1651401#c5)||never | |
| usage.good_date |[datetime](https://mozilla.github.io/glean/book/user/metrics/datetime.html) |The good date parameter used in a bisection, if present and specified as a date |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1651401#c5)||never | |
| usage.launch_date |[datetime](https://mozilla.github.io/glean/book/user/metrics/datetime.html) |The launch parameter used when running a single build, if present and specified as a date |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1651401#c5)||never | |
| usage.variant |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The variant of mozregression used to perform the bisection (gui, console, mach, etc.) |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1581647#c9)||never | |


Data categories are [defined here](https://wiki.mozilla.org/Firefox/Data_Collection).

<!-- AUTOGENERATED BY glean_parser. DO NOT EDIT. -->

7 changes: 6 additions & 1 deletion gui/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ def do_bundle(options):
"mozregression GUI.app", os.path.join("mozregression-gui", "mozregression GUI.app")
)
call(
"hdiutil", "create", "mozregression-gui.dmg", "-srcfolder", "mozregression-gui", "-ov",
"hdiutil",
"create",
"mozregression-gui.dmg",
"-srcfolder",
"mozregression-gui",
"-ov",
)
else:
# seems like some qml stuff is also bundled on Linux
Expand Down
4 changes: 3 additions & 1 deletion gui/mozregui/addons_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def __init__(self, parent=None):
@Slot()
def add_addon(self):
(fileNames, _) = QFileDialog.getOpenFileNames(
self, "Choose one or more addon files", filter="addon file (*.xpi)",
self,
"Choose one or more addon files",
filter="addon file (*.xpi)",
)
for fileName in fileNames:
self.list_model.add_addon(fileName)
Expand Down
4 changes: 3 additions & 1 deletion gui/mozregui/bisection.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def _evaluate(self):
# a skip.
if self.download_in_background and self.test_runner.verdict != "s":
self.index_promise = IndexPromise(
self.mid, self.bisection._download_next_builds, args=(self._persist_files,),
self.mid,
self.bisection._download_next_builds,
args=(self._persist_files,),
)
# run the build evaluation
self.bisection.evaluate(self.build_infos)
Expand Down
4 changes: 3 additions & 1 deletion gui/mozregui/pref_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def add_pref(self):
@Slot()
def add_prefs_from_file(self):
(fileName, _) = QFileDialog.getOpenFileName(
self, "Choose a preference file", filter="pref file (*.json *.ini)",
self,
"Choose a preference file",
filter="pref file (*.json *.ini)",
)
if fileName:
self.pref_model.add_prefs_from_file(fileName)
Expand Down
6 changes: 5 additions & 1 deletion gui/mozregui/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ def update_pushlogurl(self, bisection):
def status_text(self):
if "pushlog_url" not in self.data:
return ReportItem.status_text(self)
return "Bisecting on %s [%s - %s]" % (self.data["repo_name"], self.first, self.last,)
return "Bisecting on %s [%s - %s]" % (
self.data["repo_name"],
self.first,
self.last,
)


class StepItem(ReportItem):
Expand Down
5 changes: 4 additions & 1 deletion gui/mozregui/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,10 @@ def options(self):
class BisectionWizard(Wizard):
def __init__(self, parent=None):
Wizard.__init__(
self, "Bisection wizard", (IntroPage, ProfilePage, BuildSelectionPage), parent=parent,
self,
"Bisection wizard",
(IntroPage, ProfilePage, BuildSelectionPage),
parent=parent,
)


Expand Down
4 changes: 3 additions & 1 deletion gui/tests/test_addons_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ def test_add_addon(qtbot, addons_editor, addons_file):
dlg.getOpenFileNames.return_value = ([filePath], "addon file (*.xpi)")
qtbot.mouseClick(addons_editor.ui.add_addon, Qt.LeftButton)
dlg.getOpenFileNames.assert_called_once_with(
addons_editor, "Choose one or more addon files", filter="addon file (*.xpi)",
addons_editor,
"Choose one or more addon files",
filter="addon file (*.xpi)",
)

# check addons
Expand Down
7 changes: 6 additions & 1 deletion gui/tests/test_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
@pytest.mark.parametrize(
"os, bits, wizard_class, pages",
[
("linux", 64, BisectionWizard, PAGES_BISECTION_WIZARD,),
(
"linux",
64,
BisectionWizard,
PAGES_BISECTION_WIZARD,
),
("win", 32, BisectionWizard, PAGES_BISECTION_WIZARD),
("mac", 64, BisectionWizard, PAGES_BISECTION_WIZARD),
("linux", 64, SingleRunWizard, PAGES_SINGLE_RUN_WIZARD),
Expand Down
17 changes: 14 additions & 3 deletions mozregression/bisector.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def get_pushlog_url(self):
first_rev, last_rev = self.get_range()
if first_rev == last_rev:
return "%s/pushloghtml?changeset=%s" % (self.found_repo, first_rev)
return "%s/pushloghtml?fromchange=%s&tochange=%s" % (self.found_repo, first_rev, last_rev,)
return "%s/pushloghtml?fromchange=%s&tochange=%s" % (
self.found_repo,
first_rev,
last_rev,
)

def get_range(self):
return self._reverse_if_find_fix(self.good_revision, self.bad_revision)
Expand Down Expand Up @@ -213,7 +217,11 @@ def get_pushlog_url(self):
return BisectorHandler.get_pushlog_url(self)
else:
start, end = self.get_date_range()
return "%s/pushloghtml?startdate=%s&enddate=%s\n" % (self.found_repo, start, end,)
return "%s/pushloghtml?startdate=%s&enddate=%s\n" % (
self.found_repo,
start,
end,
)


class IntegrationHandler(BisectorHandler):
Expand Down Expand Up @@ -320,7 +328,10 @@ def handle_merge(self):
try:
jp2 = JsonPushes(branch)
raw = [int(p.push_id) for p in jp2.pushes_within_changes(oldest, youngest)]
data = jp2.pushes(startID=str(min(raw) - 2), endID=str(max(raw)),)
data = jp2.pushes(
startID=str(min(raw) - 2),
endID=str(max(raw)),
)

older = data[0].changeset
youngest = data[-1].changeset
Expand Down
18 changes: 14 additions & 4 deletions mozregression/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
class _StopAction(Action):
def __init__(self, option_strings, dest=SUPPRESS, default=SUPPRESS, help=None):
super(_StopAction, self).__init__(
option_strings=option_strings, dest=dest, default=default, nargs=0, help=help,
option_strings=option_strings,
dest=dest,
default=default,
nargs=0,
help=help,
)

def __call__(self, parser, namespace, values, option_string=None):
Expand Down Expand Up @@ -120,7 +124,9 @@ def create_parser(defaults):
)

parser.add_argument(
"--list-releases", action=ListReleasesAction, help="list all known releases and exit",
"--list-releases",
action=ListReleasesAction,
help="list all known releases and exit",
)

parser.add_argument(
Expand All @@ -142,7 +148,9 @@ def create_parser(defaults):
)

parser.add_argument(
"--find-fix", action="store_true", help="Search for a bug fix instead of a regression.",
"--find-fix",
action="store_true",
help="Search for a bug fix instead of a regression.",
)

parser.add_argument(
Expand Down Expand Up @@ -397,7 +405,9 @@ def create_parser(defaults):
)

parser.add_argument(
"--write-config", action=WriteConfigAction, help="Helps to write the configuration file.",
"--write-config",
action=WriteConfigAction,
help="Helps to write the configuration file.",
)

parser.add_argument("--debug", "-d", action="store_true", help="Show the debug output.")
Expand Down
9 changes: 7 additions & 2 deletions mozregression/download_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def __init__(
progress=None,
):
self.thread = threading.Thread(
target=self._download, args=(url, dest, finished_callback, chunk_size, session),
target=self._download,
args=(url, dest, finished_callback, chunk_size, session),
)
self._lock = threading.Lock()
self.__url = url
Expand Down Expand Up @@ -328,7 +329,11 @@ class BuildDownloadManager(DownloadManager):
"""

def __init__(
self, destdir, session=requests, background_dl_policy="cancel", persist_limit=None,
self,
destdir,
session=requests,
background_dl_policy="cancel",
persist_limit=None,
):
DownloadManager.__init__(self, destdir, session=session, persist_limit=persist_limit)
self._downloads_bg = set()
Expand Down
5 changes: 4 additions & 1 deletion mozregression/fetch_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,10 @@ class ThunderbirdIntegrationConfigMixin(IntegrationConfigMixin):
def tk_routes(self, push):
for build_type in self.build_types:
yield "comm.v2.{}.revision.{}.thunderbird.{}-{}".format(
self.integration_branch, push.changeset, _common_tk_part(self), build_type,
self.integration_branch,
push.changeset,
_common_tk_part(self),
build_type,
)
self._inc_used_build()
return
Expand Down
17 changes: 14 additions & 3 deletions mozregression/launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ def _disableUpdateByPolicy(self):
json.dump(updatePolicy, fp, indent=2)

def _start(
self, profile=None, addons=(), cmdargs=(), preferences=None, adb_profile_dir=None,
self,
profile=None,
addons=(),
cmdargs=(),
preferences=None,
adb_profile_dir=None,
):
profile = self._create_profile(profile=profile, addons=addons, preferences=preferences)

Expand All @@ -221,7 +226,8 @@ def _on_exit():
except Exception:
print()
LOG.error(
"Error while waiting process, consider filing a bug.", exc_info=True,
"Error while waiting process, consider filing a bug.",
exc_info=True,
)
return
if exitcode != 0:
Expand Down Expand Up @@ -391,7 +397,12 @@ def _install(self, dest):
self.adb.run_as_package = self.adb.install_app(dest)

def _start(
self, profile=None, addons=(), cmdargs=(), preferences=None, adb_profile_dir=None,
self,
profile=None,
addons=(),
cmdargs=(),
preferences=None,
adb_profile_dir=None,
):
# for now we don't handle addons on the profile for fennec
profile = self._create_profile(profile=profile, preferences=preferences)
Expand Down
11 changes: 8 additions & 3 deletions mozregression/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,14 @@ def _bisect_integration(self, good_rev, bad_rev, ensure_good_and_bad=False, expa
jp = JsonPushes(handler.build_range[1].repo_name)
num_pushes = len(
jp.pushes_within_changes(
handler.build_range[0].changeset, handler.build_range[1].changeset,
handler.build_range[0].changeset,
handler.build_range[1].changeset,
)
)
if num_pushes == 2:
bugids = find_bugids_in_push(
handler.build_range[1].repo_name, handler.build_range[1].changeset,
handler.build_range[1].repo_name,
handler.build_range[1].changeset,
)
if len(bugids) == 1:
word = "fix" if handler.find_fix else "regression"
Expand Down Expand Up @@ -307,7 +309,10 @@ def check_mozregression_version():


def main(
argv=None, namespace=None, check_new_version=True, mozregression_variant="console",
argv=None,
namespace=None,
check_new_version=True,
mozregression_variant="console",
):
"""
main entry point of mozregression command line.
Expand Down
5 changes: 4 additions & 1 deletion mozregression/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def create_launcher(build_info):
else:
desc = "for %s" % build_info.build_date
else:
desc = "built on %s, revision %s" % (build_info.build_date, build_info.short_changeset,)
desc = "built on %s, revision %s" % (
build_info.build_date,
build_info.short_changeset,
)
LOG.info("Running %s build %s" % (build_info.repo_name, desc))

return mozlauncher(build_info)
Expand Down
Loading