saltstack / saltstack/salt

[BUG] chocolatey upgrade forces install even if package is already installed and force is false

Open
#57,894 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Packaging severity-high Windows
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
When running the chocolatey upgrade module command, if a package is already installed, the package is reinstalled not skipped. I'm testing with the saltminion package. Even including the force=False still reinstalls the package.

Setup
salt 'minion' chocolatey.upgrade 'saltminion'

Steps to Reproduce the behavior

  1. run salt 'minion' chocolatey.upgrade 'saltminion'
  2. verify package is installed and upgraded with salt 'minion' test.version
  3. run salt 'minion' chocolatey.upgrade 'saltminion' again and the package is reinstalled

Expected behavior
To skip installation of the same version of the package

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
           Salt: 3000.3
 
Dependency Versions:
           cffi: Not Installed
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: 2.0.3
      gitpython: 2.1.8
         Jinja2: 2.10
        libgit2: Not Installed
       M2Crypto: Not Installed
           Mako: 1.0.7
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: Not Installed
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: Not Installed
         Python: 2.7.17 (default, Apr 15 2020, 17:20:14)
   python-gnupg: 0.4.1
         PyYAML: 3.12
          PyZMQ: 16.0.2
          smmap: 2.0.3
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.2.5
 
System Versions:
           dist: Ubuntu 18.04 bionic
         locale: UTF-8
        machine: x86_64
        release: 4.15.0-109-generic
         system: Linux
        version: Ubuntu 18.04 bionic

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the chocolatey.upgrade module entry point and reproduce the behavior with the salt 'minion' chocolatey.upgrade 'saltminion' command from the report. Compare the first and repeated upgrades, including force=False, and verify that a package at the same version is skipped rather than reinstalled.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.