You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a Task without an Execution Time Limit with execution_time_limit = False,
the ExecutionTimeLimit is set to "PT0S" as this is the way to disable it.
The returned value should be "False" or "Indefenitely".
Versions Report
salt --versions-report
from master-of-masters:
Salt Version:
Salt: 3006.4Python Version:
Python: 3.10.13 (main, Oct 4 2023, 21:54:22) [GCC 11.2.0]Dependency Versions:
cffi: 1.14.6cherrypy: unknowndateutil: 2.8.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.2libgit2: Not Installedlooseversion: 1.0.2M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.2msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 22.0pycparser: 2.21pycrypto: Not Installedpycryptodome: 3.9.8pygit2: Not Installedpython-gnupg: 0.4.8PyYAML: 6.0.1PyZMQ: 23.2.0relenv: 0.13.12smmap: Not Installedtimelib: 0.2.4Tornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: ubuntu 22.04.3 jammylocale: utf-8machine: x86_64release: 5.15.0-101-genericsystem: Linuxversion: Ubuntu 22.04.3 jammy
from minion:
Salt Version:
Salt: 3006.4Python Version:
Python: 3.10.13 (heads/main:7ee24e6, Sep 6 2023, 02:19:49) [MSC v.1936 64 bit (AMD64)]Dependency Versions:
cffi: 1.14.6cherrypy: 18.6.1dateutil: 2.8.1docker-py: Not Installedgitdb: 4.0.7gitpython: Not InstalledJinja2: 3.1.2libgit2: Not Installedlooseversion: 1.0.2M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.2msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 22.0pycparser: 2.21pycrypto: Not Installedpycryptodome: 3.10.1pygit2: Not Installedpython-gnupg: 0.4.8PyYAML: 6.0.1PyZMQ: 25.0.2relenv: 0.13.12smmap: 4.0.0timelib: 0.2.4Tornado: 4.5.3ZMQ: 4.3.4System Versions:
dist:
locale: cp1252machine: AMD64release: 2022Serversystem: Windowsversion: 2022Server 10.0.20348 SP0 Multiprocessor Free
Additional context
A simple fix would be to add an option to the duration-mapping with "PT0S", preferabley for the Key "Indefenitely".
Optimally, instead of setting False to disable and to prevent confusion, setting to Indefenitely should be set to PT0S rather than False.
The text was updated successfully, but these errors were encountered:
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!
Description
When creating a Task without an Execution Time Limit with execution_time_limit = False,
the ExecutionTimeLimit is set to "PT0S" as this is the way to disable it.
salt/salt/modules/win_task.py
Lines 1123 to 1125 in 97e9395
This value is not correctly evaluted when running task.info, as the used duration-mapping has no value for PT0S.
salt/salt/modules/win_task.py
Lines 95 to 117 in 97e9395
Since the function "_reverse_lookup" sets value_index = -1 from the getgo, task.info will always return "365 days" in this case.
salt/salt/modules/win_task.py
Lines 235 to 256 in 97e9395
Steps to Reproduce the behavior
Run following state against a Windows-minion.
Run following command if state was successful:
Expected behavior
The returned value should be "False" or "Indefenitely".
Versions Report
salt --versions-report
from master-of-masters:
from minion:
Additional context
A simple fix would be to add an option to the duration-mapping with "PT0S", preferabley for the Key "Indefenitely".
Optimally, instead of setting False to disable and to prevent confusion, setting to Indefenitely should be set to PT0S rather than False.
The text was updated successfully, but these errors were encountered: