Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Release notes generator script#4866

Open
benjaminmah wants to merge 70 commits into
mozilla:master from
benjaminmah:release-notes
Open

Release notes generator script #4866
benjaminmah wants to merge 70 commits into
mozilla:master from
benjaminmah:release-notes

Conversation

@benjaminmah

@benjaminmah benjaminmah commented Mar 3, 2025

Copy link
Copy Markdown
Contributor

Includes both the tool (bugbug/tools/release_notes.py) and the runner (scripts/release_notes_runner.py).

Takes two parameters:
--version - the version of Firefox to generate a list of potential commits to include in release notes (e.g. FIREFOX_BETA_136_BASE)
--chunk-size - the size of the chunk (in tokens) when passing in the commit logs to the LLM

... filter out bugs behind features that are not yet shipped
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread functions/release_notes/main.py Outdated
Comment thread functions/release_notes/main.py Outdated
Comment thread bugbug/generative_model_tool.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread functions/release_notes/main.py Outdated
Comment thread functions/release_notes/main.py Outdated
Comment thread functions/release_notes/main.py Outdated
Comment thread functions/release_notes/requirements.txt Outdated
Comment thread functions/release_notes/requirements.txt Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread functions/release_notes/main.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
return "\n".join(unique_lines)

def get_final_release_notes_commits(
self, target_version: str

@suhaibmujahid suhaibmujahid Apr 27, 2025

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.

Would taking the release and the channel separately, instead of one string, be cleaner?

@benjaminmah benjaminmah Apr 27, 2025

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 think the way we're getting the commit logs from the URL, it should be fine. However, if you think it would be better, I can change it to have two inputs rather than a single string for the release and channel.

@suhaibmujahid suhaibmujahid Apr 29, 2025

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 think it would be clear from an API point of view.

@benjaminmah benjaminmah Apr 29, 2025

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.

Done here: 38499c3

Comment thread bugbug/tools/release_notes.py Outdated

bug_ids = []
for desc, _, _ in commit_log_list:
match = re.search(r"Bug (\d+)", desc, re.IGNORECASE)

@suhaibmujahid suhaibmujahid Apr 27, 2025

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.

We parse the commit message twice, once here and again in filter_irrelevant_commits(). It would be nice to do it once here; we could have a list of structured data about each commit, e.g., a tuple or dict with the bug number and message.

@benjaminmah benjaminmah Apr 27, 2025

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.

Done here! aebee0a

Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment thread bugbug/tools/release_notes.py Outdated
Comment on lines +32 to +43
def get_previous_version(target_version: str) -> str:
match = re.search(r"(\d+)", target_version)
if not match:
raise ValueError("No number found in the version string")

number = match.group(0)
decremented_number = str(int(number) - 1)
return (
target_version[: match.start()]
+ decremented_number
+ target_version[match.end() :]
)

@suhaibmujahid suhaibmujahid Apr 29, 2025

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.

Is this still needed?

@benjaminmah benjaminmah Apr 29, 2025

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.

No, thank you for pointing this out. I've removed it!

Comment thread tests/test_release_notes.py Outdated
def test_get_previous_version():
assert get_previous_version("FIREFOX_BETA_135_BASE") == "FIREFOX_BETA_134_BASE"
assert get_previous_version("FIREFOX_NIGHTLY_132") == "FIREFOX_NIGHTLY_131"
assert get_previous_version("FIREFOX_RELEASE_130_2") == "FIREFOX_RELEASE_129_2"

@suhaibmujahid suhaibmujahid Apr 29, 2025

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.

How do we now handle cases like FIREFOX_RELEASE_130_2?

@benjaminmah benjaminmah Apr 29, 2025

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 think I just had that case there to make sure the string parsing was correct. Now that we specify the channel and release separately, would there be a case of FIREFOX_RELEASE_130_2 or FIREFOX_RELEASE_130_2_BASE? I've tried to retrieve the commits from the URL using these but was unable to (maybe because these do not exist?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@suhaibmujahid suhaibmujahid suhaibmujahid requested changes

@marco-c marco-c Awaiting requested review from marco-c

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /