Skip to content

branches: add esr branch support (bug 2048638) - #2198

Open
Magnolia-Liu wants to merge 25 commits into
mainfrom
magnolia/bug2048638-add-esr-branch-support
Open

branches: add esr branch support (bug 2048638)#2198
Magnolia-Liu wants to merge 25 commits into
mainfrom
magnolia/bug2048638-add-esr-branch-support

Conversation

@Magnolia-Liu

@Magnolia-Liu Magnolia-Liu commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

This change makes the CLI + GUI recognize the mozilla-esr / comm-esr / esr pattern and construct the hg repo URL dynamically.

Resolution is a blind HTTP fetch: we build the URL from whatever version the user passes and request it. If that ESR exists on hg the fetch is a hit and bisection proceeds. If it doesn't, the request simply misses and the branch is treated as unavailable.

Previously, mozregression was not working as expected since it could not find any builds when using commands like mozregression --app thunderbird --repo comm-release for Thunderbird branches other than comm-central. This was because comm-esr, comm-release, and comm-beta don't have opt builds, they only have shippable ones.

Fix the behaviour for fetching integration builds both for comm-esr branches and other comm branches by implementing similar behaviour as existing tk_routes construction in Firefox.

Add small help text that shows how to fetch ESR branches as they will not show up in the drop down menu.

New UI:
Screenshot 2026-07-16 at 5 35 46 PM

@Magnolia-Liu
Magnolia-Liu requested a review from zzzeid July 13, 2026 19:10
@github-actions

Copy link
Copy Markdown

Coverage Status

Coverage is 90.782%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

3 similar comments
@github-actions

Copy link
Copy Markdown

Coverage Status

Coverage is 90.782%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

@github-actions

Copy link
Copy Markdown

Coverage Status

Coverage is 90.782%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

@github-actions

Copy link
Copy Markdown

Coverage Status

Coverage is 90.782%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 90.997%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

3 similar comments
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 90.997%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 90.997%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 90.997%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

@coveralls

coveralls commented Jul 13, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 90.948%magnolia/bug2048638-add-esr-branch-support into main. No base build found for main.

@Magnolia-Liu
Magnolia-Liu marked this pull request as ready for review July 14, 2026 15:21
Comment thread mozregression/branches.py
Comment thread mozregression/branches.py Outdated
@janbrasna

Copy link
Copy Markdown

FYI mentioning previous art in #1891 or f37208c in case there's any inspiration. (E.g. the tag_of_esr() bit there might be interesting?)

@Magnolia-Liu
Magnolia-Liu requested a review from zzzeid July 16, 2026 21:54
Comment thread mozregression/fetch_configs.py Outdated
Comment thread mozregression/fetch_configs.py
Comment thread mozregression/fetch_configs.py Outdated
Comment thread CLAUDE.md Outdated
Comment thread mozregression/fetch_configs.py
@Magnolia-Liu
Magnolia-Liu requested a review from zzzeid July 17, 2026 19:27
Comment thread mozregression/branches.py
return self._branches[self.get_name(branch_name_or_alias)]
return self._branches[name]
except KeyError:
if RE_ESR.match(name):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This check is repeated a few times in this class. We could put this functionality in self._esr_match and self.is_esr_name.

Comment thread mozregression/branches.py
Comment on lines +52 to +53
if branch_name_or_alias:
match = RE_ESR.match(branch_name_or_alias)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit

Suggested change
if branch_name_or_alias:
match = RE_ESR.match(branch_name_or_alias)
if branch_name_or_alias and match := RE_ESR.match(branch_name_or_alias):

Then later lines can be dedented.

Comment on lines +246 to +250
elif self.app_name == "firefox" and is_esr:
self.repo = "mozilla-" + name
elif is_esr:
# A bare `esr` defaults to the Firefox (`mozilla`) repository.
self.repo = "mozilla-" + name

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit - I don't think adding the check for self.app_name == "firefox" is doing anything here.

Suggested change
elif self.app_name == "firefox" and is_esr:
self.repo = "mozilla-" + name
elif is_esr:
# A bare `esr` defaults to the Firefox (`mozilla`) repository.
self.repo = "mozilla-" + name
elif is_esr:
# A bare `esr` defaults to the Firefox (`mozilla`) repository.
self.repo = "mozilla-" + name

Comment on lines +241 to +243
if repo:
name = branches.get_name(repo)
is_esr = name.startswith("esr")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it would be better to reverse the logic here. Handle the general case first, and then handle the esr case.

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.

4 participants