Skip to content
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

chore(renovate): migrate to standard renovate config [CIA-611] #39

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dotboris
Copy link

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

👋 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>
@dotboris dotboris requested a review from a team as a code owner October 18, 2024 11:55
@dotboris dotboris requested review from olamothe, louis-bompart, alexprudhomme, pballandras and a team and removed request for a team October 18, 2024 11:55
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.

1 participant