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

Conversation

KUGA2
Copy link

@KUGA2 KUGA2 commented Nov 19, 2024

Changes

  • Add possible options for global config
  • State that the order is the precedence order
  • Fix order

Context

#32598

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository
  • None of that. Its documentation only.

- Add possible options for global config
- State that the order is the precedence order
- Fix order
@KUGA2 KUGA2 changed the title Update config precedence [improve][doc] Clarify config precendence Nov 19, 2024
@KUGA2 KUGA2 changed the title [improve][doc] Clarify config precendence docs(config): Clarify config precendence Nov 19, 2024
rarkins
rarkins previously approved these changes Nov 19, 2024
docs/usage/config-overview.md Outdated Show resolved Hide resolved
Co-authored-by: Birger J. Nordølum <contact@mindtooth.no>
docs/usage/config-overview.md Outdated Show resolved Hide resolved
docs/usage/config-overview.md Outdated Show resolved Hide resolved
docs/usage/config-overview.md Outdated Show resolved Hide resolved
rarkins and others added 2 commits November 27, 2024 12:05
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Comment on lines +6 to +9
2. Global config
2.1 File config
2.2 Environment config
2.3 CLI config
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.

- 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

docs/usage/config-overview.md Show resolved Hide resolved
@KUGA2 KUGA2 changed the title docs(config): Clarify config precendence docs(config): Clarify config precedence Nov 27, 2024
@KUGA2 KUGA2 changed the title docs(config): Clarify config precedence docs(config-overview.md): explain order of operations for final config Nov 27, 2024
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.

4 participants