From 08a09ce998065fc463def82c60f625ed0cfc08a1 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Fri, 18 Oct 2024 07:17:50 -0400 Subject: [PATCH] chore(renovate): migrate to standard renovate config [CIA-611] :wave: This is an automated pull request to Migrate this repository's renovate config to the latest and greatest recommended settings. ### :pray: __Please approve and merge this PR yourself promptly.__ :pray: https://coveord.atlassian.net/browse/CIA-611 This PR is part of a migration effort from the Platform Engineering unit that aims to standardize everyone's Renovate config for the better. The main goal of this PR is to ensure that everyone uses our [standard renovate preset](https://devportal.dep.cloud.coveo.com/docs/default/component/renovate/configuration/available-presets/default-json.gen/). On top of this, we're also tweaking and adjusting some options to make sure that things work a little better. ## What does the standard preset do? Our standard preset ([`github>{...}/renovate-presets`](https://devportal.dep.cloud.coveo.com/docs/default/component/renovate/configuration/available-presets/default-json.gen/)) does a lot of things out of the box for you. These are settings that we believe should apply to everyone. Note that some of these settings are meant to act as default sane values and can be overwritten in your own renovate config.
Summary of the standard renovate preset - Groups all non major Javascript & Typescript package updates together - Groups all non major Python package updates together - Includes the official `config:recommended` preset - Enables the Dependency Dashboard - Ignores common module and test directories - Groups monorepo package updates together - Groups related package updates together (list curated by renovate) - Applies package replacement rules (ex: a package changes name) - Applies crowd-sourced workarounds for known problems with packages - Groups python version updates in their own PR - Schedules renovate to create PRs weekly (Tuesday morning, to avoid holidays and long weekends) - Adds "merge confidence" badges to table in the pull request body - Enables updating TGF - Enables updating container image reference in `.deployment.config*` - Disables updates for untrusted and [low-trust](https://github.com/coveo-platform/gha-infra/tree/main?tab=readme-ov-file#low-trust-actions) GitHub actions - Enables semantic commits for PR titles and commits. (ex: `chore(deps): update ...`) - Disables major updates for the Spring Framework - Pins hashes for docker dependencies - Assigns PR reviewers from the `CODEOWNERS` file - Sets standard labels for renovate PRs - Sets a standard timezone so renovate works on our timezone (`America/Toronto`) - Waits for a version to be at least 7 days old before attempting an update. (Except for internal dependencies, we don't wait for those.)
## Explanation of Changes If you're curious as to what changes we've made and why we've made them, this section will go into detail on those. This list contains all the possible changes it's likely that only some of these apply to this PR.
Add our standard preset If your repository doesn't already use our preset, we have added to for as the first item in `extends: [...]`. This preset must be the first in the list to allow you to override its settings with other presets.
Remove now redundant presets We have removed some presets from your config because they have been made redundant by our standard preset. To be specific, these presets were removed from your config because they're already included in the standard preset and because their ordering in `extends: [...]` doesn't matter.
Replace the github>coveo-platform/platform-tools preset This preset was originally put in place by the platform foundation team for Java projects. We have replaced this project by a combination of our standard preset and our auto-merge preset. The standard preset is the first in the list and the auto-merge preset is the last in the list. You'll notice some formatting changes to renovate's PRs as well as the names of renovate's branches.
Update preset references Over time, we have moved and renamed some presets. To avoid breaking everyone's renovate config, we have configured renovate to apply those changes at runtime. We are now applying these changes to your config. This makes it easier to look up the presets that you're using since they won't be pointing to old presets that no longer exist.
Reorder presets We have switched around the order of some presets. The order in `extends: [...]` matters to renovate as presets that are later in the list override the ones that are earlier in the list. We've made two key ordering changes: - Our standard preset is now the first in the list. This allows your other presets to override it. - Our auto-merge preset is now last in the list. This allows it to override groupings from all other presets.
Remove auto-approve workflow In the past, if you wanted renovate to auto-merge certain updates, you needed a bot to approve some of renovate's PRs. The approval requirement for renovate's auto-merge functionality is now gone and renovate can auto-merge certain PRs without the need for an approval. Because of this change, the auto-approve workflow is now redundant and has been removed. Note that we've also adjusted all branch protection rules and rulesets in your repository's settings to allow renovate to bypass them.
Remove non-recommended options (repositories, prConcurrentLimit, enabledManagers) There are certain renovate options that we believe should not be set as they do more harm than good: - `repositories`: This option is not valid in a repository config. Removing this will also removes a warning from your Dependency Dashboard. - `prConcurrentLimit`: This option used to be set to a pretty low number. This can block renovate from auto-merging certain updates because it can't open any more PRs. - `enabledManagers`: The option tells renovate that it should enable the given managers and disable all other ones. By default renovate has most, if not all, managers enabled. If you want to disable a manager, you're better off setting `{my-manager}.enabled = false`.
Remove redundant options (prHeader, rebaseWhen, branchPrefix, reviewersFromCodeOwners) We have removed these options because they were either set to their default value or set to the value already specified in our standard preset. Removing these options makes it easier to change them in the future if need be.
--- renovate.json5 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/renovate.json5 b/renovate.json5 index 53bffed..e9893de 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -1,10 +1,8 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:recommended", "github>coveooss/renovate-presets", "schedule:earlyMondays", "group:allNonMajor" - ], - "rebaseWhen": "auto" + ] }