Pick last expires and types from the history (#4811)
The history is ordered from first introduction of the metric to the latest change. So the last element is the _current_ valid value for expires (and types). For example this can be seen for `top_sites.contile_reporting_url` in Firefox Android which initially was set to expire in v112, but has been change to never expire later. The current database still lists 112 for it though. Co-authored-by: Leli <33942105+lelilia@users.noreply.github.com>
This commit is contained in:
Родитель
0d70573048
Коммит
ad15d5f2bf
|
@ -61,13 +61,13 @@ def download_glean_metrics(url, threshold):
|
|||
for name, metric in metrics.items():
|
||||
first_seen = metric["history"][0]["dates"]["first"][:10]
|
||||
last_seen = metric["history"][-1]["dates"]["last"][:10]
|
||||
expires = metric["history"][0]["expires"]
|
||||
expires = metric["history"][-1]["expires"]
|
||||
in_source = metric["in-source"]
|
||||
glean_metrics.append(
|
||||
{
|
||||
"glean_app": glean_app,
|
||||
"metric": name,
|
||||
"type": metric["history"][0]["type"],
|
||||
"type": metric["history"][-1]["type"],
|
||||
"first_seen_date": first_seen,
|
||||
"last_seen_date": last_seen,
|
||||
"expires": expires,
|
||||
|
|
Загрузка…
Ссылка в новой задаче