Skip to content

[DENG-11197] Migrate orphaning_dashboard job from spark#538

Merged
BenWu merged 5 commits into
mainfrom
benwu/orphaning-dashboard
Jul 8, 2026
Merged

[DENG-11197] Migrate orphaning_dashboard job from spark#538
BenWu merged 5 commits into
mainfrom
benwu/orphaning-dashboard

Conversation

@BenWu

@BenWu BenWu commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

https://mozilla-hub.atlassian.net/browse/DENG-11197

Migration of the spark job in https://github.com/mozilla/telemetry-airflow/blob/main/jobs/update_orphaning_dashboard_etl.py. This pushes the computations into bigquery so spark isn't needed. The output is the same as the existing job and testable locally by running the frontend with:

# run date should line up with what's in https://telemetry.mozilla.org/update-orphaning/
python -m update_orphaning_dashboard.main --run-date 2026-05-31 --dry-run
python serve_frontend.py

Switching to glean was not part of this.

Checklist for reviewer:

  • Commits should reference a bug or github issue, if relevant (if a bug is referenced, the pull request should include the bug number in the title)

  • Scan the PR and verify that no changes (particularly to .circleci/config.yml) will cause environment variables (particularly credentials) to be exposed in test logs

  • Ensure the container image will be using permissions granted to telemetry-airflow responsibly.

python -m update_orphaning_dashboard.main --run-date 2026-06-08 --dry-run
```

Authenticate with `gcloud auth application-default login`. `--dry-run` writes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we have to install the Google CLI to use this command: https://cloud.google.com/cli

@BenWu Could you please confirm?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes some instructions on setup and accessing bigquery can be found here https://docs.telemetry.mozilla.org/cookbooks/bigquery/access.html#bigquery-access-request. You should already have the necessary access by default

@antonioborondo antonioborondo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to run the script locally and compare the data generated locally with the data generated on the website, and they match.


## Running locally

This job was written for Python 3.14. Compatibility with other versions isn't guaranteed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this version in particular? Is there any incompatibility with any of the required libraries?

I was able to run the script without any problems using Python 3.12.10.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with the latest version in the docker image so it has the longest time before it reaches end-of-life. The job probably works with much older versions and it should be fine to use whatever you have installed but I wrote that just in case there are issues. Generally, I would recommend using pyenv and using the same version as the image

@BenWu BenWu marked this pull request as ready for review July 7, 2026 21:00
@BenWu BenWu requested a review from a team as a code owner July 7, 2026 21:00

@akkomar akkomar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@BenWu BenWu merged commit f83895a into main Jul 8, 2026
3 checks passed
@BenWu BenWu deleted the benwu/orphaning-dashboard branch July 8, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants