Skip to content

Commit

Permalink
Add an flag for tasks.
Browse files Browse the repository at this point in the history
Fixes #151
  • Loading branch information
Rémy HUBSCHER committed Dec 20, 2017
1 parent a6d80a2 commit 8b7d568
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 43 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ CHANGELOG
- Add bouncer checks and endpoints (#147)
- Handle case when Download links return a 504 instead of a 302 (#152)
- Always expect a major version security advisory title for release and ESR (#150)
- Add an ``actionable`` flag for tasks to define if theyshould make the release fail or not (#151)
- Switch to Telemetry Athena Data Source (#155)
- Add an indication about Crash-Stats 24h latency (#156)
- Fix get_version_from_filename for all locales (#157)
- Validate Release notes links (#159)


0.5.0 (2017-11-06)
------------------

Expand Down
5 changes: 4 additions & 1 deletion pollbot/views/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ async def view_get_releases(request, product):
"telemetry-update-parquet-uptake": "57.0a1",
}.items(), key=lambda t: t[0]))

NOT_ACTIONABLE = ['-uptake']


@validate_product_version
async def view_get_checks(request, product, version):
Expand Down Expand Up @@ -114,7 +116,8 @@ async def view_get_checks(request, product, version):
url = router[check_name].url_for(product=product, version=version)
info = {
"title": CHECKS_TITLE[check_name],
"url": "{}{}".format(prefix, url)
"url": "{}{}".format(prefix, url),
"actionable": all([na not in check_name for na in NOT_ACTIONABLE])
}
checks.append(info)

Expand Down
87 changes: 46 additions & 41 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,21 +208,22 @@ async def test_get_checks_for_nightly(cli):
"version": "57.0a1",
"channel": "nightly",
"checks": [
{"url": "http://localhost/v1/firefox/57.0a1/archive", "title": "Archive Release"},
{"url": "http://localhost/v1/firefox/57.0a1/archive", "title": "Archive Release",
"actionable": True},
{"url": "http://localhost/v1/firefox/57.0a1/balrog-rules",
"title": "Balrog update rules"},
"title": "Balrog update rules", "actionable": True},
{"url": "http://localhost/v1/firefox/57.0a1/bouncer",
"title": "Bouncer"},
"title": "Bouncer", "actionable": True},
{"url": "http://localhost/v1/firefox/57.0a1/buildhub",
"title": "Buildhub release info"},
"title": "Buildhub release info", "actionable": True},
{"url": "http://localhost/v1/firefox/57.0a1/bedrock/download-links",
"title": "Download links"},
"title": "Download links", "actionable": True},
{"url": "http://localhost/v1/firefox/57.0a1/product-details",
"title": "Product details"},
"title": "Product details", "actionable": True},
{"url": "http://localhost/v1/firefox/57.0a1/bedrock/release-notes",
"title": "Release notes"},
"title": "Release notes", "actionable": True},
{"url": "http://localhost/v1/firefox/57.0a1/telemetry/update-parquet-uptake",
"title": "Telemetry Update Parquet Uptake"},
"title": "Telemetry Update Parquet Uptake", "actionable": False},
]
})

Expand All @@ -233,26 +234,27 @@ async def test_get_checks_for_beta(cli):
"version": "56.0b6",
"channel": "beta",
"checks": [
{"url": "http://localhost/v1/firefox/56.0b6/archive", "title": "Archive Release"},
{"url": "http://localhost/v1/firefox/56.0b6/archive", "title": "Archive Release",
"actionable": True},
{"url": "http://localhost/v1/firefox/56.0b6/balrog-rules",
"title": "Balrog update rules"},
"title": "Balrog update rules", "actionable": True},
{"url": "http://localhost/v1/firefox/56.0b6/bouncer",
"title": "Bouncer"},
"title": "Bouncer", "actionable": True},
{"url": "http://localhost/v1/firefox/56.0b6/buildhub",
"title": "Buildhub release info"},
"title": "Buildhub release info", "actionable": True},
{"url": "http://localhost/v1/firefox/56.0b6/crash-stats/uptake",
"title": "Crash Stats Uptake (24h latency)"},
"title": "Crash Stats Uptake (24h latency)", "actionable": False},
{"url": "http://localhost/v1/firefox/56.0b6/product-details"
"/devedition-beta-versions-matches",
"/devedition-beta-versions-matches", "actionable": True,
"title": "Devedition and Beta versions matches"},
{"url": "http://localhost/v1/firefox/56.0b6/bedrock/download-links",
"title": "Download links"},
"title": "Download links", "actionable": True},
{"url": "http://localhost/v1/firefox/56.0b6/archive/partner-repacks",
"title": "Partner repacks"},
"title": "Partner repacks", "actionable": True},
{"url": "http://localhost/v1/firefox/56.0b6/product-details",
"title": "Product details"},
"title": "Product details", "actionable": True},
{"url": "http://localhost/v1/firefox/56.0b6/bedrock/release-notes",
"title": "Release notes"},
"title": "Release notes", "actionable": True},
]
})

Expand All @@ -263,12 +265,13 @@ async def test_get_checks_for_candidates(cli):
"version": "57.0rc6",
"channel": "candidate",
"checks": [
{"url": "http://localhost/v1/firefox/57.0rc6/archive", "title": "Archive Release"},
{"url": "http://localhost/v1/firefox/57.0rc6/archive", "title": "Archive Release",
"actionable": True},
{"url": "http://localhost/v1/firefox/57.0rc6/buildhub",
"title": "Buildhub release info"},
{'title': 'Partner repacks',
"title": "Buildhub release info", "actionable": True},
{'title': 'Partner repacks', "actionable": True,
'url': 'http://localhost/v1/firefox/57.0rc6/archive/partner-repacks'},
{'title': 'Telemetry Update Parquet Uptake',
{'title': 'Telemetry Update Parquet Uptake', "actionable": False,
'url': 'http://localhost/v1/firefox/57.0rc6/telemetry/update-parquet-uptake'},
]
})
Expand All @@ -280,25 +283,26 @@ async def test_get_checks_for_release(cli):
"version": "54.0",
"channel": "release",
"checks": [
{"url": "http://localhost/v1/firefox/54.0/archive", "title": "Archive Release"},
{"url": "http://localhost/v1/firefox/54.0/archive", "title": "Archive Release",
"actionable": True},
{"url": "http://localhost/v1/firefox/54.0/balrog-rules",
"title": "Balrog update rules"},
"title": "Balrog update rules", "actionable": True},
{"url": "http://localhost/v1/firefox/54.0/bouncer",
"title": "Bouncer"},
"title": "Bouncer", "actionable": True},
{"url": "http://localhost/v1/firefox/54.0/buildhub",
"title": "Buildhub release info"},
"title": "Buildhub release info", "actionable": True},
{"url": "http://localhost/v1/firefox/54.0/crash-stats/uptake",
"title": "Crash Stats Uptake (24h latency)"},
"title": "Crash Stats Uptake (24h latency)", "actionable": False},
{"url": "http://localhost/v1/firefox/54.0/bedrock/download-links",
"title": "Download links"},
"title": "Download links", "actionable": True},
{"url": "http://localhost/v1/firefox/54.0/archive/partner-repacks",
"title": "Partner repacks"},
"title": "Partner repacks", "actionable": True},
{"url": "http://localhost/v1/firefox/54.0/product-details",
"title": "Product details"},
"title": "Product details", "actionable": True},
{"url": "http://localhost/v1/firefox/54.0/bedrock/release-notes",
"title": "Release notes"},
"title": "Release notes", "actionable": True},
{"url": "http://localhost/v1/firefox/54.0/bedrock/security-advisories",
"title": "Security advisories"},
"title": "Security advisories", "actionable": True},
]
})

Expand All @@ -309,23 +313,24 @@ async def test_get_checks_for_esr(cli):
"version": "52.3.0esr",
"channel": "esr",
"checks": [
{"url": "http://localhost/v1/firefox/52.3.0esr/archive", "title": "Archive Release"},
{"url": "http://localhost/v1/firefox/52.3.0esr/archive", "title": "Archive Release",
"actionable": True},
{"url": "http://localhost/v1/firefox/52.3.0esr/balrog-rules",
"title": "Balrog update rules"},
"title": "Balrog update rules", "actionable": True},
{"url": "http://localhost/v1/firefox/52.3.0esr/bouncer",
"title": "Bouncer"},
"title": "Bouncer", "actionable": True},
{"url": "http://localhost/v1/firefox/52.3.0esr/buildhub",
"title": "Buildhub release info"},
"title": "Buildhub release info", "actionable": True},
{"url": "http://localhost/v1/firefox/52.3.0esr/crash-stats/uptake",
"title": "Crash Stats Uptake (24h latency)"},
"title": "Crash Stats Uptake (24h latency)", "actionable": False},
{"url": "http://localhost/v1/firefox/52.3.0esr/bedrock/download-links",
"title": "Download links"},
"title": "Download links", "actionable": True},
{"url": "http://localhost/v1/firefox/52.3.0esr/product-details",
"title": "Product details"},
"title": "Product details", "actionable": True},
{"url": "http://localhost/v1/firefox/52.3.0esr/bedrock/release-notes",
"title": "Release notes"},
"title": "Release notes", "actionable": True},
{"url": "http://localhost/v1/firefox/52.3.0esr/bedrock/security-advisories",
"title": "Security advisories"},
"title": "Security advisories", "actionable": True},
]
})

Expand Down

0 comments on commit 8b7d568

Please sign in to comment.