[BUG] getfullargspec and annotations #61981
Labels
Bug
broken, incorrect, or confusing behavior
Core
relates to code central or existential to Salt
severity-low
4th level, cosemtic problems, work around exists
Milestone
Description
I think this issue is very similar to #48735 - in some cases, salt throws this annoying error:
Setup
I have tried to create a custom state, and used this function signature:
The problem seems to be that the function is partially annotated. If I remove all annotations, like this:
Then it works.
Steps to Reproduce the behavior
Install the 3004.1 and try to create a custom state under file_root/_states/test.py with the above signature, and then try to apply that state on a minion.
Full debug log when calling state.apply:
Expected behavior
It should not throw errors for annotated functions.
Versions Report
Salt Version:
Salt: 3004.1
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: 2.7.3
docker-py: Not Installed
gitdb: 2.0.6
gitpython: 3.0.7
Jinja2: 2.10.1
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack: 0.6.2
msgpack-pure: Not Installed
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: Not Installed
pycryptodome: 3.6.1
pygit2: Not Installed
Python: 3.8.10 (default, Mar 15 2022, 12:22:08)
python-gnupg: 0.4.5
PyYAML: 5.3.1
PyZMQ: 18.1.1
smmap: 2.0.5
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.2
System Versions:
dist: ubuntu 20.04 focal
locale: utf-8
machine: x86_64
release: 5.4.0-107-generic
system: Linux
version: Ubuntu 20.04 focal
All masters and minions have the same versions.
The text was updated successfully, but these errors were encountered: