Skip to content

Add Dependabot configuration file#3653

Merged
nbradbury merged 4 commits intodevelopfrom
issue/3652-add-dependabot-configuration
Mar 15, 2021
Merged

Add Dependabot configuration file#3653
nbradbury merged 4 commits intodevelopfrom
issue/3652-add-dependabot-configuration

Conversation

@wzieba
Copy link
Copy Markdown
Contributor

@wzieba wzieba commented Mar 3, 2021

Description

This PR adds Dependabot tool configuration. It'll start working after merge.

Resolves #3652

Update release notes:

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-woocommerce
Copy link
Copy Markdown

peril-woocommerce bot commented Mar 3, 2021

You can test the changes on this Pull Request by downloading the APK here.

@wzieba wzieba added type: technical debt Represents or solves tech debt of the project. type: enhancement A request for an enhancement. labels Mar 3, 2021
version: 2
updates:
- package-ecosystem: "gradle"
open-pull-requests-limit: 2
Copy link
Copy Markdown
Contributor Author

@wzieba wzieba Mar 3, 2021

Choose a reason for hiding this comment

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

I've limited number of opened PRs 2 to prevent being flood by them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does that mean that the bot will only open 2 PRs max… per day (so if there are 5 outdated deps, it will open 2 PRs on first run on day 1, 2 others on day 2 and one last on day 3)? Or 2 max total (so will creat 2 PRs on day one but will then not open new ones until we close/merge those 2 and have less than 2 still open)?

Depending on this, as well as the average number of issues that Dependabot is gonna find every time, not sure it's worth limiting?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Or 2 max total (so will create 2 PRs on day one but will then not open new ones until we close/merge those 2 and have less than 2 still open)

exactly this ☝️

not sure it's worth limiting?

If we would merge this without limiting, we would end up with having max 5 PRs open at a time as it's a default limit provided by Dependabot.

We could remove limit by setting some big number as a limit as I did in the test run but this would ended up with more than 40 PRs opened at a time - I'm worried that this could shadow the feature PRs.

I'd opt to limit the number of PRs but I'm ok with increasing this number to some bigger than 2. WDYT @AliSoftware ?

Copy link
Copy Markdown
Contributor

@AliSoftware AliSoftware Mar 5, 2021

Choose a reason for hiding this comment

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

Wow 40 is a lot indeed. Worth limiting. Maybe default of 5 is OK though.

What happens if Dependabot opens a PR to update dependency X to version 1.2.3, but we don't wrangle it right away and let it rot… and then later dependency X requires yet another update to 1.3.4? Does Dependabot update the still-open PR? (Or closes the old one and create a new one, tomato tomahto)? Or does it keeps adding PRs without closing obsolete ones?

Because maybe today we should update 40 dependencies (number of PRs Dependabot would open without limiting) but that's because it's the start and once we start having this bot in place inviting us to update deps more regularly we won't have that many in the long run?

Anyway, regardless of the answer to ☝️, 5 seems like a good compromise of a limit to me; we can always revisit later anyway.

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.

I'm more inclined to keep it as 2 for the first weeks, to give us a good chance to properly test the process, and see how it goes, then we can increase it when we are more comfortable.

Copy link
Copy Markdown
Contributor Author

@wzieba wzieba Mar 5, 2021

Choose a reason for hiding this comment

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

Maybe default of 5 is OK though.

Sure!

What happens if Dependabot opens a PR to update dependency X to version 1.2.3, but we don't wrangle it right away and let it rot… and then later dependency X requires yet another update to 1.3.4?

That's a good question - it's the second part you mention: Dependabot will close the old PR and open a new one. Sample of closed PR is here wzieba#50

once we start having this bot in place inviting us to update deps more regularly we won't have that many in the long run?

Yes, I hope so! 5 sounds like a good compromise to me too, I'll update PR

edit: I'm both ok with either 2 either 5 open PRs, let's see what other team members will say

Comment on lines +8 to +9
reviewers:
- "woocommerce/android-developers"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Every PR created by Dependabot will have the team as a reviewers - this aligns to the current reviewing process of any other PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Because it's dependency-related and security-related, we might want to add @woocommerce/platform-9 team as reviewer of those too 🙂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, that's good idea thanks! Addressed in 06ee32d

reviewers:
- "woocommerce/android-developers"
ignore:
- dependency-name: "com.android.tools.build:gradle"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

AGP is a dependency we'd like to have in sync with other in-house libraries due to compatibility with composite builds. Dependabot will ignore any updates for that.

Copy link
Copy Markdown
Contributor

@mokagio mokagio Mar 8, 2021

Choose a reason for hiding this comment

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

First of all: wise idea, thank you! 🙇‍♂️

Second: the comment in the PR would be useful in the configuration file, too. What do you think of:

Suggested change
- dependency-name: "com.android.tools.build:gradle"
# The Android Gradle Plugin is a dependency we'd like to have in sync with other
# in-house libraries due to compatibility with composite build.
- dependency-name: "com.android.tools.build:gradle"

I expanded AGP, which might be unnecessary given this file will be touched by mostly Android developers. Still, it took me a few moments to understand what AGP meant so at least one developer, future me, would benefit from this longer comment 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, good suggestion! Yeah AGP is probably not a very common shortcut, sorry for confusion 😅 addressed in fe9503f

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🙇‍♂️ thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Still, it took me a few moments to understand what AGP meant so at least one developer

Make it two 😆 (took me a few seconds before I figured that AGP was probably an acronym for Gradle then Googled it to confirm the full name of that tool and get the abbreviation 😜 )

@wzieba wzieba marked this pull request as ready for review March 3, 2021 14:41
@wzieba wzieba requested a review from a team March 3, 2021 14:41
@wzieba wzieba added this to the 6.2 milestone Mar 3, 2021
hichamboushaba
hichamboushaba previously approved these changes Mar 5, 2021
Copy link
Copy Markdown
Member

@hichamboushaba hichamboushaba left a comment

Choose a reason for hiding this comment

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

LGTM, let's give the others a chance to review it before merging it.

@hichamboushaba hichamboushaba requested a review from a team March 5, 2021 11:17
AliSoftware
AliSoftware previously approved these changes Mar 5, 2021
Copy link
Copy Markdown
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

Thanks for doing this, that's a great idea!

PR LGTM, so I'm ok if you want to merge it as is. Left a question + suggestion about adding P9 as reviewers but feel free to take it or leave it.

hichamboushaba
hichamboushaba previously approved these changes Mar 5, 2021
@wzieba wzieba dismissed stale reviews from hichamboushaba and AliSoftware via 19ce1c3 March 5, 2021 14:25
hichamboushaba
hichamboushaba previously approved these changes Mar 5, 2021
@hichamboushaba hichamboushaba requested a review from a team March 5, 2021 14:28
@AliSoftware
Copy link
Copy Markdown
Contributor

I'm code-freezing 6.2 today, so since this one is not urgent nor linked to any specific feature, I'm moving its milestone to 6.3 🙂

@AliSoftware AliSoftware modified the milestones: 6.2, 6.3 Mar 8, 2021
@nbradbury nbradbury self-assigned this Mar 15, 2021
Copy link
Copy Markdown
Contributor

@nbradbury nbradbury left a comment

Choose a reason for hiding this comment

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

:shipit:

@nbradbury nbradbury merged commit a89c890 into develop Mar 15, 2021
@nbradbury nbradbury deleted the issue/3652-add-dependabot-configuration branch March 15, 2021 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A request for an enhancement. type: technical debt Represents or solves tech debt of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure Dependabot

5 participants