-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a dependency management bot to deal with upgrades #3552
Comments
Hi @slorber, I noticed you got an offer from the creator of Renovate (@rarkins) to configure the Renovate bot exactly how you want. I migrated from Dependabot to Renovate for all my repositories, and so far I'm really liking the bot and the team behind the bot. The team is really helpful whenever I have issues/questions, and the bot generally does the right thing by default (at least for my tastes). You have a boatload of options to configure Renovate just right, and now you have an expert to actually configure the bot just the way you want. So I recommend you take the creator up on their offer to configure the bot for you. That way you'll get up and running quickly. I would of course have liked to be able to get you started with either Renovate or Depfu. But seeing as you can have an expert do it for you, I'm going to step out of the way here, and let the expert handle it. 👍 |
Hi, I'm not very familiar with the tool but already seen it used in some places. Willing to try Renovabot to upgrade dependencies, and any help from you or @rarkins would great. How complex is it to setup, and configure so that we don't end up being spammed by too many update PRs? Generally if the deploy preview work then it should be fine, but we don't have good e2e tests yet, and not sure we want to bump dependencies each time a new version is published. Does it make sense to receive upgrade PRs once a month, and also high-priority security upgrades? |
TLDR:
I guess only a repo team member/admin can set it up right? (seems like I may have the permissions) I think only admins can set up the Renovate bot on organization repositories. I think that Docusaurus falls under the Facebook organization. You can try to install the app from the GitHub Marketplace (after you have approval from your boss), if you don't have the right permissions, it won't even work. How complex is it to setup, and configure so that we don't end up being spammed by too many update PRs? When you enable Renovate, the bot creates a on-boarding pull request, where it shows what would happen with the configuration you have then. You can edit that configuration setup branch, and then the pull request updates to show what just changed. From the Renovate docs:
Renovate says these things are often changed:
I also think you will want to tinker with the schedule for Renovate, so that it only runs when you want it to run. Now because this is a big monorepo, I'm sure configuring this right will take some help from the Renovate creator. Renovate docs: Getting started with Renovate with a GitHub marketplace app |
Thank you @HonkingGoose! The above is great advice. Renovate will always start with an "onboarding PR" which forecasts how many PRs are required, and lets you update the onboarding config in-PR and preview the results. But for maximum experimentation then installing it into a fork would be best for tuning it until you're ready for it on the main repo. You can see an example onboarding PR for my fork here. Another way to approach things cautiously is to set One of the features of monorepo support is that Renovate will update the same dependency across all packages at once, so that they don't get out of sync. Renovate can additionally support grouping:
Scheduling is also supported, e.g. weekly or monthly, which you can conveniently override to force creation any PR early via the dashboard if desired. On ranges, the major decisions are:
Projects which tend to use caret ranges (e.g.
If you prefer not to get individual PRs for ever non-major update then an alternative is to use Renovate's "lock file maintenance" feature. It essentially just wipes away your lock file and uses yarn to recreate it regularly, so that you are then up-to-date (within the constraints of your |
I like the dashboard idea! That way the maintainer can pull the updates on a schedule convenient for them.
Dang, that's really handy! 👍 You can say: "leave me alone Renovate bot, only bother me on Mondays" (for example), but if you want updates earlier than the schedule you can request them from the bot via the dashboard. I hadn't thought of that workflow yet!
Does this mean that Renovate deals with the current https://github.com/facebook/docusaurus/tree/master/packages system setup by default? I'm not not sure how much manual configuration you need to update all those |
I've looked at the on-boarding pull request on @rarkins's fork of Docusuarus. Maybe it's a good idea to ask @slorber how they want the bot to work. I think these questions are good starters to cover the basic functionality and workflow:
|
Yes
FYI default behavior is maximum 2 per hour and 20 concurrently, and both of those are configurable. Ultimately, there's a lot of out-of-date dependencies here, even when most non-major updates are being ignored from that calculation (it's mostly major). I would say you might want to keep ranges as-is until there's less to upgrade, but maybe to monthly lock file maintenance to keep locked versions updated to latest in range. There appears to be some grouping that could be done (e.g. react-based, or remark-based, etc) although major updates for related packages aren't necessarily dependent on each other and if you get breaking changes from more than one package at a time then it can be challenging to figure out exactly why. If you're lucky, many major updates in JS packages are simply to bump the minimum supported Node.js version, which means zero work/changes required. |
Hi and thanks for the infos. My Facebook manager is ok to install such a bot, and I confirm I don't have permissions to do so myself. The dashboard looks nice. Please note that we have docusaurus-1 and docusaurus-2 on the same repo. What I notice in the fork PR is that Renovabot suggests me to upgrade to Webpack 5, Remark 13, React 17... etc. Those look like major upgrades to me. I don't particularly expect a bot to handle them for me 😅 Our plan is not particularly to be early adopters of new major version releases. I'd rather wait for community feedback than upgrading deps as soon as they get published.
Once per month to start, and maybe more if this is sustainable?
Why not
No
Yes
Keem semver ranges, don't lock users on a specific version
No
Yes, I'm ok to upgrade dev tools in a more automated fashion than user runtime code.
I guess it depends, but by default I'd say no
I'm ok to receive such PR as long as it's like once a month or so. Not sure about the details and what is possible but:
Does it make sense? |
Yes this make sense! We now have some general requirements to configure the bot the right way. I propose we take @rarkins up on his offer to configure the bot for this project. He knows the ins and out of the bot and how to configure it to your wishes. |
Hi @slorber 👋 @rarkins and I made a config for you to review. We tried to stick as closely as possible to your requirements. I think you'll be very happy with this bot. You can take a look at the Renovate bot running on the rarkins/docusaurus fork here: https://github.com/rarkins/docusaurus/issues/5 Greetings HonkingGoose |
Thanks @HonkingGoose @rarkins , that looks nice. I think we can probably give it a try and see if it works well for our use-case, not sure I'll be able to give more feedback without setting this up 🤪 Will see soon how to get it installed, as I don't think I am able to install an app on this repo |
@slorber If you want to try the Renovate bot yourself:
If you get stuck at any point, feel free to open a issue at your new imported repository and I'll try to help you as best I can. |
Thanks @HonkingGoose I don't forget this issue, |
Oh okay, I thought maybe you needed some help/guidance on how to try out the bot yourself. 🙃 I'll stop bothering you then, and let you get on with your work! 😉 |
Now that we have dependabot, and I'm also pretty regularly (weekly) upgrading packages myself, I think this is good to close. The task of adding Renovate seems to have gotten nowhere. |
💥 Proposal
I propose that this project uses a dependency management bot like Renovate or Depfu to get upgrades in a timely fashion.
Current situation
I know that this project already uses Dependabot to get security updates for the main Docusaurus dependencies which is fine, and a good thing to have.
The main development dependencies seem to get updated when needed.
However there's nothing keeping track of the boatload of dependencies in the packages directory at https://github.com/facebook/docusaurus/tree/master/packages.
It seem to me that all updates are manual as of now?
Updates seem to be done whenever somebody notices somethings out-of-date?
I think a bot will be way better at alerting you whenever there are upgrades to dependencies.
A bot will not forget, and will not get tired of watching for changes.
What a good dependency bot can do for you
A dependency bot helps to:
Benefits
Drawbacks
Why I do not recommend the GitHub-native Dependabot
You might think, why doesn't HonkingGoose recommend Dependabot?
It's build into GitHub nowadays, so why not use that?
Depfu/Renovate bots
I think a bot like Depfu or Renovate could be a good match for this project.
npm
withyarn
. Depfu only covers Ruby and JavaScript. Renovate covers more languages.Where to find these bots
Renovate on GitHub Marketplace
Depfu on GitHub Marketplace
Documentation for these bots
Renovate Docs
Depfu Docs
How to try out any of the bots
I strongly recommend you test out the bots on a fork first.
That way you can see how it works, and tinker with it before unleashing it on the main project.
Have you read the Contributing Guidelines on issues?
Yes.
I was not sure whether to use a feature request or a proposal. I think a proposal is closer to the scope of what would change for the project.
The text was updated successfully, but these errors were encountered: