Repository navigation
Conversation
|
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.
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. |
| mods.append(contextvars) | ||
| if has_immutables: | ||
| mods.append(immutables) | ||
| mods.append(typing_extensions) |
There was a problem hiding this comment.
I did some testing and I can only replicate the issue when my master and the target are python 3.6. If master is 3.8 and target is 3.6 it works. Can we add some logic here that only adds the typing_extensions if the master is running < python 3.8.
|
@lastmikoi are you able to loop back to this PR with the feedback I previously submitted? |
|
bump @lastmikoi did you see my feedback? |
|
Hi @Ch3LL ! I have seen your feedback, I've been trying to find time to work on it as I remembered I could reproduce the issue on my 3.6 salt-master, but I haven't found the time to take care of it just yet. I'll get you updated ! |
|
@Ch3LL I have been able to reproduce the issue on a clean(-ish) Python3.9 master virtualenv with Salt 3005 against a freshly installed CentOS7 target. `salt-ssh test.ping` Traceback`salt-ssh --versions-report`Salt Version:
Salt: 3005
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 3.1.2
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 1.0.4
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: 3.15.0
pygit2: Not Installed
Python: 3.9.12 (main, May 15 2022, 19:24:24)
python-gnupg: Not Installed
PyYAML: 6.0
PyZMQ: 20.0.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.3
System Versions:
dist: arch
locale: utf-8
machine: x86_64
release: 5.18.15-arch1-1
system: Linux
version: Arch LinuxBy applying my patch, installing typing_extensions<4.2.0, and rebuilding the thin with This seems harder to reproduce outside of my environment than I anticipated, so I'm available for further testing until we figure out this thing. |
|
And what python version is your target? python 3.6? in 3006 we will only be supporting python >=3.7. Does this also show up when the target version python is 3.7. I'm assuming it does, but if you are willing to confirm I would appreciate it. |
|
Spent an hour or so getting a py37 working on my CentOS7 environment to make sure I could test it. The issue does not impact py37 targets, as the I understand the need to move past py36 for future releases of SaltStack, but I will have to manage py36 hosts for at least a year and a half (EL 7 EOL), so I would still consider applying my patch if only for 3005, which I would pin my EL7 minions to. |
|
I wonder if this would work for your use case: https://docs.saltproject.io/en/latest/topics/ssh/ssh_ext_alternatives.html#ssh-ext-alternatives Also, another thought is to make this configurable instead of adding typing_extensions. So in the future a user could easily add a library to the tarball. |
saltstack#59942 saltstack#62234 confirmed working from my mac to both deb10 (snuba-transactions-tiger) and deb11 (access-logs) targets
|
Closing this due to inactivity. Anyone should feel free to re-open it if they want to see it through to the end in one release cycle. |
What does this PR do?
When one uses
salt-ssh3003+ on python3.6-running targets (who are numerous, see RHEL, CentOS, RockyLinux, etc..., as OS vendors are supporting python3.6 and fixing security issues themselves even if upstream py36 is End Of Life), salt-ssh will include a backport of python3.7'scontextvarsmodule in the salt thin tarball.However, the
contextvarsbackport makes uses of theimmutablesmodule.This module went through a typing refactor (see MagicStack/immutables#62) which landed in its v0.16 release on August 2021.
However, that typing refactor added a new dependency,
typing_extensions, but only on pre-3.8 deployments (see https://github.com/MagicStack/immutables/blob/master/immutables/_protocols.py#L13).This third-order dependency (!) is nowhere to be found on the salt ssh thin tarball, which leads to several issues (#59942) as that import error triggers a cascade of exceptions.
This PR aims to fix that issue by adding
typing_extensionsto the thin tarball.Note: First-time Salt contributor here, don't hesistate to walk me through stuff if you think I missed something in my reading of the Contributor's Guide !
What issues does this PR fix or reference?
Fixes: #59942
New Behavior
salt-ssh will add
typing_extensionsto the thin tarball in the cases whereimmutablesis imported (i.e. target is running python 3.6)Merge requirements satisfied?
Commits signed with GPG?
Yes