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

docs(config-overview.md): explain order of operations for final config #32623

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions docs/usage/config-overview.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Renovate configuration overview
KUGA2 marked this conversation as resolved.
Show resolved Hide resolved

When Renovate runs on a repository, the final config used is derived from the:

- Default config
- Global config
- Inherited config
- Repository config
- Resolved presets referenced in config
When Renovate runs on a repository, the final config used is derived from the following config locations. The below is the order of precedence:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
When Renovate runs on a repository, the final config used is derived from the following config locations. The below is the order of precedence:
Each time Renovate runs on a repository it reads the configuration files listed below and creates a final config.
This final config describes what Renovate will do during its run.
The final config is internal to Renovate, and is _not_ saved or cached for a later run.
But you can always find the final config in Renovate's logs.
Renovate reads the configuration files in this order (from from top to bottom):

I think we should explain that:

  • the final config is internal to Renovate
  • and that Renovate does not save/cache the final config for later (I think?)
  • Renovate puts the final config in the log output

Plus I'm rewriting bits we already had. 🙂

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is technically true but might confuse someone. If repositoryCache is enabled, then Renovate will cache the repository config, using the default branch SHA as cache key. However the "final" config is derived from all the configs together and it is always recalculated/non-cached


1. Default config
2. Global config
2.1 File config
2.2 Environment config
2.3 CLI config
Comment on lines +6 to +9
Copy link
Collaborator

Choose a reason for hiding this comment

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

I still see this "rich" diff:
image

Is the diff wrong?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know how this looks in the published docs... 😞

The published docs use a Python Markdown variant. But the rich diff on GitHub assumes the input is GitHub Flavored Markdown.

I remember us having problems with list formatting as Python Markdown uses 4 spaces. But GitHub-flavored markdown uses different conventions for some list types.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe should we use a) b) c) instead?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe should we use a) b) c) instead?

Sounds good!

It will probably not fix the problem of the layout, but it's easier to read and remember.

A number and a letter seems better than a number and then a slightly different number.

3. Inherited config
4. Resolved presets referenced in config
5. Repository config

Items with a higher number override items that have lower numbers.
If the item has the `mergeable` property, it will merge with lower numbers instead.

<!-- prettier-ignore -->
!!! note
Expand Down