diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7412360..4c836b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,11 +8,8 @@ jobs: strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.8, 3.9] os: [ubuntu-latest] - include: - - python-version: 3.6 - os: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/jens/git_wrapper.py b/jens/git_wrapper.py index 833e04d..8b248e1 100644 --- a/jens/git_wrapper.py +++ b/jens/git_wrapper.py @@ -61,6 +61,14 @@ def fetch(repository_path, prune=False): def fetch_exec(*args, **kwargs): repo = git.Repo(repository_path, odbt=git.GitCmdObjectDB) repo.remotes.origin.fetch(*args, **kwargs) + # You may face that the repo object leaves lock files behind after fetch, so we need to + # clean them up with a forced object delete + # Ref: https://github.com/gitpython-developers/GitPython/issues/718#issuecomment-360267779 + # We suspect this is due to git cat-file calls in fetch implementation together with + # using GitCmdObjectDB as the object database + # Ref: https://gitpython.readthedocs.io/en/stable/tutorial.html#gitcmdobjectdb + # Using GitDB seems to fix the issue but we keep using GitCmdObjectDB for consistency + repo.__del__() fetch_exec(name='fetch', args=args, kwargs=kwargs) diff --git a/puppet-jens.spec b/puppet-jens.spec index 1029265..4ff3c6c 100644 --- a/puppet-jens.spec +++ b/puppet-jens.spec @@ -1,7 +1,7 @@ Summary: Jens is a Puppet modules/hostgroups librarian Name: puppet-jens Version: 1.4.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 Group: Applications/System @@ -82,6 +82,9 @@ export GIT_COMMITTER_NAME="RPM build" %{_unitdir}/jens-purge-queue.service %changelog +* Tue Nov 18 2025 Daniel Juarez - 1.4.1-3 +- Fix race condition leaving lock files behind after git fetch operations. + * Wed Jun 28 2023 Nacho Barrientos - 1.4.1-2 - Rebuild for RHEL9.