-
Notifications
You must be signed in to change notification settings - Fork 67
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
Automatically update our dependencies using dependabot #1012
Comments
I'm +1 on this in theory, but have one concern to figure out: my experience with dependabot in other repositories is that it tends to generate a decent amount of noise. Maybe this is less of a problem for us because we don't have a ton of dependencies, but I've seen a lot of repositories with large numbers of un-merged dependabot PRs for patch versions and such. To that extent, what if we also adopt a practice like:
This will require to believe in our testing infrastructure, but I think that this is a target we should be shooting for anyway). This also reminds me I need to figure out that "PR is open, somebody merge it" alert bot again :-) |
You can set the frequency for when it checks. In my projects I set it to check weekly to reduce noise. But you could set it to run on a specific day of the week if you wanted. https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#scheduleinterval There is also an |
I am +1 on trying this out and seeing how it goes. If it feels noisy we can revisit it later on. |
Another thing we can do is phase in dependabot for different ecosystems, since it will always be noisy when you first add it. So an example strategy could look like:
|
Let's experiment in the iterative fashion you proposed above... |
For what it's worth, the places where I've seen dependabot be the most annoying are in JavaScript worlds where there are seemingly 10,000 dependencies for every project, and they all make patch releases every 15 minutes. 😅 hopefully we wouldn't have as much of an issue with that here |
Ok, I will make a PR to enable dependabot just for the Python dependencies in our docs folder later today. Why the docs folder? Our docs get tested/built regularly by readthedocs so we should quickly know if we run into issues. |
Sorry, I ended up not having time to make the PR yesterday, but it's here now! #1022 After we merge it, I recommend we monitor for 4 weeks (so 4 runs of the bot) and then reassess. |
Adding a note here to remind myself that this should be documented here too https://team-compass.2i2c.org/en/latest/practices/styleguide.html (And should maybe be renamed when that change happens) |
Just a note that I don't think we got any PRs today because we don't actually pin anything in |
yeah I realized that in another project as well - so we should probably use a different |
I think that is true, yeah. Or instead of using a requirements file, we could enable updates for GitHub Actions instead since those are pinned. |
either works for me - thus far, for Python packages I haven't found dependabot to be annoying, especially if you don't ask it to make PRs for patch versions. |
I opened a new PR to swap to GitHub Actions #1037 |
Wondering if we should pin those dependencies 🤔. |
I'd be plus one on that. Better to know when your deps are changing than letting them define themselves. Even if it's "only" docs. |
I realised I had let this go a little bit stale, so here's another PR to start tracking our pip dependencies #1332 |
UpdateWe discussed this in a meeting today:
updated top comment to reflect this |
Topics to discuss to follow-up this issue:
|
With terraform, if we bump we'd also have to |
Agreed, but we can also run into unforeseen toil if we have to do this the next time we touch the terraform config. So one thing we could do is, from a project management POV, always allocate extra time to a task that touches terraform in case such an issue crops up. (People are always mad you're overdue but happy that you're early!) |
Is there any "silly" task we might run repeatedly or are you thinking about proactively selecting terraform-related issues from the backlog? |
@damianavila Here's a scenario I'm imagining:
So not proactively selecting terraform tasks from the backlog per se and it's not even that this task would crop up all the time, but when we do select terraform tasks, give the engineer a little more time than we expect them to need |
Makes sense to me! |
I think we can close this issue once we reach consensus on the above. |
I am usually in favor/biased towards pinning requirements. |
I've not read through this issue, but here are three strategies for three situations that I've come to appreciate:
requirements.txt pinning?Based on a comment in chat I think it could be relevant to also to provide input if we should pin requirements.txt in this repo - it is used as a declaration of the python dependencies needed for the deployer script. I think this is reasonable at least if we have experienced or expect to see the CI/CD pipeline crash due to bugs in the dependencies over time. If so, then I think a good approach is to use requirements.in + requirements.txt and refreeze requirements.txt in a way that z2jh's does: using pip-compile run from within a docker container. See this logic and the README.md in this folder. |
We already have dependabot setup to watch requirements.txt files, it just wasn't generating any PRs since none of the packages listed in our requirements files are pinned: infrastructure/.github/dependabot.yaml Lines 33 to 44 in 04b6501
|
Given @damianavila's comment in #1583 (comment), and the fact that there are other pkgs in the hub image apart from @sgibson91, I believe you mentioned some time ago automating these upgrades, but I don't remember the context exactly and I'm trying to figure out if I should open a new issue to track this? |
I don't think dependabot will be able to bump OAuthenticator in the Dockerfile. dependabot only really bumps the base image, i.e., infrastructure/helm-charts/basehub/values.yaml Lines 353 to 355 in f35d06d
|
@GeorgianaElena I'm going to recommend a new issue for further discussion around your topic and close this one given that #1561 was merged. We can iterate in a new issue on dependabot/pinning generally if folk think it is needed. |
Description of problem and opportunity to address it
Context to understand the problem
We maintain a lot of tools in this repository that have dependencies. Remembering to update them for security or bugfix reasons is often not at the top of our to-do lists and only gets there as a result of a wider problem.
Proposed solution
Dependabot is a tool (supported by GitHub) that can watch select package ecosystems for upgrades to listed dependencies and generate PRs to bump them over a given frequency. The generated PRs come with changelogs and can be managed using a range of
@dependabot
commands (that are also explained in the PR) and we can choose to ignore a given dependency bump if needed.What's the value and who would benefit
We would no longer need to "remember" to make PRs like this #1005 while still retaining flexibility on when we upgrade.
Dependabot also tracks more than just Python dependencies! It can also bump GitHub Action versions, terraform modules, and Docker base images https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#package-ecosystem
Implementation guide and constraints
Folk are concerned that dependabot is noisy and so we should phase the rollout of dependabot managing our dependencies so we don't get an influx of of Pull Requests.
docs
folder (since those are regularly built/tested by RTD)Updates and ongoing work
No response
The text was updated successfully, but these errors were encountered: