diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 5dff3eb1b2e1..18373fc1ac9b 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,23 +1,33 @@ { - // Renovate configuration schema validation "$schema": "https://docs.renovatebot.com/renovate-schema.json", - // Extend recommended default rules from Renovate "extends": [ - "config:recommended" + // Use pre-determined best practices, including monorepo groupings & GitHub Action digest pinning + "config:best-practices", + // Create version bump PRs globally on a monthly basis (first day of the month) + "schedule:monthly" ], - // Enforce Conventional Commits format for all pull requests generated by Renovate "semanticCommits": "enabled", "semanticCommitType": "chore", "semanticCommitScope": "deps", - // Widen dependency constraint ranges by default when updating dependencies - "rangeStrategy": "widen", - // Disable global lockfile maintenance by default; enabled per-group in packageRules below + // Increase compatibility with other projects + "rangeStrategy": "update-lockfile", + // Phase 1: Minimal lockfile maintenance across Core & Handwritten gems without proactive version bumps "lockFileMaintenance": { - "enabled": false + "enabled": true, + "groupName": "core handwritten gems lockfiles", + "automerge": false + // Inherits "schedule:monthly" from extends preset }, "packageRules": [ + // Group all patch updates across all dependencies into a single PR + { + "matchUpdateTypes": [ + "patch" + ], + "groupName": "all patch updates" + }, + // Disable Renovate processing for non-Phase 1 gems during our phased rollout { - // Disable Renovate processing for non-Phase 1 gems during phased rollout "description": "Disable Renovate processing for non-Phase 1 gems during phased rollout", "matchFileNames": [ "!google-cloud-core/**", @@ -32,31 +42,17 @@ ], "enabled": false }, + // Disable proactive rubygems version bumps across Phase 1 while keeping lockFileMaintenance enabled. + // Note: Even though proactive package updates (`rubygems`) are disabled here, when `lockFileMaintenance` + // runs (`bundle lock --update` via Renovate's bundler manager), it can still trigger `Gemfile` constraint updates + // to synchronize out-of-date bounds (e.g., internal monorepo gems or dev utilities) with the refreshed `Gemfile.lock`. + // When the team is ready for Phase 2 (allowing proactive Gemfile version bumps), simply delete this rule. { - // Phase 1: Enable minimal lockfile maintenance across Core and Handwritten gems - "description": "Phase 1: Core & Handwritten Gems Lockfile Rollout", - "matchFileNames": [ - "google-cloud-core/**", - "google-cloud-storage/**", - "google-cloud-pubsub/**", - "google-cloud-bigquery/**", - "google-cloud-errors/**", - "google-cloud-resource_manager/**", - "google-cloud-bigtable/**", - "google-cloud-logging/**", - "google-cloud-monitoring/**" + "description": "Disable proactive rubygems version bumps across Phase 1; note that lockFileMaintenance (`bundle lock --update`) can still trigger Gemfile constraint updates when refreshing lockfiles", + "matchDatasources": [ + "rubygems" ], - "groupName": "core handwritten gems lockfiles", - // Use update-lockfile strategy to prevent Gemfile constraint widening during lockfile maintenance - "rangeStrategy": "update-lockfile", - "lockFileMaintenance": { - "enabled": true, - "automerge": false, - "schedule": [ - "before 5am" - ], - "commitMessageAction": "maintain Gemfile.lock files" - } + "enabled": false } ] }