Skip to content

[code-infra] Fix changelog dependency exclusion and l10n routing#23112

Merged
LukasTy merged 4 commits into
mui:masterfrom
LukasTy:claude/changelog-dependencies-exclusion-1a5ffb
Jul 16, 2026
Merged

[code-infra] Fix changelog dependency exclusion and l10n routing#23112
LukasTy merged 4 commits into
mui:masterfrom
LukasTy:claude/changelog-dependencies-exclusion-1a5ffb

Conversation

@LukasTy

@LukasTy LukasTy commented Jul 9, 2026

Copy link
Copy Markdown
Member

Problem

Dependency (Renovate) bumps started leaking into the generated changelog, and [l10n] commits stopped being routed to their product sections.

Both features read a prsLabelsMap that has been an empty object since #20406 migrated the script to fetchCommitsBetweenRefs. That util attaches labels directly to each commit (as a string[]) and never populates the old map, so the dependencies exclusion matched nothing (it also read label.name, but labels are plain strings now) and resolvePackagesByLabels always returned an empty list, dropping l10n commits into Miscellaneous.

Dependency bumps kept being excluded only via the renovate[bot] author filter, which silently stopped matching once Renovate was renamed to code-infra-renovate[bot] -- so the bumps began showing up in the changelog.

Changes

  • Read the per-commit labels array for both the dependencies exclusion and the l10n package routing.
  • Switch resolvePackagesByLabels from label.name to the label string.
  • Drop the redundant author filter: every Renovate PR carries the dependencies label (set in the shared mui-public preset), so the label exclusion covers them regardless of bot login, and getContributors already excludes both bot logins from attribution.
  • Remove the now-unused prsLabelsMap.

Relationship to #23153

#23153 fixed the same dependency-bump leak from the other side: it added an IGNORED_BOT_LOGINS set and pointed both getContributors and the commit-stream author filter at it, so the renamed code-infra-renovate[bot] is caught by login.

This PR keeps that set for getContributors (bot attribution) but removes the author filter itself. Once the dependencies-label exclusion works again, the label already drops every Renovate PR and is robust to future bot renames, so filtering by login is redundant. After the merge the label is the single exclusion path, with IGNORED_BOT_LOGINS retained only where it is still needed.

Not fixed here

The ## changelog PR-body highlights injection (changeLogMessages) is dead from the same migration and is left as-is -- reviving it needs the PR body, which fetchCommitsBetweenRefs does not return. Tracking that separately with code-infra.

🤖 Generated with Claude Code

The `dependencies` label exclusion and the l10n package routing both read a `prsLabelsMap` that has been an empty object since the migration to `fetchCommitsBetweenRefs` (mui#20406). That util returns `labels` directly on each commit as a string array and never populates the old map, so the exclusion matched nothing (it also read `label.name`, but labels are plain strings now) and l10n commits always fell back to Miscellaneous. Read the per-commit `labels` in both places and switch `resolvePackagesByLabels` from `label.name` to the label string.

Drop the redundant author filter too: every Renovate PR carries the `dependencies` label (shared mui-public preset), so the label exclusion covers them regardless of bot login -- the previous `renovate[bot]` check silently stopped matching once Renovate was renamed to `code-infra-renovate[bot]`, which is what let dependency bumps leak in. `getContributors` still excludes both bot logins from attribution. Remove the now-unused `prsLabelsMap`.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@LukasTy LukasTy added type: regression A bug, but worse, it used to behave as expected. scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). labels Jul 9, 2026
@code-infra-dashboard

code-infra-dashboard Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-23112--material-ui-x.netlify.app/
QR code for https://deploy-preview-23112--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-scheduler 0B(0.00%) 0B(0.00%)
@mui/x-scheduler-premium 0B(0.00%) 0B(0.00%)
@mui/x-chat 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@LukasTy

LukasTy commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

@brijeshb42, I've created mui/mui-public#1644 to track the ## changelog regression.

@LukasTy
LukasTy requested review from Janpot and brijeshb42 July 9, 2026 13:40
@LukasTy
LukasTy marked this pull request as ready for review July 9, 2026 13:47
@LukasTy

LukasTy commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

BUMP @Janpot, @brijeshb42. We need this fixed before the next release.

@brijeshb42

Copy link
Copy Markdown
Contributor

Latest code infra version also has the prBody and message. You can club the other change as well if you want

@LukasTy

LukasTy commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@brijeshb42 tried bumping it's own PR, but stumbled upon some suboptimal findings: #23140 (comment).

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

…5ffb

Reconcile with mui#23153: keep its IGNORED_BOT_LOGINS set (used by getContributors for attribution), but drop the author filter it added on the commit stream. This branch already excludes dependency bumps via the fixed `dependencies` label check, which covers every Renovate PR and survives future bot renames, so the author filter is redundant.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jul 15, 2026
release,
})
)
.filter((commit) => !IGNORED_BOT_LOGINS.has(commit.author?.login))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Dropping the author filter here: with the dependencies-label exclusion fixed (it was reading an always-empty prsLabelsMap), the label already excludes every Renovate PR and survives bot renames, so filtering by login is redundant. Kept #23153's IGNORED_BOT_LOGINS set for getContributors attribution -- only the commit-stream filter is removed.

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 there a specific reason the dependencies label is better suited than renovate login? I sometimes use this label too when I manually update a dependency.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I can see a couple of points:

  1. The logic was already there, but did not work after some recent changes
  2. It's more stable across infra changes as we've noticed

Do you feel like the dep update PRs that you make have a place in the changelog?
If that's the case, we could keep the current filtering, based on names; it's not a deal breaker. 🤔

@LukasTy
LukasTy merged commit 0f11b96 into mui:master Jul 16, 2026
23 checks passed
@LukasTy
LukasTy deleted the claude/changelog-dependencies-exclusion-1a5ffb branch July 16, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants