Skip to content

feat: build firefox_history_locales.json for the nightly channel#1987

Open
bhearsum wants to merge 2 commits into
mozilla-releng:mainfrom
bhearsum:feat-build-firefox-locales.jso
Open

feat: build firefox_history_locales.json for the nightly channel#1987
bhearsum wants to merge 2 commits into
mozilla-releng:mainfrom
bhearsum:feat-build-firefox-locales.jso

Conversation

@bhearsum

@bhearsum bhearsum commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

This adds initial support for the new firefox_history_locales.json file described in https://bugzilla.mozilla.org/show_bug.cgi?id=2042596.

It's focused on just the Nightly channel initially; I plan to follow-up in fairly short order with support for other channels.

In order for this to work correctly in production I'll need to first backfill with metadata from each Nightly that added locales, and a recent Nightly. With that done, we'll end up with this firefox_locales.json. (I have that metadata and a script prepared locally to do this; I can share it if it's useful.)

We should also wait until automatic nightly submission is landed to merge this to ensure it updates correctly the next time a locale is added or removed.

@bhearsum bhearsum requested a review from a team as a code owner June 11, 2026 23:54
@bhearsum

Copy link
Copy Markdown
Contributor Author

I should also add: https://bugzilla.mozilla.org/show_bug.cgi?id=2047022 is looking at getting en-US added to all-locales, which would have the side effect of having it submitted as part of the locale list (which seems like the correct thing to do setting aside product details IMO). That will have the side effect of including en-US in firefox_locales.json. I'm a bit torn on whether or not we should include en-US in firefox_locales.json. If we do, we'll probably want to make sure the right metadata is in place to have its first release listed as 0.8 (or maybe 1.0?).

@bhearsum bhearsum force-pushed the feat-build-firefox-locales.jso branch from 5f0b885 to 81d4267 Compare June 12, 2026 00:02

@ahal ahal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, lgtm!

Comment thread api/src/shipit_api/admin/product_details.py Outdated
Comment thread api/src/shipit_api/admin/product_details.py Outdated
@bhearsum bhearsum force-pushed the feat-build-firefox-locales.jso branch from 81d4267 to bbc5380 Compare June 13, 2026 00:16
@jcristau

Copy link
Copy Markdown
Contributor

Any thoughts on what happens / should happen for locales that are discontinued?

@bhearsum

Copy link
Copy Markdown
Contributor Author

Any thoughts on what happens / should happen for locales that are discontinued?

To be honest, I wasn't planning to do anything about them just yet. I don't think we need them to support the use case I'm adding this for (update integrity tests) because such locales won't be present in l10n-changesets.json, and won't be tested at all.

@bhearsum

Copy link
Copy Markdown
Contributor Author

(The easy/stupid thing to do would be to add last_release, but this might get weird for locales that have been added and removed multiple times. I don't know if there's a way to do better there short of querying all metadata.)

@bhearsum bhearsum changed the title feat: build firefox_locales.json for the nightly channel feat: build firefox_history_locales.json for the nightly channel Jun 22, 2026
@bhearsum bhearsum force-pushed the feat-build-firefox-locales.jso branch 2 times, most recently from dfd5659 to bfe4b83 Compare June 22, 2026 17:27
query = db_session.query(NightlyRelease)
query = query.filter(NightlyRelease.product == product)
query = query.filter(NightlyRelease.channel == channel)
return query.all()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we avoid grabbing all nightlies? This seems unlikely to scale well.

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, absolutely.

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.

Added this in a subsequent commit.

bhearsum added 2 commits June 23, 2026 13:28
This adds initial support for the new `firefox_history_locales.json` file described in https://bugzilla.mozilla.org/show_bug.cgi?id=2042596.

It's focused on just the Nightly channel initially; I plan to follow-up in fairly short order with support for other channels.

In order for this to work correctly in production I'll need to first backfill with metadata from each Nightly that added locales, and a recent Nightly. With that done, we'll end up with [this firefox_locales.json](https://gist.github.com/bhearsum/cff2f1bef5cd0d81b90b7e92a1f72c92). (I have that metadata and a script prepared locally to do this; I can share it if it's useful.)

We should also wait until [automatic nightly submission](https://phabricator.services.mozilla.com/D304523) is landed to merge this to ensure it updates correctly the next time a locale is added or removed.
We're probably never going to stop early in reality, but batching at least constrains the memory usage and spreads out the database load.
@bhearsum bhearsum force-pushed the feat-build-firefox-locales.jso branch from bfe4b83 to 4dfb4ff Compare June 23, 2026 18:20
@bhearsum bhearsum requested a review from jcristau June 24, 2026 13:32
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