зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1891768 - [ci] Swap out 'json-automationrelevance' for new 'json-pushchangedfiles' endpoint, r=sheehan,taskgraph-reviewers,bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D209060
This commit is contained in:
Родитель
35c2275d1d
Коммит
405b9346a3
|
@ -16,7 +16,7 @@ from mozpack.path import match as mozpackmatch
|
|||
from mozversioncontrol import InvalidRepoPath, get_repository_object
|
||||
|
||||
from gecko_taskgraph import GECKO
|
||||
from gecko_taskgraph.util.hg import get_json_automationrelevance
|
||||
from gecko_taskgraph.util.hg import get_json_pushchangedfiles
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -27,9 +27,8 @@ def get_changed_files(repository, revision):
|
|||
Get the set of files changed in the push headed by the given revision.
|
||||
Responses are cached, so multiple calls with the same arguments are OK.
|
||||
"""
|
||||
contents = get_json_automationrelevance(repository, revision)
|
||||
try:
|
||||
changesets = contents["changesets"]
|
||||
return get_json_pushchangedfiles(repository, revision)["files"]
|
||||
except KeyError:
|
||||
# We shouldn't hit this error in CI.
|
||||
if os.environ.get("MOZ_AUTOMATION"):
|
||||
|
@ -39,17 +38,6 @@ def get_changed_files(repository, revision):
|
|||
# version control.
|
||||
return get_locally_changed_files(GECKO)
|
||||
|
||||
logger.debug("{} commits influencing task scheduling:".format(len(changesets)))
|
||||
changed_files = set()
|
||||
for c in changesets:
|
||||
desc = "" # Support empty desc
|
||||
if c["desc"]:
|
||||
desc = c["desc"].splitlines()[0].encode("ascii", "ignore")
|
||||
logger.debug(" {cset} {desc}".format(cset=c["node"][0:12], desc=desc))
|
||||
changed_files |= set(c["files"])
|
||||
|
||||
return changed_files
|
||||
|
||||
|
||||
def check(params, file_patterns):
|
||||
"""Determine whether any of the files changed in the indicated push to
|
||||
|
|
|
@ -1,358 +0,0 @@
|
|||
{
|
||||
"changesets": [
|
||||
{
|
||||
"author": "James Long <longster@gmail.com>",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1300866",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1300866"
|
||||
}
|
||||
],
|
||||
"date": [1473196655.0, 14400],
|
||||
"desc": "Bug 1300866 - expose devtools require to new debugger r=jlast,bgrins",
|
||||
"extra": {
|
||||
"branch": "default"
|
||||
},
|
||||
"files": ["devtools/client/debugger/index.html"],
|
||||
"node": "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"parents": ["37c9349b4e8167a61b08b7e119c21ea177b98942"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"pushdate": [1473261248, 0],
|
||||
"pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"pushid": 30664,
|
||||
"pushnodes": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"a14f88a9af7a59e677478694bafd9375ac53683e"
|
||||
],
|
||||
"pushuser": "cbook@mozilla.com",
|
||||
"rev": 312890,
|
||||
"reviewers": [
|
||||
{
|
||||
"name": "jlast",
|
||||
"revset": "reviewer(jlast)"
|
||||
},
|
||||
{
|
||||
"name": "bgrins",
|
||||
"revset": "reviewer(bgrins)"
|
||||
}
|
||||
],
|
||||
"treeherderrepo": "mozilla-central",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
|
||||
},
|
||||
{
|
||||
"author": "Wes Kocher <wkocher@mozilla.com>",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [],
|
||||
"date": [1473208638.0, 25200],
|
||||
"desc": "Merge m-c to fx-team, a=merge",
|
||||
"extra": {
|
||||
"branch": "default"
|
||||
},
|
||||
"files": ["taskcluster/scripts/builder/build-l10n.sh"],
|
||||
"node": "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"parents": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"91c2b9d5c1354ca79e5b174591dbb03b32b15bbf"
|
||||
],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"pushdate": [1473261248, 0],
|
||||
"pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"pushid": 30664,
|
||||
"pushnodes": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"a14f88a9af7a59e677478694bafd9375ac53683e"
|
||||
],
|
||||
"pushuser": "cbook@mozilla.com",
|
||||
"rev": 312891,
|
||||
"reviewers": [
|
||||
{
|
||||
"name": "merge",
|
||||
"revset": "reviewer(merge)"
|
||||
}
|
||||
],
|
||||
"treeherderrepo": "mozilla-central",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
|
||||
},
|
||||
{
|
||||
"author": "Towkir Ahmed <towkir17@gmail.com>",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1296648",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1296648"
|
||||
}
|
||||
],
|
||||
"date": [1472957580.0, 14400],
|
||||
"desc": "Bug 1296648 - Fix direction of .ruleview-expander.theme-twisty in RTL locales. r=ntim",
|
||||
"extra": {
|
||||
"branch": "default"
|
||||
},
|
||||
"files": ["devtools/client/themes/rules.css"],
|
||||
"node": "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"parents": ["73a6a267a50a0e1c41e689b265ad3eebe43d7ac6"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"pushdate": [1473261248, 0],
|
||||
"pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"pushid": 30664,
|
||||
"pushnodes": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"a14f88a9af7a59e677478694bafd9375ac53683e"
|
||||
],
|
||||
"pushuser": "cbook@mozilla.com",
|
||||
"rev": 312892,
|
||||
"reviewers": [
|
||||
{
|
||||
"name": "ntim",
|
||||
"revset": "reviewer(ntim)"
|
||||
}
|
||||
],
|
||||
"treeherderrepo": "mozilla-central",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
|
||||
},
|
||||
{
|
||||
"author": "Oriol <oriol-bugzilla@hotmail.com>",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1300336",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1300336"
|
||||
}
|
||||
],
|
||||
"date": [1472921160.0, 14400],
|
||||
"desc": "Bug 1300336 - Allow pseudo-arrays to have a length property. r=fitzgen",
|
||||
"extra": {
|
||||
"branch": "default"
|
||||
},
|
||||
"files": [
|
||||
"devtools/client/webconsole/test/browser_webconsole_output_06.js",
|
||||
"devtools/server/actors/object.js"
|
||||
],
|
||||
"node": "99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"parents": ["16a1a91f9269ab95dd83eb29dc5d0227665f7d94"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"pushdate": [1473261248, 0],
|
||||
"pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"pushid": 30664,
|
||||
"pushnodes": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"a14f88a9af7a59e677478694bafd9375ac53683e"
|
||||
],
|
||||
"pushuser": "cbook@mozilla.com",
|
||||
"rev": 312893,
|
||||
"reviewers": [
|
||||
{
|
||||
"name": "fitzgen",
|
||||
"revset": "reviewer(fitzgen)"
|
||||
}
|
||||
],
|
||||
"treeherderrepo": "mozilla-central",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
|
||||
},
|
||||
{
|
||||
"author": "Ruturaj Vartak <ruturaj@gmail.com>",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1295010",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1295010"
|
||||
}
|
||||
],
|
||||
"date": [1472854020.0, -7200],
|
||||
"desc": "Bug 1295010 - Don't move the eyedropper to the out of browser window by keyboard navigation. r=pbro\n\nMozReview-Commit-ID: vBwmSxVNXK",
|
||||
"extra": {
|
||||
"amend_source": "6885024ef00cfa33d73c59dc03c48ebcda9ccbdd",
|
||||
"branch": "default",
|
||||
"histedit_source": "c43167f0a7cbe9f4c733b15da726e5150a9529ba",
|
||||
"rebase_source": "b74df421630fc46dab6b6cc026bf3e0ae6b4a651"
|
||||
},
|
||||
"files": [
|
||||
"devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js",
|
||||
"devtools/client/inspector/test/head.js",
|
||||
"devtools/server/actors/highlighters/eye-dropper.js"
|
||||
],
|
||||
"node": "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"parents": ["99c542fa43a72ee863c813b5624048d1b443549b"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"pushdate": [1473261248, 0],
|
||||
"pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"pushid": 30664,
|
||||
"pushnodes": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"a14f88a9af7a59e677478694bafd9375ac53683e"
|
||||
],
|
||||
"pushuser": "cbook@mozilla.com",
|
||||
"rev": 312894,
|
||||
"reviewers": [
|
||||
{
|
||||
"name": "pbro",
|
||||
"revset": "reviewer(pbro)"
|
||||
}
|
||||
],
|
||||
"treeherderrepo": "mozilla-central",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
|
||||
},
|
||||
{
|
||||
"author": "Matteo Ferretti <mferretti@mozilla.com>",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1299154",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1299154"
|
||||
}
|
||||
],
|
||||
"date": [1472629906.0, -7200],
|
||||
"desc": "Bug 1299154 - added Set/GetOverrideDPPX to restorefromHistory; r=mstange\n\nMozReview-Commit-ID: AsyAcG3Igbn\n",
|
||||
"extra": {
|
||||
"branch": "default",
|
||||
"committer": "Matteo Ferretti <mferretti@mozilla.com> 1473236511 -7200"
|
||||
},
|
||||
"files": [
|
||||
"docshell/base/nsDocShell.cpp",
|
||||
"dom/tests/mochitest/general/test_contentViewer_overrideDPPX.html"
|
||||
],
|
||||
"node": "541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"parents": ["a6b6a93eb41a05e310a11f0172f01ba9b21d3eac"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"pushdate": [1473261248, 0],
|
||||
"pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"pushid": 30664,
|
||||
"pushnodes": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"a14f88a9af7a59e677478694bafd9375ac53683e"
|
||||
],
|
||||
"pushuser": "cbook@mozilla.com",
|
||||
"rev": 312895,
|
||||
"reviewers": [
|
||||
{
|
||||
"name": "mstange",
|
||||
"revset": "reviewer(mstange)"
|
||||
}
|
||||
],
|
||||
"treeherderrepo": "mozilla-central",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
|
||||
},
|
||||
{
|
||||
"author": "Patrick Brosset <pbrosset@mozilla.com>",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1295010",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1295010"
|
||||
}
|
||||
],
|
||||
"date": [1473239449.0, -7200],
|
||||
"desc": "Bug 1295010 - Removed testActor from highlighterHelper in inspector tests; r=me\n\nMozReview-Commit-ID: GMksl81iGcp",
|
||||
"extra": {
|
||||
"branch": "default"
|
||||
},
|
||||
"files": [
|
||||
"devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js",
|
||||
"devtools/client/inspector/test/head.js"
|
||||
],
|
||||
"node": "041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"parents": ["541c9086c0f27fba60beecc9bc94543103895c86"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"pushdate": [1473261248, 0],
|
||||
"pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"pushid": 30664,
|
||||
"pushnodes": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"a14f88a9af7a59e677478694bafd9375ac53683e"
|
||||
],
|
||||
"pushuser": "cbook@mozilla.com",
|
||||
"rev": 312896,
|
||||
"reviewers": [
|
||||
{
|
||||
"name": "me",
|
||||
"revset": "reviewer(me)"
|
||||
}
|
||||
],
|
||||
"treeherderrepo": "mozilla-central",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
|
||||
},
|
||||
{
|
||||
"author": "Carsten \"Tomcat\" Book <cbook@mozilla.com>",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [],
|
||||
"date": [1473261233.0, -7200],
|
||||
"desc": "merge fx-team to mozilla-central a=merge",
|
||||
"extra": {
|
||||
"branch": "default"
|
||||
},
|
||||
"files": [],
|
||||
"node": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"parents": [
|
||||
"3d0b41fdd93bd8233745eadb4e0358e385bf2cb9",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a"
|
||||
],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"pushdate": [1473261248, 0],
|
||||
"pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
|
||||
"pushid": 30664,
|
||||
"pushnodes": [
|
||||
"ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
|
||||
"73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
|
||||
"16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
|
||||
"99c542fa43a72ee863c813b5624048d1b443549b",
|
||||
"a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
|
||||
"541c9086c0f27fba60beecc9bc94543103895c86",
|
||||
"041a925171e431bf51fb50193ab19d156088c89a",
|
||||
"a14f88a9af7a59e677478694bafd9375ac53683e"
|
||||
],
|
||||
"pushuser": "cbook@mozilla.com",
|
||||
"rev": 312897,
|
||||
"reviewers": [
|
||||
{
|
||||
"name": "merge",
|
||||
"revset": "reviewer(merge)"
|
||||
}
|
||||
],
|
||||
"treeherderrepo": "mozilla-central",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
|
||||
}
|
||||
],
|
||||
"visible": true
|
||||
}
|
|
@ -3,14 +3,11 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
|
||||
import json
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from mozunit import main
|
||||
|
||||
from gecko_taskgraph import files_changed
|
||||
from gecko_taskgraph.util import hg
|
||||
|
||||
PARAMS = {
|
||||
"head_repository": "https://hg.mozilla.org/mozilla-central",
|
||||
|
@ -31,40 +28,17 @@ FILES_CHANGED = [
|
|||
]
|
||||
|
||||
|
||||
class FakeResponse:
|
||||
def json(self):
|
||||
with open(
|
||||
os.path.join(os.path.dirname(__file__), "automationrelevance.json")
|
||||
) as f:
|
||||
return json.load(f)
|
||||
|
||||
|
||||
class TestGetChangedFiles(unittest.TestCase):
|
||||
def setUp(self):
|
||||
files_changed.get_changed_files.clear()
|
||||
self.old_get = hg.requests.get
|
||||
|
||||
def fake_get(url, **kwargs):
|
||||
return FakeResponse()
|
||||
|
||||
hg.requests.get = fake_get
|
||||
|
||||
def tearDown(self):
|
||||
hg.requests.get = self.old_get
|
||||
files_changed.get_changed_files.clear()
|
||||
|
||||
def test_get_changed_files(self):
|
||||
"""Get_changed_files correctly gets the list of changed files in a push.
|
||||
This tests against the production hg.mozilla.org so that it will detect
|
||||
any changes in the format of the returned data."""
|
||||
self.assertEqual(
|
||||
sorted(
|
||||
files_changed.get_changed_files(
|
||||
PARAMS["head_repository"], PARAMS["head_rev"]
|
||||
)
|
||||
),
|
||||
FILES_CHANGED,
|
||||
def test_get_changed_files(responses):
|
||||
url = f"{PARAMS['head_repository']}/json-pushchangedfiles/{PARAMS['head_rev']}"
|
||||
responses.add(responses.GET, url, status=200, json={"files": FILES_CHANGED})
|
||||
assert (
|
||||
sorted(
|
||||
files_changed.get_changed_files(
|
||||
PARAMS["head_repository"], PARAMS["head_rev"]
|
||||
)
|
||||
)
|
||||
== FILES_CHANGED
|
||||
)
|
||||
|
||||
|
||||
class TestCheck(unittest.TestCase):
|
||||
|
|
|
@ -96,15 +96,15 @@ def get_push_data(repository, project, push_id_start, push_id_end):
|
|||
|
||||
|
||||
@memoize
|
||||
def get_json_automationrelevance(repository, revision):
|
||||
url = "{}/json-automationrelevance/{}".format(repository.rstrip("/"), revision)
|
||||
def get_json_pushchangedfiles(repository, revision):
|
||||
url = "{}/json-pushchangedfiles/{}".format(repository.rstrip("/"), revision)
|
||||
logger.debug("Querying version control for metadata: %s", url)
|
||||
|
||||
def get_automationrelevance():
|
||||
def get_pushchangedfiles():
|
||||
response = requests.get(url, timeout=60)
|
||||
return response.json()
|
||||
|
||||
return retry(get_automationrelevance, attempts=10, sleeptime=10)
|
||||
return retry(get_pushchangedfiles, attempts=10, sleeptime=10)
|
||||
|
||||
|
||||
def get_hg_revision_branch(root, revision):
|
||||
|
|
|
@ -45,10 +45,10 @@ def create_tgg(responses, datadir):
|
|||
mock_requests[url] = "bugbug-push-schedules.json"
|
||||
|
||||
# files changed
|
||||
url = "{head_repository}/json-automationrelevance/{head_rev}".format(
|
||||
url = "{head_repository}/json-pushfileschanged/{head_rev}".format(
|
||||
**tgg.parameters
|
||||
)
|
||||
mock_requests[url] = "automationrelevance.json"
|
||||
mock_requests[url] = "pushfileschanged.json"
|
||||
|
||||
url = PUSHLOG_PUSHES_TMPL.format(
|
||||
repository=tgg.parameters["head_repository"],
|
||||
|
|
|
@ -1,169 +0,0 @@
|
|||
{
|
||||
"changesets": [
|
||||
{
|
||||
"author": "User \u003cuser@example.com\u003e",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1646582",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1646582"
|
||||
}
|
||||
],
|
||||
"date": [1593028650.0, 0],
|
||||
"desc": "Bug 1646582 - Remove nsIRemoteWebProgressRequest since it's not being used anywhere. r=barret\n\nDifferential Revision: https://phabricator.services.mozilla.com/D80127",
|
||||
"extra": { "branch": "default", "moz-landing-system": "lando" },
|
||||
"files": [
|
||||
"dom/ipc/BrowserChild.cpp",
|
||||
"dom/ipc/BrowserParent.cpp",
|
||||
"dom/ipc/PBrowser.ipdl",
|
||||
"dom/ipc/RemoteWebProgressRequest.cpp",
|
||||
"dom/ipc/RemoteWebProgressRequest.h",
|
||||
"dom/ipc/components.conf",
|
||||
"dom/ipc/moz.build",
|
||||
"dom/ipc/nsIRemoteWebProgressRequest.idl",
|
||||
"dom/ipc/tests/browser.ini",
|
||||
"dom/ipc/tests/browser_ElapsedTime.js",
|
||||
"dom/ipc/tests/elapsed_time.sjs"
|
||||
],
|
||||
"landingsystem": "lando",
|
||||
"node": "9fc2e30af2852cbacf039e6b7cc36a0233c8ed4e",
|
||||
"parents": ["226b1c518cba596226c80e4475a60ac3a0bfd198"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=autoland&originalRevision=47d0de3f55cd0fcb345d4fa9a5a7d23891315182&newProject=autoland&newRevision=9fc2e30af2852cbacf039e6b7cc36a0233c8ed4e",
|
||||
"phase": "public",
|
||||
"pushdate": [1593029535, 0],
|
||||
"pushhead": "47d0de3f55cd0fcb345d4fa9a5a7d23891315182",
|
||||
"pushid": 119873,
|
||||
"pushuser": "user@example.com",
|
||||
"rev": 537254,
|
||||
"reviewers": [{ "name": "barret", "revset": "reviewer(barret)" }],
|
||||
"treeherderrepo": "autoland",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=autoland"
|
||||
},
|
||||
{
|
||||
"author": "User \u003cuser@example.com\u003e",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1646582",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1646582"
|
||||
}
|
||||
],
|
||||
"date": [1593028695.0, 0],
|
||||
"desc": "Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika\n\nDifferential Revision: https://phabricator.services.mozilla.com/D80128",
|
||||
"extra": { "branch": "default", "moz-landing-system": "lando" },
|
||||
"files": [
|
||||
"docshell/base/BrowsingContextWebProgress.cpp",
|
||||
"dom/ipc/BrowserChild.cpp",
|
||||
"dom/ipc/BrowserParent.cpp",
|
||||
"dom/ipc/PBrowser.ipdl",
|
||||
"dom/ipc/RemoteWebProgress.cpp",
|
||||
"dom/ipc/RemoteWebProgress.h",
|
||||
"dom/ipc/WindowGlobalParent.cpp",
|
||||
"dom/ipc/nsIRemoteWebProgress.idl",
|
||||
"toolkit/components/sessionstore/SessionStoreListener.cpp",
|
||||
"toolkit/components/statusfilter/nsBrowserStatusFilter.cpp",
|
||||
"uriloader/base/nsDocLoader.cpp",
|
||||
"uriloader/base/nsIWebProgress.idl"
|
||||
],
|
||||
"landingsystem": "lando",
|
||||
"node": "1a749d5aaa71752a9f1d8296b7c32a2a30bccc84",
|
||||
"parents": ["9fc2e30af2852cbacf039e6b7cc36a0233c8ed4e"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=autoland&originalRevision=47d0de3f55cd0fcb345d4fa9a5a7d23891315182&newProject=autoland&newRevision=9fc2e30af2852cbacf039e6b7cc36a0233c8ed4e",
|
||||
"phase": "public",
|
||||
"pushdate": [1593029535, 0],
|
||||
"pushhead": "47d0de3f55cd0fcb345d4fa9a5a7d23891315182",
|
||||
"pushid": 119873,
|
||||
"pushuser": "user@example.com",
|
||||
"rev": 537255,
|
||||
"reviewers": [{ "name": "nika", "revset": "reviewer(nika)" }],
|
||||
"treeherderrepo": "autoland",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=autoland"
|
||||
},
|
||||
{
|
||||
"author": "User \u003cuser@example.com\u003e",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1646582",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1646582"
|
||||
}
|
||||
],
|
||||
"date": [1593028744.0, 0],
|
||||
"desc": "Bug 1646582 - Remove RemoteWebProgressManager. r=nika,Gijs\n\nDifferential Revision: https://phabricator.services.mozilla.com/D80129",
|
||||
"extra": { "branch": "default", "moz-landing-system": "lando" },
|
||||
"files": [
|
||||
"devtools/client/responsive/browser/swap.js",
|
||||
"dom/interfaces/base/nsIBrowser.idl",
|
||||
"dom/ipc/BrowserParent.cpp",
|
||||
"dom/ipc/BrowserParent.h",
|
||||
"dom/ipc/RemoteWebProgress.cpp",
|
||||
"dom/ipc/RemoteWebProgress.h",
|
||||
"dom/ipc/WindowGlobalParent.cpp",
|
||||
"dom/ipc/components.conf",
|
||||
"dom/ipc/moz.build",
|
||||
"dom/ipc/nsIRemoteWebProgress.idl",
|
||||
"netwerk/ipc/DocumentLoadListener.cpp",
|
||||
"netwerk/ipc/DocumentLoadListener.h",
|
||||
"security/manager/ssl/nsSecureBrowserUI.cpp",
|
||||
"toolkit/content/widgets/browser-custom-element.js",
|
||||
"toolkit/modules/RemoteWebProgress.jsm",
|
||||
"toolkit/modules/moz.build",
|
||||
"tools/lint/eslint/modules.json"
|
||||
],
|
||||
"landingsystem": "lando",
|
||||
"node": "14b9b4515aabcb9060ece1a988c7993ef65a0bdc",
|
||||
"parents": ["1a749d5aaa71752a9f1d8296b7c32a2a30bccc84"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=autoland&originalRevision=47d0de3f55cd0fcb345d4fa9a5a7d23891315182&newProject=autoland&newRevision=9fc2e30af2852cbacf039e6b7cc36a0233c8ed4e",
|
||||
"phase": "public",
|
||||
"pushdate": [1593029535, 0],
|
||||
"pushhead": "47d0de3f55cd0fcb345d4fa9a5a7d23891315182",
|
||||
"pushid": 119873,
|
||||
"pushuser": "user@example.com",
|
||||
"rev": 537256,
|
||||
"reviewers": [
|
||||
{ "name": "nika", "revset": "reviewer(nika)" },
|
||||
{ "name": "Gijs", "revset": "reviewer(Gijs)" }
|
||||
],
|
||||
"treeherderrepo": "autoland",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=autoland"
|
||||
},
|
||||
{
|
||||
"author": "User \u003cuser@example.com\u003e",
|
||||
"backsoutnodes": [],
|
||||
"bugs": [
|
||||
{
|
||||
"no": "1646582",
|
||||
"url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1646582"
|
||||
}
|
||||
],
|
||||
"date": [1593028772.0, 0],
|
||||
"desc": "Bug 1646582 - Pull the inner window id from the WindowGlobalParent, rather than passing it across PBrowser for updateForLocationChange. r=nika,Gijs\n\nDifferential Revision: https://phabricator.services.mozilla.com/D80131",
|
||||
"extra": { "branch": "default", "moz-landing-system": "lando" },
|
||||
"files": [
|
||||
"devtools/client/responsive/browser/tunnel.js",
|
||||
"dom/interfaces/base/nsIBrowser.idl",
|
||||
"dom/ipc/BrowserChild.cpp",
|
||||
"dom/ipc/BrowserParent.cpp",
|
||||
"dom/ipc/PBrowser.ipdl",
|
||||
"toolkit/content/widgets/browser-custom-element.js"
|
||||
],
|
||||
"landingsystem": "lando",
|
||||
"node": "47d0de3f55cd0fcb345d4fa9a5a7d23891315182",
|
||||
"parents": ["14b9b4515aabcb9060ece1a988c7993ef65a0bdc"],
|
||||
"perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=autoland&originalRevision=47d0de3f55cd0fcb345d4fa9a5a7d23891315182&newProject=autoland&newRevision=9fc2e30af2852cbacf039e6b7cc36a0233c8ed4e",
|
||||
"phase": "public",
|
||||
"pushdate": [1593029535, 0],
|
||||
"pushhead": "47d0de3f55cd0fcb345d4fa9a5a7d23891315182",
|
||||
"pushid": 119873,
|
||||
"pushuser": "user@example.com",
|
||||
"rev": 537257,
|
||||
"reviewers": [
|
||||
{ "name": "nika", "revset": "reviewer(nika)" },
|
||||
{ "name": "Gijs", "revset": "reviewer(Gijs)" }
|
||||
],
|
||||
"treeherderrepo": "autoland",
|
||||
"treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=autoland"
|
||||
}
|
||||
],
|
||||
"visible": true
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"files": [
|
||||
"devtools/client/responsive/browser/swap.js",
|
||||
"devtools/client/responsive/browser/tunnel.js",
|
||||
"docshell/base/BrowsingContextWebProgress.cpp",
|
||||
"dom/ipc/BrowserChild.cpp",
|
||||
"dom/ipc/BrowserParent.cpp",
|
||||
"dom/ipc/PBrowser.ipdl",
|
||||
"dom/ipc/RemoteWebProgressRequest.cpp",
|
||||
"dom/ipc/RemoteWebProgressRequest.h",
|
||||
"dom/ipc/components.conf",
|
||||
"dom/ipc/moz.build",
|
||||
"dom/ipc/nsIRemoteWebProgressRequest.idl",
|
||||
"dom/ipc/tests/browser.ini",
|
||||
"dom/ipc/tests/browser_ElapsedTime.js",
|
||||
"dom/ipc/tests/elapsed_time.sjs",
|
||||
"netwerk/ipc/DocumentLoadListener.cpp",
|
||||
"netwerk/ipc/DocumentLoadListener.h",
|
||||
"security/manager/ssl/nsSecureBrowserUI.cpp",
|
||||
"tools/lint/eslint/modules.json",
|
||||
"toolkit/content/widgets/browser-custom-element.js",
|
||||
"toolkit/modules/RemoteWebProgress.jsm",
|
||||
"toolkit/modules/moz.build"
|
||||
]
|
||||
}
|
Загрузка…
Ссылка в новой задаче