Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Optimization: selecting a single segment, e.g. "Mac", still appears to lead to queries against all platforms

Aperta
#10 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python, sql
Ambito
analytics, data

Direzione di ricerca

Start by tracing how the YAML segments value is handled when generating the BigQuery query shown in the logs, especially the desktop_data and android_data branches. Compare the requested Mac segment with the query's normalized_os segment and verify that the completed change restricts results to the intended platform instead of querying Fenix and all desktop platforms.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Using this configuration, only looking at Mac:

slug: fast-udp-for-firefox-large-release-experiment

segments:
  - Mac

histograms:
  metrics.custom_distribution.networking_http_1_upload_throughput:
    higher_is_better: true
  metrics.custom_distribution.networking_http_2_upload_throughput:
    higher_is_better: true
  metrics.custom_distribution.networking_http_3_upload_throughput:
    higher_is_better: true

The queries appear to be made against Fenix and all off Desktop.
I was expecting a Darwin filter or similar.

Logs:

Using Config:
{
  "slug": "fast-udp-for-firefox-large-release-experiment",
  "segments": [
    "Mac"
  ],
  "histograms": {
    "metrics.custom_distribution.networking_http_1_upload_throughput": {
      "higher_is_better": true,
      "glean": true,
      "desc": "The upload throughput for http/1.0, http/1.1 requests larger than 10MB. Measured in megabits per second, Mbps.\n",
      "available_on_desktop": true,
      "available_on_android": true,
      "kind": "numerical",
      "distribution_type": "custom_distribution",
      "max": 5000
    },
    "metrics.custom_distribution.networking_http_2_upload_throughput": {
      "higher_is_better": true,
      "glean": true,
      "desc": "The upload throughput for http/2 requests larger than 10MB. Measured in megabits per second, Mbps.\n",
      "available_on_desktop": true,
      "available_on_android": true,
      "kind": "numerical",
      "distribution_type": "custom_distribution",
      "max": 5000
    },
    "metrics.custom_distribution.networking_http_3_upload_throughput": {
      "higher_is_better": true,
      "glean": true,
      "desc": "The upload throughput for http/3 requests larger than 10MB. Measured in megabits per second, Mbps.\n",
      "available_on_desktop": true,
      "available_on_android": true,
      "kind": "numerical",
      "distribution_type": "custom_distribution",
      "max": 5000
    }
  },
  "is_experiment": true,
  "pageload_event_metrics": {},
  "crash_event_metrics": {},
  "startDate": "2025-08-20",
  "endDate": "2025-10-02",
  "channel": "release",
  "isRollout": false,
  "branches": [
    {
      "name": "control-nspr"
    },
    {
      "name": "treatment-fast-udp"
    }
  ],
  "include_non_enrolled_branch": false
}
Running 3 queries in parallel using 4 threads...
Running query:
with
desktop_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.firefox_desktop.metrics` as d
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_2_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND normalized_app_name = "Firefox"
      AND metrics.custom_distribution.networking_http_2_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
),
android_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.fenix.metrics` as f
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_2_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND metrics.custom_distribution.networking_http_2_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
)
SELECT
    segment,
    branch,
    bucket,
    SUM(count) as counts
FROM
    (
        SELECT * FROM desktop_data
        UNION ALL
        SELECT * FROM android_data
    ) s
GROUP BY
  segment, branch, bucket
ORDER BY
  segment, branch, bucket
Running query:
with
desktop_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.firefox_desktop.metrics` as d
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_1_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND normalized_app_name = "Firefox"
      AND metrics.custom_distribution.networking_http_1_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
),
android_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.fenix.metrics` as f
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_1_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND metrics.custom_distribution.networking_http_1_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
)
SELECT
    segment,
    branch,
    bucket,
    SUM(count) as counts
FROM
    (
        SELECT * FROM desktop_data
        UNION ALL
        SELECT * FROM android_data
    ) s
GROUP BY
  segment, branch, bucket
ORDER BY
  segment, branch, bucketRunning query:
with
desktop_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.firefox_desktop.metrics` as d
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_3_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND normalized_app_name = "Firefox"
      AND metrics.custom_distribution.networking_http_3_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
),
android_data as (
    SELECT
        normalized_os as segment,
        mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch as branch,
        CAST(key as INT64) AS bucket,
        value as count
    FROM `mozdata.fenix.metrics` as f
      CROSS JOIN UNNEST(metrics.custom_distribution.networking_http_3_upload_throughput.values)
    WHERE
      DATE(submission_timestamp) >= DATE('2025-08-20')
      AND DATE(submission_timestamp) <= DATE('2025-10-02')
      AND normalized_channel = "release"
      AND metrics.custom_distribution.networking_http_3_upload_throughput is not null
      AND ARRAY_LENGTH(ping_info.experiments) > 0
      AND mozfun.map.get_key(ping_info.experiments, "fast-udp-for-firefox-large-release-experiment").branch is not null
)
SELECT
    segment,
    branch,
    bucket,
    SUM(count) as counts
FROM
    (
Lingua principale
Python
Stelle
1
Fork
5
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.