Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Update Pre-commit hooks and enforce git fetch to be successful #274

Merged
merged 2 commits into from
Mar 30, 2025

Conversation

SirUli
Copy link

@SirUli SirUli commented Jul 3, 2024

I stumbled across the following error while running on our CI:

TASK [staticdev.pyenv : Install PyEnv] *****************************************
fatal: [sape.sap.example.com]: FAILED! => {"changed": false, "cmd": ["/usr/bin/git", "fetch", "--tags", "origin"], "msg": "Failed to download remote objects and refs:  From https://github.com/pyenv/pyenv\n   e8e8cfdd..38436116  master     -> origin/master\n * [new tag]           r          -> r\n ! [rejected]          v2.4.5     -> v2.4.5  (would clobber existing tag)\n"}

The reason is that the git module of ansible doesn't enforce the fetch on the one hand. On the other hand, pyenv changed the tag to a different commit and hence caused the trouble initially.

While reviewing the repository i found that pre-commit wasn't updated for a while and did that through pre-commit autoupdate. This updated a number of hooks in the repository. And these then led to new findings (mainly led by ansible-lint being updated).

SirUli added 2 commits July 3, 2024 10:04
pyenv just has reset tag v2.4.5 to a different commit and now the installation of this role fails on previously existing environments.
@staticdev
Copy link
Owner

Thanks @SirUli, LGTM.

@staticdev staticdev merged commit 17a5515 into staticdev:main Mar 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants