这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jamietanna
Copy link
Contributor

@jamietanna jamietanna commented Nov 14, 2025

Changes

Outstanding:

  • I'd quite like to surface the extends that haven't been iterated through, by providing them in the final config object - but that requires changing the resolveConfigPresets signature, so I didn't want to do it yet
  • this needs tests updated to include the changes
  • what do we want to do with environment config? Should this also get merged in?

This will also be useful because:

  • We can consume this data (i.e. as a first-class way of getting fully merged data from https://www.jvt.me/posts/2024/04/14/renovate-config-sql/) i.e. on the Mend Developer Platform, or in organisations
  • We can request this as part of a user's "Request Help" Discussion, and get the full configuration of note

Context

Please select one of the below:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

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.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

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

The public repository:

@jamietanna jamietanna force-pushed the feat/resolved-repo-config-no-presets branch from 7579978 to 0952037 Compare November 14, 2025 17:31
@jamietanna jamietanna changed the title fix(presets): log the resolved configuration (without internal presets) feat(presets): log the resolved configuration (without internal presets) Nov 14, 2025
@jamietanna
Copy link
Contributor Author

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(
Copy link
Contributor Author

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);
Copy link
Contributor Author

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

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.

2 participants