saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.14k stars 5.47k forks source link

[TECH DEBT] Yumpkg's setopt uses irregular separator #66970

Open ben-grande opened 3 hours ago

ben-grande commented 3 hours ago

Description of the tech debt to be addressed, include links and screenshots

Setopt was added to yumpkg in https://github.com/saltstack/salt/pull/46263/commits/17e454bf04a24e97afb29bbe2b8a43445e63b038, using space as separator, diverging from the already existing options that used equal sign as separator.

Later, yumpkg's option were reformatted to use f-string and logging was added, but that was not done to setopt https://github.com/saltstack/salt/commit/5069c1f9165e0c03c1a24f3e9ee4795b151bea8f#diff-f5522aab89c593a60a281d5d2951909c938e653205f99f9d651399421f94eb0f.

Using space separator is the biggest problem here, it let's the OS choose how to handle the separation of strings, which can produce a malformed command line on some systems.

Versions Report

No master, minion version is the same:

Salt Version:
          Salt: 3006.9

Python Version:
        Python: 3.11.6 (main, Oct  3 2023, 00:00:00) [GCC 12.3.1 20230508 (Red Hat 12.3.1-1)]

Dependency Versions:
          cffi: 1.15.1
      cherrypy: Not Installed
  cryptography: Not Installed
      dateutil: 2.8.2
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.0.3
       libgit2: 1.3.1
  looseversion: 1.2.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.4
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 21.3
     pycparser: 2.20
      pycrypto: Not Installed
  pycryptodome: 3.19.0
        pygit2: 1.7.1
  python-gnupg: Not Installed
        PyYAML: 6.0
         PyZMQ: 23.2.0
        relenv: Not Installed
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: qubes 4.2.3 R4.2
        locale: utf-8
       machine: x86_64
       release: 6.6.48-1.qubes.fc37.x86_64
        system: Linux
       version: Qubes OS 4.2.3 R4.2
welcome[bot] commented 3 hours ago

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey. Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar. If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!