Config-help: Is there a way to expand config to full options?

Created on 8 Dec 2018  路  9Comments  路  Source: renovatebot/config-help

I am trying to understand exactly what rules are in effect. Is there a way to expand the presets into an "effective" config file so that I can tweak it or use it as a basis for a more explicit config file?

The reason I want to do this is that I don't see docker-compose.yml dependencies being updated even though Dockerfile ones are and the docs imply both are enabled. Maybe it isn't finding the location of those files but I'm not sure without seeing the full config exactly what it would otherwise be looking for.

I tried renovate-config-validator mentioned in https://github.com/renovatebot/config-help/issues/91#issuecomment-419611943 but it doesn't seem to have any obvious way to view the expanded config file (and no -h or --help, just validate that it is correct.

Most helpful comment

I've now added this as part of the default renovate options, e.g. you can run the following:

renovate --print-config bjeanes/foo

And it will include a dump of the full, resolved config. Available in [email protected]

All 9 comments

I can see from the logs in the dashboard that Renovate does _see_ the docker-compose files AND sees the outdated dependencies there:

{
  "packageFile": "docker/docker-compose.yml",
  "manager": "docker-compose",
  "deps": [
    ...
    {
      "depName": "postgres",
      "currentTag": "9.6",
      "currentDepTagDigest": "postgres:9.6",
      "currentDepTag": "postgres:9.6",
      "currentValue": "9.6",
      "currentFrom": "postgres:9.6",
      "versionScheme": "docker",
      "purl": "pkg:docker/postgres",
      "lineNumber": 81,
      "updates": [
        {
          "fromVersion": "9.6",
          "toVersion": "11.1",
          "newValue": "11.1",
          "newMajor": 11,
          "newMinor": 1,
          "updateType": "major",
          "isSingleVersion": true
        }
      ],
      "warnings": [],
      "repositoryUrl": null,
      "releases": [
        "9.6",
        "10.0",
        "10.1",
        "10.2",
        "10.3",
        "10.4",
        "10.5",
        "10.6",
        "11.0",
        "11.1"
      ]
    },
    ...
  ]
}

However, I haven't seen any PRs for these in the ~1 week I've been running Renovate and I can't tell from my (non-expanded) config nor from the log files why that might be.

The rule impacting you is actually part of the default Renovate behaviour, not any preset. Major updates for Docker are disabled by default so you need to opt in to them: https://github.com/renovatebot/renovate/blob/e726b47648af0e3256cd4b647a957c680df09934/lib/config/definitions.js#L1110

Nonetheless, that would likely have been clear if it were possible to print out the effective config file to make it eventually clear what options set and which took precedence in any given circumstance. What do you think?

It might be good to set skipReason (at least i think that's the name from memory) in the logs in that case. That also would have clarified it

The reason we don't do it is because most "full" configs would be huge once you pull in all the monorepo rules, and we don't want to log it every time. Maybe we can add a dashboard debugging page that lets you fully expand a config there.

Right now skipReason is internal only and not exposed to config.

No but skipReason is in the logs so setting it to "disabled by current config"
would be nice.

I'm not suggesting logging the full config necessarily, just some way to
view it. renovate-config-validator --debug for instance...

I've now added this as part of the default renovate options, e.g. you can run the following:

renovate --print-config bjeanes/foo

And it will include a dump of the full, resolved config. Available in [email protected]

Is there anyway to run renovate --print-config against my local working copy? The need for this (for me) is to iterate on the actual config options and understand them, but the above seems to want a GitHub token and to fetch the committed version.

I don鈥檛 think that鈥檚 possible right now. Set up a dummy repo with nothing but a Renovate.json?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daern91 picture daern91  路  3Comments

stefee picture stefee  路  4Comments

diagonalfish picture diagonalfish  路  3Comments

HonkingGoose picture HonkingGoose  路  4Comments

bjeanes picture bjeanes  路  9Comments