Skip to content

Commit

Permalink
chore(renovate): migrate to standard renovate config [CIA-611]
Browse files Browse the repository at this point in the history
👋 This is an automated pull request to Migrate this repository's renovate config to the latest and greatest recommended settings.

### 🙏 __Please approve and merge this PR yourself promptly.__ 🙏

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.

<details>
<summary>Summary of the standard renovate preset</summary>

- 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.)

</details>

## 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.

<details>
<summary>Add our standard preset</summary>

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.

</details>

<details>
<summary>Remove now redundant presets</summary>

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.

</details>

<details>
<summary>Replace the github>coveo-platform/platform-tools preset</summary>

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.

</details>

<details>
<summary>Update preset references</summary>

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.

</details>

<details>
<summary>Reorder presets</summary>

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.

</details>

<details>
<summary>Remove auto-approve workflow</summary>

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.

</details>

<details>
<summary>Remove non-recommended options (repositories, prConcurrentLimit, enabledManagers)</summary>

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`.

</details>

<details>
<summary>Remove redundant options (prHeader, rebaseWhen, branchPrefix, reviewersFromCodeOwners)</summary>

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.

</details>
  • Loading branch information
dotboris committed Oct 18, 2024
1 parent d3ef51b commit db74b4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"enabled": true,
"extends": [
"github>coveo/renovate-presets",
":semanticPrefixFixDepsChoreOthers",
"helpers:pinGitHubActionDigests",
"schedule:earlyMondays"
Expand Down

0 comments on commit db74b4f

Please sign in to comment.