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

[BUG] [3006.0] Windows winrepo fails to install git #63935

Closed
2 of 9 tasks
dafyddj opened this issue Mar 23, 2023 · 1 comment · Fixed by #63949
Closed
2 of 9 tasks

[BUG] [3006.0] Windows winrepo fails to install git #63935

dafyddj opened this issue Mar 23, 2023 · 1 comment · Fixed by #63949
Assignees
Labels
Bug broken, incorrect, or confusing behavior Execution-Module Sulfur v3006.0 release code name and version

Comments

@dafyddj
Copy link
Contributor

dafyddj commented Mar 23, 2023

Description
While testing Salt 3006.0rc2 trying pkg.install git results in a traceback and the message:
packaging.version.InvalidVersion: Invalid version: '2.23.0.windows.1'

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.

  • 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
  • onedir packaging
  • used bootstrap to install

Steps to Reproduce the behavior
(Include debug logs if possible and relevant)

salt-call pkg.refresh_db
salt-call pkg.install git version=latest
[ERROR   ] An un-handled exception was caught by Salt's global exception handler:
InvalidVersion: Invalid version: '2.23.0.windows.1'
Traceback (most recent call last):
  File "C:\Program Files\Salt Project\Salt\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Salt Project\Salt\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Program Files\Salt Project\Salt\salt-call.exe\__main__.py", line 7, in <module>
    sys.exit(salt_call())
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\scripts.py", line 444, in salt_call
    client.run()
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\cli\call.py", line 50, in run
    caller.run()
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\cli\caller.py", line 95, in run
    ret = self.call()
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\cli\caller.py", line 202, in call
    ret["return"] = self.minion.executors[fname](
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 149, in __call__
    return self.loader.run(run_func, *args, **kwargs)
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 1232, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 1247, in _run_as
    return _func_or_method(*args, **kwargs)
  File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\executors\direct_call.py", line 10, in execute
    return func(*args, **kwargs)
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 149, in __call__
    return self.loader.run(run_func, *args, **kwargs)
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 1232, in run
    return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\salt\loader\lazy.py", line 1247, in _run_as
    return _func_or_method(*args, **kwargs)
  File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\modules\win_pkg.py", line 1587, in install
    version_num = _get_latest_pkg_version(pkginfo)
  File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\modules\win_pkg.py", line 2374, in _get_latest_
sion
    return sorted(pkginfo, key=cmp_to_key(_reverse_cmp_pkg_versions)).pop()
  File "C:\Program Files\Salt Project\Salt\Lib\site-packages\salt\modules\win_pkg.py", line 2362, in _reverse_cmp
rsions
    return 1 if Version(pkg1) > Version(pkg2) else -1
  File "C:\Program Files\Salt Project\Salt\lib\site-packages\packaging\version.py", line 197, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '2.23.0.windows.1'

Expected behavior
Git software should be installed without error.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

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

Python Version:
        Python: 3.10.10 (heads/main:d6bb317, Feb 23 2023, 05:28:58) [MSC v.1934 64 bit (AMD64)]

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: 4.0.7
     gitpython: 3.1.30
        Jinja2: 3.1.2
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: 1.2.2
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.10.1
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 5.4.1
         PyZMQ: Not Installed
        relenv: 0.7.0
         smmap: 4.0.0
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: Not Installed

System Versions:
          dist:
        locale: cp1252
       machine: AMD64
       release: 8.1
        system: Windows
       version: 8.1 6.3.9600 SP0 Multiprocessor Free

Additional context
Add any other context about the problem here.

Could be related to changes in #63383

@dafyddj dafyddj added Bug broken, incorrect, or confusing behavior needs-triage labels Mar 23, 2023
@twangboy twangboy self-assigned this Mar 23, 2023
@twangboy twangboy added this to the Sulfur v3006.0 milestone Mar 23, 2023
@twangboy twangboy added Execution-Module Sulfur v3006.0 release code name and version and removed needs-triage labels Mar 23, 2023
@twangboy twangboy linked a pull request Mar 27, 2023 that will close this issue
3 tasks
@garethgreenaway
Copy link
Contributor

Closed by #63949

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Execution-Module Sulfur v3006.0 release code name and version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants