-1

with this config.js

module.exports = {
  "automerge": false,
  "docker-compose": {"enabled": true},
  "dryRun" : "true",
  "fileMatch": [
    "(^|/)(?:docker-)?compose[^/]*\\.ya?ml$"
  ],
  "extends": ["config:recommended", ":skipStatusChecks"],
  "gitLabIgnoreApprovals": false,
  "platformAutomerge": false,
  "platform": "local"
}

when renovate starts with a local run and finds a docker-compose file which starts like this

version: '3.8'

    services:
    ....

it complains

WARN: cli config dryRun property has been changed to full
INFO: Repository started (repository=local)
   "renovateVersion": "36.35.1"
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git

WARN: Failed to parse osgi file (repository=local, packageFile=compose.yml)
   "err": {
     "lineNumber": 1,
     "columnNumber": 1,
     "message": "JSON5: invalid character 'v' at 1:1",

the docker compse works fine but why does renovate bot complain ?

user3732793
  • 1,699
  • 4
  • 24
  • 53
  • Please, provide clarifications about what do you mean with "inovate". – Bruno Peixoto Aug 11 '23 at 11:36
  • @BrunoPeixoto not sure what you mean. there is no inovate in the question – user3732793 Aug 11 '23 at 12:31
  • Sorry for the typing error. I refer to the term "Renovate". Thanks for the remark – Bruno Peixoto Aug 11 '23 at 13:07
  • @BrunoPeixoto ok fine you mean renovate. That was new to me too ;-) It is a bot script which takes care of depency versions. Therefore the question is tagged with it – user3732793 Aug 11 '23 at 13:11
  • 1
    Although I am also fan to renovate, I know, you can plugin in directly on a repository without need to setup ANY docker yaml. Take a look at my repository: https://github.com/trouchet/sappio/blob/main/renovate.json – Bruno Peixoto Aug 11 '23 at 15:33
  • Please, answer my question: have you renovate set up or not? From my perspective, you only need to plug the app https://github.com/apps/renovate in – Bruno Peixoto Aug 11 '23 at 15:38
  • See my beginning of answer below. If you could provide the complete log of Renovate run, that could help troubleshoot. – Gaël J Aug 12 '23 at 08:29
  • @BrunoPeixoto I have not setup renovate right now as I wanted to see how it works locally only – user3732793 Aug 15 '23 at 07:09
  • 1
    @user3732793 in my experience, the tool "renovate" has a great experience remotely. Although it may be a way to use the plugin, I recommend to let it make its automatic monitoring and push PRs. As soon as you agree with proposed package update, you can accept the PR, merge, and pull locally. – Bruno Peixoto Aug 15 '23 at 11:25

1 Answers1

1

Failed to parse osgi file

It looks like Renovate is assuming your file is to be managed by the osgi manager. And then the format of the file is invalid.

This is surprising as the file name does not relate at all with OSGi.

This comes from the fact that you have added a specific fileMatch which adds the compose file in all managers even that doesn't make sense.

Solution: remove the top-level fileMatch.

Gaël J
  • 11,274
  • 4
  • 17
  • 32
  • added more log outputs and the complete config.js – user3732793 Aug 15 '23 at 07:07
  • 1
    Remove the `fileMatch`, you don't need it. I think it might be adding this file match to all managers, including OSGi. – Gaël J Aug 15 '23 at 08:56
  • that did the trick ! Odd as before it searched many files now it instantly found the docker compose file. Buit still looks like renovate doesn't like local work. Thanks – user3732793 Aug 15 '23 at 13:12