cfn-lint icon indicating copy to clipboard operation
cfn-lint copied to clipboard

pre-commit updates to 1.2.5.a8 instead of 0.87.1

Open whoDoneItAgain opened this issue 9 months ago • 7 comments

CloudFormation Lint Version

0.86.4

What operating system are you using?

windows

Describe the bug

updating the pre-commit configuration for cfn-lint via pre-commit autoupdate go to the v1.2.5a8 instead of the current version of v0.87.1

Expected behavior

updates to (as of today) v0.87.1

Reproduction template

n/a

whoDoneItAgain avatar May 06 '24 14:05 whoDoneItAgain

same thing is happening even with the new v0.87.2 release. Only thing i can see different between 1.2.5a8 and the other alphas is it's tag doesnt have the precedding 'v'.

its version 1.2.5.a8 unlike the others v1.2.5.a7 or v0.87.2

whoDoneItAgain avatar May 10 '24 02:05 whoDoneItAgain

Can you show me the cfn-lint pre-commit? I can't replicate this issue with the following configuration.

repos:
  - repo: https://github.com/aws-cloudformation/cfn-lint
    rev: v0.87.1 # The version of cfn-lint to use
    hooks:
      - id: cfn-lint
        files: templates/.*\.(json|yml|yaml)$

kddejong avatar May 10 '24 16:05 kddejong

I got it autoupdate is doing it... looking into it.

kddejong avatar May 10 '24 16:05 kddejong

pre-commit autoupdate works by picking the latest revision on the main branch. Unfortunately as we migrate to v1 this has adjusted. While the v0 branch is still there we can't tell pre-commit to switch the branch to pull the latest tag for.

kddejong avatar May 10 '24 16:05 kddejong

Poetry explains this the best https://python-poetry.org/docs/main/pre-commit-hooks/#why-does-pre-commit-autoupdate-not-update-to-the-latest-version

kddejong avatar May 10 '24 16:05 kddejong

that makes sense and understand that it pulls the latest. Did something change with the v1 alpha 8 release? I have gitflow workflow action that runs every 2 hours or so to run pre-commit autoupdate and open a PR for me. Up until, alpha 8's release, the action always used the latest, non pre-release tag. whatever release showed in the release widget of the repo image

whoDoneItAgain avatar May 10 '24 17:05 whoDoneItAgain

I see what you're saying now. I didn't see that you moved the old v1 branch to main and moved the old main branch to v0 branch.

whoDoneItAgain avatar May 17 '24 00:05 whoDoneItAgain

We have released v1 so now this will pull the most recent version.

kddejong avatar Jun 19 '24 16:06 kddejong