-
Notifications
You must be signed in to change notification settings - Fork 2k
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
automate dependency updates #3395
Comments
@saihaj Strongly disagree with that. Also call me paranoid but we need to review package-lock.json changes to prevent security problem affected NPM recently (e.g. ua-parser hajack a month ago). Since as you pointed above we don't have any dependencies and our website is static. |
Well the example you shared yes the git history has many dependency updates but in reality those commits only touch package management files. The git blame for files is what you want to be able to see and that is not impacted at all with this. I mean you doing a dependency or related ones at a time you can easily revert back if something is broken (not that it matters much in our case here).
Well I was initially suggesting CI passes and we merge deps update but to from this we still don't need a human to manually update. We can have the bot open a PR and then someone can review it and once you approve it can auto merge.
Its okay if we don't want to merge to avoid day 0 exploits. But we can still utilize tooling to help with doing things which can easily be automated.
The PR opened by bot shows everything you need so in review process you can just view there. Humans can do better things with time. I think it is simpler to just have a tool generate and provide all details that you would manually go hunt for. Then it is as simple as hitting merge button. Which I think helps one save time and we can do more productive things. |
@saihaj I'm not speaking about git blame but general history is affected.
It will make supporting branches that change
Not sure what we saving here tools like
Personal opinion: Changes should be made only by humans and validated by tools. |
I mean it could just be possible that all you do between releases is just update deps and ship a new version.
Well you still have to run
Well this is saying that anything that is opened and has passing tests can just blindly get merged.
Well the tests do run when you open a PR. The point being made here that we manually create PRs how is that any better? Like those chunks are not reviewable? Then should we require all the changelogs for all the deps being updated in PR summary? Cause how does anyone else who is tryna follow understand what was done? How do we ensure the user upgrading deps read all the changelogs? At least this way all the information will be in PR summary and we are certain if someone is hitting that merge button reviewed it. |
@IvanGoncharov, I think you are raising some valid points in terms of bot-noise and dependency stability. Not to plug a particular product, but a casual look at some Renovate options reveals that there are ways to both increase automation and address some of your concerns. https://docs.renovatebot.com/configuration-options/#groupname Modifying the example given there only slightly would allow us to group all of our dependencies into one PR like so:
https://docs.renovatebot.com/configuration-options/#stabilitydays Setting this to some lengthy value (at least 3 considering npm's unpublish window!) would help in terms of partially alleviating any malicious update concerns -- maybe 14 is a value that makes sense?
It looks like we can reduce the "noise" further by delaying even raising the PR until the stability window has passed:
It probably makes sense to separate major and non-major dependency updates into separate PRs, as major updates probably require a bit of extra mental attention. I think the (so far) unaddressed points you made are the most interesting!
Overall, I think changing dev dependencies on a code base such as this one in which code coverage is pretty high is a pretty low risk activity, and I would suggest that minor/patch updates could be automerged if tests pass, with human review necessary only for major dependency updates, and, of course, if tests fail. I certainly would agree with @saihaj that we are ok to allow a bot to raise PRs without automerging. I do agree that we should add some config options to address your other concerns. |
I did forget to mention that we would need to use a scheduling option as well, maybe updating dependencies every 2 weeks for minor/patch, every 4 weeks for major? In addition to above grouping/stability options. |
@IvanGoncharov any follow up thoughts? |
On the working group we decided to go with renovate and now need a PR for adding it! |
We don't have any dependency for
graphql-js
but as we are setting up the site and just in general it is a good idea to keep things up to date. Currently we have to manually upgrade them. We should setup dependabot or renovatebot to manage upgrade and we have dependency PRs auto merge if the CI succeeds.The text was updated successfully, but these errors were encountered: