Skip to content

Conversation

@brijeshb42
Copy link
Contributor

@brijeshb42 brijeshb42 commented Jul 3, 2025

@brijeshb42 brijeshb42 added the scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). label Jul 3, 2025
@Janpot
Copy link
Member

Janpot commented Jul 3, 2025

I think sharing via npm package is deprecated:

Warning
We deprecated npm-based presets. We plan to drop the npm-based presets feature in a future major release of Renovate.

I was thinking, maybe we can add a top-level renovate folder that holds all presets?

@brijeshb42
Copy link
Contributor Author

brijeshb42 commented Jul 4, 2025

We deprecated npm-based presets

I saw this as well. So we can use the http url format (raw.githubusercontent.com/<path>) in the extends field of the individual repos.

@brijeshb42 brijeshb42 marked this pull request as draft July 4, 2025 03:14
@Janpot
Copy link
Member

Janpot commented Jul 4, 2025

I was thinking github>mui/mui-public//renovate/default should find a preset under /renovate/default.json if I understand their docs correctly.

@brijeshb42 brijeshb42 force-pushed the renovate-config branch 4 times, most recently from c891fab to 3f44180 Compare July 4, 2025 06:34
@brijeshb42 brijeshb42 requested a review from a team July 4, 2025 06:36
@brijeshb42 brijeshb42 marked this pull request as ready for review July 4, 2025 06:36
@brijeshb42 brijeshb42 requested a review from a team July 7, 2025 05:57
"prConcurrentLimit": 30,
"prHourlyLimit": 0,
"rangeStrategy": "bump",
"schedule": "on sunday before 6:00am",
Copy link
Member

Choose a reason for hiding this comment

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

Having all projects build their PRs roughly at the same time can put more stress on the CI and possibly lead to timeouts. What do you think about having each project define its schedule?

Copy link
Contributor Author

@brijeshb42 brijeshb42 Jul 7, 2025

Choose a reason for hiding this comment

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

Its what there was in all the repos. Downstream repos can still override this value if required. When not provided, this will be the default.

Copy link
Member

Choose a reason for hiding this comment

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

Probably overkill, but if we want to control this value from the central mui-public repo we could create a schedule-<repo> preset for each of the repositories.

"matchPackageNames": ["vite", "@vitejs/**", "/vitest/", "esbuild", "^vitest$", "^@vitest/"]
},
{
"automerge": true,
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't work as well as it could as all PRs require explicit approval. I added it in Base UI, but there's not much value TBH

Copy link
Member

Choose a reason for hiding this comment

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

On X we have a top rule to automerge any non-overridden dev dependency updates.
It works well-ish, especially when CI is stable. 👌
https://github.com/mui/mui-x/blob/37a677b4d4137c39c0415517144990dede8aadee/renovate.json#L12-L16

Comment on lines +32 to +33
"groupName": "Infra packages",
"matchPackageNames": ["@mui/internal-*", "@mui/docs"],
Copy link
Member

Choose a reason for hiding this comment

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

I wonder how this will combine with other wildcard patterns.
Do you know how it will work if we inherit this config and have a @mui/* group in the specific package file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Link - docs.renovatebot.com/configuration-options#packagerules

If multiple rules match a dependency, configurations from matching rules will be merged together. The order of rules matters, because later rules may override configuration options from earlier ones, if they both specify the same option.

So in this particular case, followTag will also have to be added in your @mui/* group so that it overrides the value from the base config.

Comment on lines +80 to +81
"matchPackageNames": ["@types/node", "node", "cimg/node", "actions/setup-node"],
"enabled": false
Copy link
Member

Choose a reason for hiding this comment

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

I'm having second thoughts about this.
IMHO, @types/node should be updated within a specified major.
Same for cimg/node and actions/setup-node. Especially the latter, since it does not directly relate to the Node package version. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Posted reply to the wrong comment. It's for your previous comment.

Copy link
Member

@Janpot Janpot Jul 7, 2025

Choose a reason for hiding this comment

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

I recently proposed to change this in core repo. not sure how well it will work though. not all these environments necessarily support the same minor versions.

Copy link
Contributor Author

@brijeshb42 brijeshb42 Jul 8, 2025

Choose a reason for hiding this comment

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

I agree that actions/setup-node should not be in the same group because its version can be updated independently of others. So I have removed it from the group in this PR.

not all these environments necessarily support the same minor versions

It should be fine as long as we specify only a major version in allowedVersions intead of pinning to a specific node version. WDYT ?

Copy link
Member

@Janpot Janpot Jul 8, 2025

Choose a reason for hiding this comment

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

renovate should configure the node version of actions/setup-node, I think it belongs in this group. the action itself can be latest version. we may have to specify which package manager we target exactly.

edit: https://docs.renovatebot.com/modules/manager/github-actions/#withversion-support-for-built-in-actions

Copy link
Member

Choose a reason for hiding this comment

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

Should it?
I think we only specify the major and AFAIK, we manually decide when we want to bump the major. 🤔


not all these environments necessarily support the same minor versions

It should be fine as long as we specify only a major version in allowedVersions intead of pinning to a specific node version. WDYT ?

Yes, renovate group could specify that it allows "<23".

Copy link
Member

@Janpot Janpot Jul 8, 2025

Choose a reason for hiding this comment

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

Should it?

if I interprete their docs correctly, yes. that's why I made that change, to test whether/how that works. their docs tend to be a bit cryptic sometimes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Janpot It is enabled: false for this group. So will it still bump the version os actions/setup-node action while not bumping node-version param. I don't have a lot of clarity based on the docs.

Copy link
Member

@Janpot Janpot Jul 14, 2025

Choose a reason for hiding this comment

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

Yes, I want to enable it again so we update node versions everywhere we use node and sync the major version through renovate. the group:nodeJs seems to be able to do what we want. Perhaps we should use it, or start from it? I think what could missing on our side is specifying the datasource. I suppose by narrowing it to docker and node-version it excludes updating the github action?

Copy link
Member

@Janpot Janpot Jul 14, 2025

Choose a reason for hiding this comment

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

e.g. The following could work:

{
  "extends": ["group:node"],
  "packageRules": [
    {
      "matchPackageNames": ["node"],
      "matchDatasources": ["node", "docker"],
      "allowedVersions": "22.x",
      "versionConstraint": "22.x"
    }
  ]
}

@michaldudak
Copy link
Member

Make sure to run config validator before merging this.

@oliviertassinari oliviertassinari added the type: new feature Expand the scope of the product to solve a new problem. label Jul 13, 2025
@brijeshb42 brijeshb42 requested a review from Janpot July 14, 2025 06:24
{
"groupName": "core-js",
"matchPackageNames": ["core-js"],
"allowedVersions": "< 2.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

Aside, do you know why we do this? I think we should document this somewhere and figure out if it's still relevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I personally don't know. I saw this in all the repo, so copied here. Maybe @oliviertassinari or @mnajdova do ?

Copy link
Member

Choose a reason for hiding this comment

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

No idea, it's here since the beginning of time :D mui/material-ui#27003

"react-is",
"@types/react",
"@types/react-dom",
"@types/react-is"
Copy link
Member

Choose a reason for hiding this comment

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

I believe we also use use-sync-external-store in some places. It's also maintained by the react team.

},
{
"groupName": "Playwright",
"matchPackageNames": ["@playwright/test", "mcr.microsoft.com/playwright"]
Copy link
Member

Choose a reason for hiding this comment

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

I know in some places we only use @playwright/test but perhaps we should widen to include @playwright/* and playwright?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked all repos and found that we only explicitly depend on @playwright/test and no other playwright package. But agree that it wouldn't hurt

"groupName": "node",
"matchDatasources": ["docker", "node-version"],
"matchPackageNames": ["@types/node", "node", "cimg/node", "actions/setup-node"],
"enabled": false
Copy link
Member

Choose a reason for hiding this comment

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

I believe we could mandate a major instead of disabling?

Suggested change
"enabled": false
"allowedVersions": "22"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before that, we'll have to make sure all repos actually are using this version

Copy link
Member

@Janpot Janpot Jul 14, 2025

Choose a reason for hiding this comment

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

If not we can also create presets for each node version we want to support, so on repo side they can do

{
  "extends": ["github>mui/mui-public//renovate/default", "github>mui/mui-public//renovate/node-20"]
}

Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

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

This seems mostly fine, I'd like to figure out if we can steer all node versioning from the renovate config if possible. Also ok for me if you want to look into it in separate PR.

@brijeshb42
Copy link
Contributor Author

Yeah. I'll tackle the node versioning in a separate PR. Lets first bring all repos to node 22.

@brijeshb42 brijeshb42 merged commit 6c50939 into master Jul 14, 2025
8 checks passed
@brijeshb42 brijeshb42 deleted the renovate-config branch July 14, 2025 15:57
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: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants