Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, sql
Domain
analytics, data

Research direction

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.

Written by the indexing model from the issue text.

Description

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
    (
Dominant language
Python
Stars
1
Forks
5
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.