8000 [PM-17239] Update Renovate config to configure patch behavior and reassign dependencies by trmartin4 · Pull Request #5775 · bitwarden/server · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[PM-17239] Update Renovate config to configure patch behavior and reassign dependencies #5775

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

Merged
merged 2 commits into from
May 7, 2025

Conversation

trmartin4
Copy link
Member
@trmartin4 trmartin4 commented May 6, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-17239

📔 Objective

This works in tandem with bitwarden/renovate-config#26, which changes the default behavior for npm and nuget-managed dependencies to not trigger PRs for patch updates by default.

It does the following:

  1. Specifies the packages for which we do want to open PRs for patch updates automatically. Currently, this is the Microsoft.Extensions and Microsoft.AspNetCore packages.
  2. Since we are reducing the frequency of updates by ignoring patches by default for npm and nuget, we are also going to be moving more dependencies into the Platform ownership. This reduces the split of the preconfigured monorepos between teams, thereby eliminating the need for ad-hoc groupings. These have been removed.
  3. The matchPackagePatterns configuration has been deprecated by Renovate, and matchPackageNames supports Regex matching for package names (see documentation. As such, I migrated the remaining ad-hoc grouping to use this pattern.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@trmartin4 trmartin4 changed the title Update config to send patch updates to dashboard [PM-17239] Update config to send patch updates to dashboard May 6, 2025
@trmartin4 trmartin4 changed the title [PM-17239] Update config to send patch updates to dashboard [PM-17239] Update Renovate config to configure patch behavior and reassign dependencies May 6, 2025
Copy link
Contributor
github-actions bot commented May 6, 2025

Logo
Checkmarx One – Scan Summary & Detailsb1c07adf-cb7b-461f-ac79-6e2621e63bc6

Great job, no security vulnerabilities found in this Pull Request

Copy link
codecov bot commented May 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.25%. Comparing base (887fa46) to head (489ec68).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5775      +/-   ##
==========================================
- Coverage   47.29%   47.25%   -0.05%     
==========================================
  Files        1647     1648       +1     
  Lines       74980    75061      +81     
  Branches     6770     6779       +9     
==========================================
+ Hits        35464    35470       +6     
- Misses      38033    38107      +74     
- Partials     1483     1484       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

withinfocus
withinfocus previously approved these changes May 7, 2025
"/^Microsoft\\.AspNetCore\\./",
],
matchUpdateTypes: ["patch"],
dependencyDashboardApproval: false
Copy link
Contributor

Choose a reason for hiding this comment

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

⛏️ I am noticing inconsistencies with trailing commas on the final line, across all our Renovate configs, and it's bothering me.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great catch. I've updated this with 489ec68 (#5775).

I'll check the other configs as well, as now that I see it it's bugging me too.

Copy link
Contributor

Choose a reason for hiding this comment

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

For what it's worth, I like the opposite -- no trailing comma 😉.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops.

I can open up another PR with those changes if you'd like. I noted that JSON doesn't support trailing commas but JSON5 does, so for consistency's sake it might make sense to change them all to not have trailing commas regardless of the file type.

Copy link
Member

Choose a reason for hiding this comment

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

Very late to the party but I will share why I actually like the trailing comma, it all comes down to git merges. Take this file:

{
  "prop1": "value",
  "prop2": "value"
}

Pretend someone wants to add a new property, your diff will be:

{
  "prop1": "value",
-  "prop2": "value"
+  "prop2", "value",
+  "prop3": "value",
}

If person 2 made a change to prop1 in parallel, you've now got a merge conflict, but if you had trailing commas, then person 1 only has add a single line and not edit another one.

Tangentially if you wanted to "optimize for git" in another area you would put line breaks between PackageReference's

<PackageReference Include="AspNetCoreRateLimit.Redis" Version="2.0.0" />
<PackageReference Include="AWSSDK.SimpleEmail" Version="3.7.402.79" />
so that renovate could make and we could merge 2 PRs with version bumps of packages right next to each other. Because even though the 2 PRs don't edit the exact same line if 2 touching lines are edited git will make you do a merge conflict resolution.

Copy link
sonarqubecloud bot commented May 7, 2025

@trmartin4 trmartin4 merged commit 051f200 into main May 7, 2025
53 checks passed
@trmartin4 trmartin4 deleted the platform/nuget-patch-updates branch May 7, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0