fix(geckoview_version): Replace geckoview.version field with valid gecko.version (#5736)

This commit is contained in:
Eduardo Filho 2024-06-04 18:00:11 -04:00 коммит произвёл GitHub
Родитель 8cf861fb82
Коммит 076a77947a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
9 изменённых файлов: 65 добавлений и 40 удалений

Просмотреть файл

@ -2,10 +2,12 @@ WITH extracted AS (
-- We'll look at the metrics ping to estimate the major geckoview version. -- We'll look at the metrics ping to estimate the major geckoview version.
-- The metrics section is aliased, so we must rename the table for this to -- The metrics section is aliased, so we must rename the table for this to
-- work as expected (e.g. t1). -- work as expected (e.g. t1).
-- geckoview_version was replaced with gecko_version but still used as fallback
-- in case we're processing that is prior to the replacement.
SELECT SELECT
submission_timestamp, submission_timestamp,
client_info.app_build, client_info.app_build,
metrics.string.geckoview_version, COALESCE(metrics.string.gecko_version, metrics.string.geckoview_version) AS gecko_version,
FROM FROM
org_mozilla_fenix.metrics AS t1 org_mozilla_fenix.metrics AS t1
WHERE WHERE
@ -14,21 +16,21 @@ WITH extracted AS (
SELECT SELECT
submission_timestamp, submission_timestamp,
client_info.app_build, client_info.app_build,
metrics.string.geckoview_version, COALESCE(metrics.string.gecko_version, metrics.string.geckoview_version) AS gecko_version,
FROM FROM
org_mozilla_fenix_nightly.metrics AS t1 org_mozilla_fenix_nightly.metrics AS t1
UNION ALL UNION ALL
SELECT SELECT
submission_timestamp, submission_timestamp,
client_info.app_build, client_info.app_build,
metrics.string.geckoview_version, COALESCE(metrics.string.gecko_version, metrics.string.geckoview_version) AS gecko_version,
FROM FROM
org_mozilla_fennec_aurora.metrics AS t1 org_mozilla_fennec_aurora.metrics AS t1
), ),
transformed AS ( transformed AS (
SELECT SELECT
app_build, app_build,
geckoview_version, gecko_version,
-- Truncate to the hour, since older builds give minute resolution. -- Truncate to the hour, since older builds give minute resolution.
DATETIME_TRUNC(mozfun.norm.fenix_build_to_datetime(app_build), HOUR) AS build_hour DATETIME_TRUNC(mozfun.norm.fenix_build_to_datetime(app_build), HOUR) AS build_hour
FROM FROM
@ -43,22 +45,22 @@ grouped_build_hours AS (
-- We choose a minimum number of pings for each group to filter out noise. -- We choose a minimum number of pings for each group to filter out noise.
SELECT SELECT
build_hour, build_hour,
geckoview_version, gecko_version,
COUNT(*) AS n_pings COUNT(*) AS n_pings
FROM FROM
transformed transformed
WHERE WHERE
geckoview_version IS NOT NULL gecko_version IS NOT NULL
AND app_build IS NOT NULL AND app_build IS NOT NULL
AND build_hour IS NOT NULL AND build_hour IS NOT NULL
GROUP BY GROUP BY
build_hour, build_hour,
geckoview_version gecko_version
HAVING HAVING
n_pings > 5 n_pings > 5
ORDER BY ORDER BY
build_hour DESC, build_hour DESC,
geckoview_version gecko_version
), ),
aggregated_build_hours AS ( aggregated_build_hours AS (
SELECT SELECT
@ -97,7 +99,7 @@ estimated_version AS (
build_hour, build_hour,
-- Versions are expected to be monotonically increasing. We use the major -- Versions are expected to be monotonically increasing. We use the major
-- version for integer comparisons when the version hits 100. -- version for integer comparisons when the version hits 100.
MAX(CAST(SPLIT(geckoview_version, ".")[OFFSET(0)] AS INT64)) OVER ( MAX(CAST(SPLIT(gecko_version, ".")[OFFSET(0)] AS INT64)) OVER (
ORDER BY ORDER BY
build_hour ASC build_hour ASC
ROWS BETWEEN ROWS BETWEEN

Просмотреть файл

@ -28,7 +28,10 @@ def input_row(submission_offset, build_offset, version_offset=0):
"submission_timestamp": (START_DATE - timedelta(submission_offset)).isoformat(), "submission_timestamp": (START_DATE - timedelta(submission_offset)).isoformat(),
"client_info": {"app_build": app_build(START_DATE - timedelta(build_offset))}, "client_info": {"app_build": app_build(START_DATE - timedelta(build_offset))},
"metrics": { "metrics": {
"string": {"geckoview_version": f"{START_VERSION-version_offset}.0.0"} "string": {
"gecko_version": f"{START_VERSION-version_offset}.0.0",
"geckoview_version": f"{START_VERSION-version_offset}.0.0",
},
}, },
} }

Просмотреть файл

@ -26,6 +26,11 @@
"name": "string", "name": "string",
"mode": "NULLABLE", "mode": "NULLABLE",
"fields": [ "fields": [
{
"type": "STRING",
"name": "gecko_version",
"mode": "NULLABLE"
},
{ {
"type": "STRING", "type": "STRING",
"name": "geckoview_version", "name": "geckoview_version",

Просмотреть файл

@ -26,6 +26,11 @@
"name": "string", "name": "string",
"mode": "NULLABLE", "mode": "NULLABLE",
"fields": [ "fields": [
{
"type": "STRING",
"name": "gecko_version",
"mode": "NULLABLE"
},
{ {
"type": "STRING", "type": "STRING",
"name": "geckoview_version", "name": "geckoview_version",

Просмотреть файл

@ -26,6 +26,11 @@
"name": "string", "name": "string",
"mode": "NULLABLE", "mode": "NULLABLE",
"fields": [ "fields": [
{
"type": "STRING",
"name": "gecko_version",
"mode": "NULLABLE"
},
{ {
"type": "STRING", "type": "STRING",
"name": "geckoview_version", "name": "geckoview_version",

Просмотреть файл

@ -26,6 +26,11 @@
"name": "string", "name": "string",
"mode": "NULLABLE", "mode": "NULLABLE",
"fields": [ "fields": [
{
"type": "STRING",
"name": "gecko_version",
"mode": "NULLABLE"
},
{ {
"type": "STRING", "type": "STRING",
"name": "geckoview_version", "name": "geckoview_version",

Просмотреть файл

@ -3,11 +3,11 @@
app_build: 0000374784 app_build: 0000374784
metrics: metrics:
string: string:
geckoview_version: -1230.0.0 gecko_version: -1230.0.0
submission_timestamp: '2020-05-23T00:00:00' submission_timestamp: '2020-05-23T00:00:00'
- client_info: - client_info:
app_build: 0000374784 app_build: 0000374784
metrics: metrics:
string: string:
geckoview_version: -1230.0.0 gecko_version: -1230.0.0
submission_timestamp: '2020-05-27T00:00:00' submission_timestamp: '2020-05-27T00:00:00'

Просмотреть файл

@ -4,182 +4,182 @@
app_build: '0000377664' app_build: '0000377664'
metrics: metrics:
string: string:
geckoview_version: 92.0.0 gecko_version: 92.0.0
submission_timestamp: '2020-05-17T00:00:00' submission_timestamp: '2020-05-17T00:00:00'
- &id002 - &id002
client_info: client_info:
app_build: 0000377856 app_build: 0000377856
metrics: metrics:
string: string:
geckoview_version: 93.0.0 gecko_version: 93.0.0
submission_timestamp: '2020-05-18T00:00:00' submission_timestamp: '2020-05-18T00:00:00'
- &id003 - &id003
client_info: client_info:
app_build: 0000378048 app_build: 0000378048
metrics: metrics:
string: string:
geckoview_version: 94.0.0 gecko_version: 94.0.0
submission_timestamp: '2020-05-19T00:00:00' submission_timestamp: '2020-05-19T00:00:00'
- &id004 - &id004
client_info: client_info:
app_build: 0000378240 app_build: 0000378240
metrics: metrics:
string: string:
geckoview_version: 95.0.0 gecko_version: 95.0.0
submission_timestamp: '2020-05-20T00:00:00' submission_timestamp: '2020-05-20T00:00:00'
- &id005 - &id005
client_info: client_info:
app_build: 0000378432 app_build: 0000378432
metrics: metrics:
string: string:
geckoview_version: 96.0.0 gecko_version: 96.0.0
submission_timestamp: '2020-05-21T00:00:00' submission_timestamp: '2020-05-21T00:00:00'
- &id006 - &id006
client_info: client_info:
app_build: 0000378624 app_build: 0000378624
metrics: metrics:
string: string:
geckoview_version: 97.0.0 gecko_version: 97.0.0
submission_timestamp: '2020-05-22T00:00:00' submission_timestamp: '2020-05-22T00:00:00'
- &id007 - &id007
client_info: client_info:
app_build: 0000378816 app_build: 0000378816
metrics: metrics:
string: string:
geckoview_version: 98.0.0 gecko_version: 98.0.0
submission_timestamp: '2020-05-23T00:00:00' submission_timestamp: '2020-05-23T00:00:00'
- &id008 - &id008
client_info: client_info:
app_build: 0000379008 app_build: 0000379008
metrics: metrics:
string: string:
geckoview_version: 99.0.0 gecko_version: 99.0.0
submission_timestamp: '2020-05-24T00:00:00' submission_timestamp: '2020-05-24T00:00:00'
- &id009 - &id009
client_info: client_info:
app_build: 0000379200 app_build: 0000379200
metrics: metrics:
string: string:
geckoview_version: 100.0.0 gecko_version: 100.0.0
submission_timestamp: '2020-05-25T00:00:00' submission_timestamp: '2020-05-25T00:00:00'
- &id010 - &id010
client_info: client_info:
app_build: 0000379392 app_build: 0000379392
metrics: metrics:
string: string:
geckoview_version: 101.0.0 gecko_version: 101.0.0
submission_timestamp: '2020-05-26T00:00:00' submission_timestamp: '2020-05-26T00:00:00'
- &id011 - &id011
client_info: client_info:
app_build: 0000379584 app_build: 0000379584
metrics: metrics:
string: string:
geckoview_version: 102.0.0 gecko_version: 102.0.0
submission_timestamp: '2020-05-27T00:00:00' submission_timestamp: '2020-05-27T00:00:00'
- &id012 - &id012
client_info: client_info:
app_build: 0000379776 app_build: 0000379776
metrics: metrics:
string: string:
geckoview_version: 103.0.0 gecko_version: 103.0.0
submission_timestamp: '2020-05-28T00:00:00' submission_timestamp: '2020-05-28T00:00:00'
- &id013 - &id013
client_info: client_info:
app_build: 0000379968 app_build: 0000379968
metrics: metrics:
string: string:
geckoview_version: 104.0.0 gecko_version: 104.0.0
submission_timestamp: '2020-05-29T00:00:00' submission_timestamp: '2020-05-29T00:00:00'
- &id014 - &id014
client_info: client_info:
app_build: 0000380160 app_build: 0000380160
metrics: metrics:
string: string:
geckoview_version: 105.0.0 gecko_version: 105.0.0
submission_timestamp: '2020-05-30T00:00:00' submission_timestamp: '2020-05-30T00:00:00'
- &id015 - &id015
client_info: client_info:
app_build: 0000380352 app_build: 0000380352
metrics: metrics:
string: string:
geckoview_version: 106.0.0 gecko_version: 106.0.0
submission_timestamp: '2020-05-31T00:00:00' submission_timestamp: '2020-05-31T00:00:00'
- &id016 - &id016
client_info: client_info:
app_build: 0000380544 app_build: 0000380544
metrics: metrics:
string: string:
geckoview_version: 107.0.0 gecko_version: 107.0.0
submission_timestamp: '2020-06-01T00:00:00' submission_timestamp: '2020-06-01T00:00:00'
- &id017 - &id017
client_info: client_info:
app_build: 0000380736 app_build: 0000380736
metrics: metrics:
string: string:
geckoview_version: 108.0.0 gecko_version: 108.0.0
submission_timestamp: '2020-06-02T00:00:00' submission_timestamp: '2020-06-02T00:00:00'
- &id018 - &id018
client_info: client_info:
app_build: 0000380928 app_build: 0000380928
metrics: metrics:
string: string:
geckoview_version: 109.0.0 gecko_version: 109.0.0
submission_timestamp: '2020-06-03T00:00:00' submission_timestamp: '2020-06-03T00:00:00'
- &id019 - &id019
client_info: client_info:
app_build: 0000381120 app_build: 0000381120
metrics: metrics:
string: string:
geckoview_version: 110.0.0 gecko_version: 110.0.0
submission_timestamp: '2020-06-04T00:00:00' submission_timestamp: '2020-06-04T00:00:00'
- &id020 - &id020
client_info: client_info:
app_build: 0000381312 app_build: 0000381312
metrics: metrics:
string: string:
geckoview_version: 111.0.0 gecko_version: 111.0.0
submission_timestamp: '2020-06-05T00:00:00' submission_timestamp: '2020-06-05T00:00:00'
- &id021 - &id021
client_info: client_info:
app_build: 0000381504 app_build: 0000381504
metrics: metrics:
string: string:
geckoview_version: 112.0.0 gecko_version: 112.0.0
submission_timestamp: '2020-06-06T00:00:00' submission_timestamp: '2020-06-06T00:00:00'
- &id022 - &id022
client_info: client_info:
app_build: 0000381696 app_build: 0000381696
metrics: metrics:
string: string:
geckoview_version: 113.0.0 gecko_version: 113.0.0
submission_timestamp: '2020-06-07T00:00:00' submission_timestamp: '2020-06-07T00:00:00'
- &id023 - &id023
client_info: client_info:
app_build: 0000381888 app_build: 0000381888
metrics: metrics:
string: string:
geckoview_version: 114.0.0 gecko_version: 114.0.0
submission_timestamp: '2020-06-08T00:00:00' submission_timestamp: '2020-06-08T00:00:00'
- &id024 - &id024
client_info: client_info:
app_build: 0000382080 app_build: 0000382080
metrics: metrics:
string: string:
geckoview_version: 115.0.0 gecko_version: 115.0.0
submission_timestamp: '2020-06-09T00:00:00' submission_timestamp: '2020-06-09T00:00:00'
- &id025 - &id025
client_info: client_info:
app_build: 0000382272 app_build: 0000382272
metrics: metrics:
string: string:
geckoview_version: 116.0.0 gecko_version: 116.0.0
submission_timestamp: '2020-06-10T00:00:00' submission_timestamp: '2020-06-10T00:00:00'
- &id026 - &id026
client_info: client_info:
app_build: 0000382464 app_build: 0000382464
metrics: metrics:
string: string:
geckoview_version: 117.0.0 gecko_version: 117.0.0
submission_timestamp: '2020-06-11T00:00:00' submission_timestamp: '2020-06-11T00:00:00'
- *id001 - *id001
- *id002 - *id002

Просмотреть файл

@ -3,11 +3,11 @@
app_build: 0000374784 app_build: 0000374784
metrics: metrics:
string: string:
geckoview_version: -1230.0.0 gecko_version: -1230.0.0
submission_timestamp: '2020-05-23T00:00:00' submission_timestamp: '2020-05-23T00:00:00'
- client_info: - client_info:
app_build: 0000374784 app_build: 0000374784
metrics: metrics:
string: string:
geckoview_version: -1230.0.0 gecko_version: -1230.0.0
submission_timestamp: '2020-05-27T00:00:00' submission_timestamp: '2020-05-27T00:00:00'