-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(presets): log the resolved configuration (without internal presets) #39314
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
base: main
Are you sure you want to change the base?
Conversation
7579978 to
0952037
Compare
|
I.e. when run on this repo: {
"config": {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"assignees": [
"viceice",
"secustor",
"jamietanna"
],
"automergeType": "pr",
"baseBranchPatterns": [
"$default",
"next"
],
"customManagers": [
{
"customType": "regex",
"datasourceTemplate": "docker",
"managerFilePatterns": [
"lib/config/options/index.ts"
],
"matchStrings": [
"default: '(?<depName>ghcr.io/containerbase/sidecar):(?<currentValue>.*)'"
]
}
],
"dockerfile": {
"semanticCommitType": "build"
},
"ignorePaths": [
"**/node_modules/**",
"**/__fixtures__/**",
"test/**"
],
"packageRules": [
{
"matchPackageNames": [
"containerbase/node"
],
"versioning": "node"
},
{
"matchDepTypes": [
"dependencies",
"optionalDependencies"
],
"semanticCommitType": "build"
},
{
"matchPackageNames": [
"semantic-release"
],
"semanticCommitType": "build"
},
{
"groupName": "jest monorepo",
"matchPackageNames": [
"@types/jest"
]
},
{
"enabled": false,
"matchFileNames": [
"**/__fixtures__/**"
]
},
{
"description": [
"set fix scope for base image"
],
"matchPackageNames": [
"ghcr.io/renovatebot/base-image"
],
"semanticCommitType": "fix"
},
{
"description": [
"set feat scope for base image major and minor"
],
"matchPackageNames": [
"ghcr.io/renovatebot/base-image"
],
"matchUpdateTypes": [
"major",
"minor"
],
"semanticCommitType": "feat"
},
{
"commitMessagePrefix": "feat(deps)!:",
"description": [
"use `feat` semantic commit scope with breaking change for for base image major"
],
"matchPackageNames": [
"ghcr.io/renovatebot/base-image"
],
"matchUpdateTypes": [
"major"
]
},
{
"description": [
"allow prereleases for base image on next branch"
],
"ignoreUnstable": false,
"matchBaseBranches": [
"next"
],
"matchPackageNames": [
"ghcr.io/renovatebot/base-image"
]
},
{
"description": [
"set build scope for node updates"
],
"matchFileNames": [
".nvmrc",
"tools/docker/Dockerfile"
],
"matchPackageNames": [
"node"
],
"semanticCommitType": "build"
},
{
"additionalBranchPrefix": "major",
"description": [
"set branch prefix for node major updates to split from minor updates"
],
"matchPackageNames": [
"node",
"containerbase/node-prebuild"
],
"matchUpdateTypes": [
"major"
]
},
{
"description": [
"disable some invalid deps from docs"
],
"enabled": false,
"matchFileNames": [
"docs/**/*.md"
],
"matchPackageNames": [
"my.old.registry/**",
"my.new.registry/**"
]
},
{
"dependencyDashboardApproval": true,
"description": [
"require approval on next branch"
],
"matchBaseBranches": [
"next"
],
"matchPackageNames": [
"*"
]
},
{
"dependencyDashboardApproval": true,
"description": [
"require approval on next branch lockfile maintenance"
],
"matchBaseBranches": [
"next"
],
"matchUpdateTypes": [
"lockFileMaintenance"
]
},
{
"addLabels": [
"breaking"
],
"description": [
"Mark major version bumps with the breaking label"
],
"matchUpdateTypes": [
"major"
]
}
],
"prCreation": "immediate",
"rebaseWhen": "conflicted",
"reviewers": [
"@renovatebot/maintainers"
],
"semanticCommitScope": "deps"
},
"hostname": "caerbannog",
"level": 30,
"logContext": "3KhnLErT8Qa6jpPit2me6",
"msg": "Resolved config, without internal presets",
"name": "renovate",
"oldLevel": "trace",
"pid": 63427,
"repository": "renovatebot/renovate",
"time": "2025-11-14T17:27:27.163Z",
"v": 0
}
|
| // This allows users to understand the fully resolved configuration, including any `github>`, `local>`, etc presets, but excluding anything that's internal to Renovate (which can be verbose) | ||
| const resolvedConfigWithoutInternalPresets = | ||
| await presets.resolveConfigPresets(decryptedConfig, config, [], [], false); | ||
| logger.trace( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, DEBUG would be OK here
| // Provide insight into the repository config, resolving everything but internal Renovate presets | ||
| // This allows users to understand the fully resolved configuration, including any `github>`, `local>`, etc presets, but excluding anything that's internal to Renovate (which can be verbose) | ||
| const resolvedConfigWithoutInternalPresets = | ||
| await presets.resolveConfigPresets(decryptedConfig, config, [], [], false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we only do it if this log line is enabled? It's not that much extra processing (as we cache) so maybe it's OK
Changes
Outstanding:
extendsthat haven't been iterated through, by providing them in the final config object - but that requires changing theresolveConfigPresetssignature, so I didn't want to do it yetThis will also be useful because:
Context
Please select one of the below:
AI assistance disclosure
Did you use AI tools to create any part of this pull request?
Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
The public repository: