forked from mirrors/gecko-dev
Bug 1883046: make nightly decision tasks more resilient to unexpected Balrog release data r=releng-reviewers,taskgraph-reviewers,jcristau
This fixes the specific issue we just had with a release only containing `partials`, but also deals with a potential future problem if `buildID` is missing. (Less likely...but still possible?) Differential Revision: https://phabricator.services.mozilla.com/D203278
This commit is contained in:
parent
9911ad6052
commit
1e2d47cf0d
2 changed files with 34 additions and 8 deletions
|
|
@ -30,18 +30,34 @@ release_blob = {
|
|||
|
||||
|
||||
def nightly_blob(release):
|
||||
return {
|
||||
"platforms": {
|
||||
"WINNT_x86_64-msvc": {
|
||||
"locales": {
|
||||
"en-US": {
|
||||
"buildID": release[-14:],
|
||||
"completes": [{"fileUrl": release}],
|
||||
# Added for bug 1883046, where we identified a case where a Balrog release
|
||||
# that does not contain completes will throw an unnecessary exception.
|
||||
if release == "Firefox-mozilla-central-nightly-20211001214601":
|
||||
return {
|
||||
"platforms": {
|
||||
"WINNT_x86_64-msvc": {
|
||||
"locales": {
|
||||
"en-US": {
|
||||
"buildID": release[-14:],
|
||||
"partials": [{"fileUrl": release}],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else:
|
||||
return {
|
||||
"platforms": {
|
||||
"WINNT_x86_64-msvc": {
|
||||
"locales": {
|
||||
"en-US": {
|
||||
"buildID": release[-14:],
|
||||
"completes": [{"fileUrl": release}],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class TestReleaseHistory(unittest.TestCase):
|
||||
|
|
|
|||
|
|
@ -251,7 +251,17 @@ def _populate_nightly_history(product, branch, maxbuilds=4, maxsearch=10):
|
|||
builds[platform][locale] = dict()
|
||||
if len(builds[platform][locale]) >= maxbuilds:
|
||||
continue
|
||||
if "buildID" not in history["platforms"][platform]["locales"][locale]:
|
||||
continue
|
||||
buildid = history["platforms"][platform]["locales"][locale]["buildID"]
|
||||
if (
|
||||
"completes" not in history["platforms"][platform]["locales"][locale]
|
||||
or len(
|
||||
history["platforms"][platform]["locales"][locale]["completes"]
|
||||
)
|
||||
== 0
|
||||
):
|
||||
continue
|
||||
url = history["platforms"][platform]["locales"][locale]["completes"][0][
|
||||
"fileUrl"
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue