Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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).

pyenv just has reset tag v2.4.5 to a different commit and now the installation of this role fails on previously existing environments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant