renovatebot / config-help

Please use the Discussions feature of https://github.com/renovatebot/renovate instead
https://github.com/renovatebot/renovate/discussions
MIT License
27 stars 16 forks source link

Stumped by skip reason unsupported-version #926

Closed Jonnymcc closed 4 years ago

Jonnymcc commented 4 years ago

Which Renovate are you using?

WhiteSource Renovate App

Which platform are you using?

GitHub.com

Have you checked the logs? Don't forget to include them if relevant

{
            "depType": "github",
            "depName": "github.com/some-org/terraform-aws-modules",
            "depNameShort": "some-org/terraform-aws-modules",
            "currentValue": "r20.2.4",
            "datasource": "github-tags",
            "lookupName": "some-org/terraform-aws-modules",
            "skipReason": "unsupported-version",
            "depIndex": 1,
            "updates": []
          },
          {
            "depType": "github",
            "depName": "github.com/some-org/aws-modules",
            "depNameShort": "some-org/aws-modules",
            "currentValue": "v0.0.1",
            "datasource": "github-tags",
            "lookupName": "some-org/aws-modules",
            "depIndex": 2,
            "updates": [
              {
                "fromVersion": "v0.0.1",
                "toVersion": "0.0.7",
                "newValue": "0.0.7",
                "newMajor": 0,
                "newMinor": 0,
                "updateType": "minor",
                "isSingleVersion": true
              },
              {
                "fromVersion": "v0.0.1",
                "toVersion": "20.40.0",
                "newValue": "20.40.0",
                "newMajor": 20,
                "newMinor": 40,
                "updateType": "major",
                "isSingleVersion": true
              }
            ],
            "warnings": [],
            "fixedVersion": "v0.0.1",
            "sourceUrl": "https://github.com/some-org/aws-modules"
          }
        ]
      },

What would you like to do?

Our modules repo, which is aws-modules renamed to terraform-aws-modules, has releases created like r1.2.3. There are some other legacy tags formatted v0.0.7.

I've been trying different forms of

  "packageRules": [
    {
      "datasources": ["github-tags"],
      "extractVersion": "^[vr]?(?<version>.*)$"
    }
  ]

but it always seems to say "skipReason": "unsupported-version". What does unsupported-version mean, and what regex should I be using to support both formats of tags?

Jonnymcc commented 4 years ago

Interesting, it looks like it detected the version update for both repo names earlier in the log output. But suspiciously only when the version was prefixed with v.

{
            "depType": "github",
            "depName": "github.com/some-org/terraform-aws-modules",
            "depNameShort": "some-org/terraform-aws-modules",
            "currentValue": "v0.0.7",
            "datasource": "github-tags",
            "lookupName": "some-org/terraform-aws-modules",
            "depIndex": 1,
            "updates": [
              {
                "fromVersion": "v0.0.7",
                "toVersion": "20.40.0",
                "newValue": "20.40.0",
                "newMajor": 20,
                "newMinor": 40,
                "updateType": "major",
                "isSingleVersion": true
              }
            ],
            "warnings": [],
            "fixedVersion": "v0.0.7",
            "sourceUrl": "https://github.com/some-org/terraform-aws-modules"
          },
          {
            "depType": "github",
            "depName": "github.com/some-org/aws-modules",
            "depNameShort": "some-org/aws-modules",
            "currentValue": "v0.0.1",
            "datasource": "github-tags",
            "lookupName": "some-org/aws-modules",
            "depIndex": 2,
            "updates": [
              {
                "fromVersion": "v0.0.1",
                "toVersion": "0.0.7",
                "newValue": "0.0.7",
                "newMajor": 0,
                "newMinor": 0,
                "updateType": "minor",
                "isSingleVersion": true
              },
              {
                "fromVersion": "v0.0.1",
                "toVersion": "20.40.0",
                "newValue": "20.40.0",
                "newMajor": 20,
                "newMinor": 40,
                "updateType": "major",
                "isSingleVersion": true
              }
            ],
            "warnings": [],
            "fixedVersion": "v0.0.1",
            "sourceUrl": "https://github.com/some-org/aws-modules"
          }
        ]
rarkins commented 4 years ago

Can you create a minimal public repo to reproduce this? I suspect that the unsupported-version decision is being made in the manager, so possibly we can try to change that.

viceice commented 4 years ago

I think it's because of the current version r20.2.4, which isn't valid with default versioning. Looks like you need a regex versioning for this.

Jonnymcc commented 4 years ago

We are using this config and it actually seems to be working despite what I was seeing in the logs.

{
  "extends": [
    "config:base"
  ],
  "prConcurrentLimit": "5",
  "additionalBranchPrefix": "{{baseDir}}-",
  "packageRules": [
    {
      "datasources": ["github-tags"],
      "versioning": "regex:^[vr]?(?<major>\\d+)(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))?$"
    }
  ]
}

Screen Shot 2020-10-23 at 12 31 59 PM