salt icon indicating copy to clipboard operation
salt copied to clipboard

[BUG] states from gitfs fail with AttributeError: '_pygit2.Blob' object has no attribute 'oid' with pygit2 1.15.0

Open denschub opened this issue 1 year ago • 3 comments

Description Using pygit2, the salt-master has trouble reading the gitfs repo used for the states. There's an exception:

salt-master[23426]: [ERROR   ] Error in function _file_hash:
salt-master[23426]: Traceback (most recent call last):
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/master.py", line 2087, in run_func
salt-master[23426]:     ret = getattr(self, func)(load)
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 658, in file_hash
salt-master[23426]:     return self.__file_hash_and_stat(load)[0]
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 642, in __file_hash>
salt-master[23426]:     fnd = self.find_file(
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 600, in find_file
salt-master[23426]:     fnd = self.servers[fstr](path, saltenv, **kwargs)
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 160, in __call__
salt-master[23426]:     ret = self.loader.run(run_func, *args, **kwargs)
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1233, in run
salt-master[23426]:     return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1248, in _run_as
salt-master[23426]:     return _func_or_method(*args, **kwargs)
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/fileserver/gitfs.py", line 161, in find_file
salt-master[23426]:     return _gitfs().find_file(path, tgt_env=tgt_env, **kwargs)
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 3110, in find_file
salt-master[23426]:     blob, blob_hexsha, blob_mode = repo.find_file(repo_path, tgt_env)
salt-master[23426]:   File "/opt/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 2134, in find_file
salt-master[23426]:     blob = self.repo[entry.oid]
salt-master[23426]: AttributeError: '_pygit2.Blob' object has no attribute 'oid'

Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)

Please be as specific as possible and give set-up details.

  • [x] on-prem machine
  • [ ] VM (Virtualbox, KVM, etc. please specify)
  • [ ] VM running on a cloud service, please be explicit and add details
  • [ ] container (Kubernetes, Docker, containerd, etc. please specify)
  • [ ] or a combination, please be explicit
  • [ ] jails if it is FreeBSD
  • [ ] classic packaging
  • [x] onedir packaging
  • [ ] used bootstrap to install

Steps to Reproduce the behavior The relevant salt master config is just a

gitfs_remotes:
  - ssh://[email protected]/ops/salt-states.git

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3007.0

Python Version:
        Python: 3.10.14 (main, Apr  3 2024, 21:30:09) [GCC 11.2.0]

Dependency Versions:
          cffi: 1.16.0
      cherrypy: unknown
      dateutil: 2.9.0.post0
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.4
       libgit2: 1.8.1
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.8
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 2.22
      pycrypto: Not Installed
  pycryptodome: 3.20.0
        pygit2: 1.15.0
  python-gnupg: 0.5.2
        PyYAML: 6.0.1
         PyZMQ: 26.0.3
        relenv: 0.16.0
         smmap: Not Installed
       timelib: 0.3.0
       Tornado: 6.4
           ZMQ: 4.3.5

Salt Package Information:
  Package Type: Not Installed

System Versions:
          dist: arch
        locale: utf-8
       machine: x86_64
       release: 6.9.1-arch1-2
        system: Linux
       version: Arch Linu

Additional context Add any other context about the problem here.

denschub avatar May 24 '24 00:05 denschub

Ah, pygit2 1.15.0 is too new. 1.13.1 works. Oh well.

denschub avatar May 24 '24 00:05 denschub

This shouldn't be closed. Salt needs to update to support the new version.

OrangeDog avatar May 24 '24 09:05 OrangeDog

I mean, this project has a history of "we don't care about anything except the versions we tested with", but sure, let's reopen.

denschub avatar May 24 '24 11:05 denschub

1.14.1 also works. I'm just installing with salt-pip install pygit2!=1.15.0

hackery avatar Jul 05 '24 14:07 hackery

oid was deprecated 11 years ago - probably safe to update salt's usage by now.

hackery avatar Jul 05 '24 14:07 hackery

/opt/saltstack/salt# tail /var/log/syslog -n 100 -f
Jul 24 07:21:27 salt salt-master[38897]: Traceback (most recent call last):
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 2089, in run_func
Jul 24 07:21:27 salt salt-master[38897]:     ret = getattr(self, func)(load)
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/decorators/__init__.py", line 863, in wrapped
Jul 24 07:21:27 salt salt-master[38897]:     return function(*args, **kwargs)
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 769, in file_list
Jul 24 07:21:27 salt salt-master[38897]:     ret.update(self.servers[fstr](load))
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 160, in __call__
Jul 24 07:21:27 salt salt-master[38897]:     ret = self.loader.run(run_func, *args, **kwargs)
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1269, in run
Jul 24 07:21:27 salt salt-master[38897]:     return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1284, in _run_as
Jul 24 07:21:27 salt salt-master[38897]:     return _func_or_method(*args, **kwargs)
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/gitfs.py", line 190, in file_list
Jul 24 07:21:27 salt salt-master[38897]:     return _gitfs().file_list(load)
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 3346, in file_list
Jul 24 07:21:27 salt salt-master[38897]:     return self._file_lists(load, "files")
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 3317, in _file_lists
Jul 24 07:21:27 salt salt-master[38897]:     repo_files, repo_symlinks = repo.file_list(load["saltenv"])
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 2134, in file_list
Jul 24 07:21:27 salt salt-master[38897]:     _traverse(tree, blobs, self.root(tgt_env))
Jul 24 07:21:27 salt salt-master[38897]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 2088, in _traverse
Jul 24 07:21:27 salt salt-master[38897]:     if entry.oid not in self.repo:
Jul 24 07:21:27 salt salt-master[38897]: AttributeError: '_pygit2.Tree' object has no attribute 'oid'
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] The functions from module 'roots' are being loaded by dir() on the loaded module
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] LazyLoaded roots.envs
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] pygit2 gitfs_provider enabled
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] Created gitfs object with uninitialized remotes
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] The functions from module 'gitfs' are being loaded by dir() on the loaded module
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] LazyLoaded gitfs.envs
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] Current fetch URL for gitfs remote 'https://github.com/DataDog/datadog-formula.git': https://github.com/DataDog/datadog-formula.git (desired: https://github.com/DataDog/datadog-formula.git)
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] Current refspecs for gitfs remote 'https://github.com/DataDog/datadog-formula.git': ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'] (desired: ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'])
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] Current http.sslVerify for gitfs remote 'https://github.com/DataDog/datadog-formula.git': true (desired: true)
Jul 24 07:21:27 salt salt-master[38888]: [WARNING ] The 'base' environment has been defined in the 'saltenv' param for gitfs remote https://github.com/DataDog/datadog-formula.git and will override the branch/tag specified by gitfs_base (or a per-remote 'base' parameter).
Jul 24 07:21:27 salt salt-master[38888]: [DEBUG   ] Created gitfs object for process 38888
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] The functions from module 'roots' are being loaded by dir() on the loaded module
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] LazyLoaded roots.envs
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] pygit2 gitfs_provider enabled
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] Created gitfs object with uninitialized remotes
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] The functions from module 'gitfs' are being loaded by dir() on the loaded module
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] LazyLoaded gitfs.envs
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] Current fetch URL for gitfs remote 'https://github.com/DataDog/datadog-formula.git': https://github.com/DataDog/datadog-formula.git (desired: https://github.com/DataDog/datadog-formula.git)
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] Current refspecs for gitfs remote 'https://github.com/DataDog/datadog-formula.git': ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'] (desired: ['+refs/heads/*:refs/remotes/origin/*', '+refs/tags/*:refs/tags/*'])
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] Current http.sslVerify for gitfs remote 'https://github.com/DataDog/datadog-formula.git': true (desired: true)
Jul 24 07:21:27 salt salt-master[38896]: [WARNING ] The 'base' environment has been defined in the 'saltenv' param for gitfs remote https://github.com/DataDog/datadog-formula.git and will override the branch/tag specified by gitfs_base (or a per-remote 'base' parameter).
Jul 24 07:21:27 salt salt-master[38896]: [DEBUG   ] Created gitfs object for process 38896
Jul 24 07:21:27 salt salt-master[38887]: [DEBUG   ] Re-using gitfs object for process 38887
Jul 24 07:21:27 salt salt-master[38887]: [ERROR   ] Error in function _file_hash:
Jul 24 07:21:27 salt salt-master[38887]: Traceback (most recent call last):
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 2089, in run_func
Jul 24 07:21:27 salt salt-master[38887]:     ret = getattr(self, func)(load)
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 657, in file_hash
Jul 24 07:21:27 salt salt-master[38887]:     return self.__file_hash_and_stat(load)[0]
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 641, in __file_hash_and_stat
Jul 24 07:21:27 salt salt-master[38887]:     fnd = self.find_file(
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 599, in find_file
Jul 24 07:21:27 salt salt-master[38887]:     fnd = self.servers[fstr](path, saltenv, **kwargs)
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 160, in __call__
Jul 24 07:21:27 salt salt-master[38887]:     ret = self.loader.run(run_func, *args, **kwargs)
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1269, in run
Jul 24 07:21:27 salt salt-master[38887]:     return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1284, in _run_as
Jul 24 07:21:27 salt salt-master[38887]:     return _func_or_method(*args, **kwargs)
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/gitfs.py", line 160, in find_file
Jul 24 07:21:27 salt salt-master[38887]:     return _gitfs().find_file(path, tgt_env=tgt_env, **kwargs)
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 3157, in find_file
Jul 24 07:21:27 salt salt-master[38887]:     blob, blob_hexsha, blob_mode = repo.find_file(repo_path, tgt_env)
Jul 24 07:21:27 salt salt-master[38887]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 2176, in find_file
Jul 24 07:21:27 salt salt-master[38887]:     blob = self.repo[entry.oid]
Jul 24 07:21:27 salt salt-master[38887]: AttributeError: '_pygit2.Blob' object has no attribute 'oid'
Jul 24 07:21:27 salt salt-master[38895]: [DEBUG   ] Re-using gitfs object for process 38895
Jul 24 07:21:27 salt salt-master[38895]: [ERROR   ] Error in function _file_find:
Jul 24 07:21:27 salt salt-master[38895]: Traceback (most recent call last):
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 2089, in run_func
Jul 24 07:21:27 salt salt-master[38895]:     ret = getattr(self, func)(load)
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 547, in _find_file
Jul 24 07:21:27 salt salt-master[38895]:     return self.find_file(path, tgt_env)
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/__init__.py", line 599, in find_file
Jul 24 07:21:27 salt salt-master[38895]:     fnd = self.servers[fstr](path, saltenv, **kwargs)
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 160, in __call__
Jul 24 07:21:27 salt salt-master[38895]:     ret = self.loader.run(run_func, *args, **kwargs)
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1269, in run
Jul 24 07:21:27 salt salt-master[38895]:     return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1284, in _run_as
Jul 24 07:21:27 salt salt-master[38895]:     return _func_or_method(*args, **kwargs)
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/fileserver/gitfs.py", line 160, in find_file
Jul 24 07:21:27 salt salt-master[38895]:     return _gitfs().find_file(path, tgt_env=tgt_env, **kwargs)
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 3157, in find_file
Jul 24 07:21:27 salt salt-master[38895]:     blob, blob_hexsha, blob_mode = repo.find_file(repo_path, tgt_env)
Jul 24 07:21:27 salt salt-master[38895]:   File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/gitfs.py", line 2176, in find_file
Jul 24 07:21:27 salt salt-master[38895]:     blob = self.repo[entry.oid]
Jul 24 07:21:27 salt salt-master[38895]: AttributeError: '_pygit2.Blob' object has no attribute 'oid'
Jul 24 07:21:27 salt salt-master[38897]: [DEBUG   ] The functions from module 'local_cache' are being loaded by dir() on the loaded module
Jul 24 07:21:27 salt salt-master[38897]: [DEBUG   ] LazyLoaded local_cache.prep_jid
Jul 24 07:21:27 salt salt-master[38897]: [INFO    ] Got return from salt.sandbox for job 20240724072124318370
Jul 24 07:21:27 salt salt-master[38897]: [DEBUG   ] Using selector: EpollSelector
Jul 24 07:21:27 salt salt-master[38897]: [DEBUG   ] Using selector: EpollSelector
Jul 24 07:21:27 salt salt-master[38897]: [DEBUG   ] Publisher connecting to /var/run/salt/master/master_event_pull.ipc
Jul 24 07:21:27 salt salt-master[38897]: [DEBUG   ] Reading minion list from /var/cache/salt/master/jobs/37/6fd3adbbb72abb2aacac6cbf4039c807c6523e30642bce8747996e398b4830/.minions.p
Jul 24 07:21:27 salt salt-master[38878]: [DEBUG   ] tcp stream to  closed, unable to recv
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] Performing fileserver updates for items with an update interval of 60
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] Updating roots fileserver cache
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] Updating gitfs fileserver cache for the following targets: [('https://github.com/DataDog/datadog-formula.git', None)]
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] Re-using gitfs object for process 38884
Jul 24 07:22:09 salt salt-master[38884]: [INFO    ] Wrote new gitfs remote map to /var/cache/salt/master/gitfs/remote_map.txt
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] Set update lock for gitfs remote 'https://github.com/DataDog/datadog-formula.git'
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] Fetching gitfs remote 'https://github.com/DataDog/datadog-formula.git'
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] gitfs remote 'https://github.com/DataDog/datadog-formula.git' is up-to-date
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] Removed update lock for gitfs remote 'https://github.com/DataDog/datadog-formula.git'
Jul 24 07:22:09 salt salt-master[38884]: [DEBUG   ] Completed fileserver updates for items with an update interval of 60, waiting 60 seconds
Jul 24 07:22:11 salt salt-master[38882]: [DEBUG   ] This salt-master instance has accepted 1 minion keys.

jamest-pin avatar Jul 24 '24 07:07 jamest-pin

So it turns out you can install 1.14.1 and it works. But, you need to refer to the salt pip binary directly, salt-pip won't work for this and appears to be broken.

salt@salt:/srv$ /opt/saltstack/salt/bin/pip3 list | grep pygit
salt@salt:/srv$ /opt/saltstack/salt/bin/pip3 install pygit2==1.14.1
Collecting pygit2==1.14.1
  Using cached pygit2-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.4 kB)
Collecting cffi>=1.16.0 (from pygit2==1.14.1)
  Using cached cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Requirement already satisfied: pycparser in /opt/saltstack/salt/lib/python3.10/site-packages (from cffi>=1.16.0->pygit2==1.14.1) (2.21)
Using cached pygit2-1.14.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB)
Using cached cffi-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443 kB)
Installing collected packages: cffi, pygit2
  Do not adjust rpath of /opt/saltstack/salt/lib/python3.10/site-packages/_cffi_backend.cpython-310-x86_64-linux-gnu.so
  Do not adjust rpath of /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libcrypto-e196e492.so.3
  WARNING: Unable to find library libssl-107481d2.so.3 linked from /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libgit2-6834971d.so.1.7.2
  WARNING: Unable to find library libcrypto-e196e492.so.3 linked from /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libgit2-6834971d.so.1.7.2
  WARNING: Unable to find library libpcre-9513aab5.so.1.2.0 linked from /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libgit2-6834971d.so.1.7.2
  WARNING: Unable to find library libssh2-c5cb4cb9.so.1.0.1 linked from /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libgit2-6834971d.so.1.7.2
  Do not adjust rpath of /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libgit2-6834971d.so.1.7.2
  Do not adjust rpath of /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libpcre-9513aab5.so.1.2.0
  WARNING: Unable to find library libssl-107481d2.so.3 linked from /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libssh2-c5cb4cb9.so.1.0.1
  WARNING: Unable to find library libcrypto-e196e492.so.3 linked from /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libssh2-c5cb4cb9.so.1.0.1
  Do not adjust rpath of /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libssh2-c5cb4cb9.so.1.0.1
  WARNING: Unable to find library libcrypto-e196e492.so.3 linked from /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libssl-107481d2.so.3
  Do not adjust rpath of /opt/saltstack/salt/lib/python3.10/site-packages/pygit2.libs/libssl-107481d2.so.3
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libgit2-6834971d.so.1.7.2
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libssl-107481d2.so.3
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libcrypto-e196e492.so.3
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libpcre-9513aab5.so.1.2.0
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libssh2-c5cb4cb9.so.1.0.1
  Adjust rpath of /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/_libgit2.abi3.so to $ORIGIN/../../..
  Set RPATH=$ORIGIN/../../..:$ORIGIN/../pygit2.libs /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/_libgit2.abi3.so
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libgit2-6834971d.so.1.7.2
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libssl-107481d2.so.3
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libcrypto-e196e492.so.3
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libpcre-9513aab5.so.1.2.0
  File already within root directory: /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/../pygit2.libs/libssh2-c5cb4cb9.so.1.0.1
  Adjust rpath of /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/_pygit2.cpython-310-x86_64-linux-gnu.so to $ORIGIN/../../..
  Set RPATH=$ORIGIN/../../..:$ORIGIN/../pygit2.libs /opt/saltstack/salt/lib/python3.10/site-packages/pygit2/_pygit2.cpython-310-x86_64-linux-gnu.so
Successfully installed cffi-1.16.0 pygit2-1.14.1
salt@salt:/srv$ salt-pip list | grep pygit
pygit2             1.14.1

jamest-pin avatar Jul 24 '24 09:07 jamest-pin

Looks like need to convert to using 'id' instead of 'oid' in salt/utils/gitfs.py. Current CI/CD is with pygit2 v1.13.1, will look at updating the version, but 1.15.1 (2024-07-07), and oid was removed in 1.15.0 (2024-05-18)

Remove deprecated object.oid, use object.id

dmurphy18 avatar Jul 24 '24 15:07 dmurphy18

Closing since https://github.com/saltstack/salt/pull/66743 is merged

dmurphy18 avatar Jul 26 '24 19:07 dmurphy18

Is this going to be merged to 3007.x as well? (for that matter, when is the next LTS point release expected from 3006.x? I imagine we have one or two before it goes out of active support in October.)

hackery avatar Jul 27 '24 22:07 hackery

@hackery The next LTS release is very very soon, and will be 3006.9. And yes, this will be merged forward into the 3007.x and master branches soon, once 3006.9 is out the door.

dmurphy18 avatar Jul 29 '24 16:07 dmurphy18

In 3006.9 we get a slightly different error: #67017

OrangeDog avatar Oct 30 '24 14:10 OrangeDog