ansible-collections / servicenow.itsm

Ansible Collection for ServiceNow ITSM
GNU General Public License v3.0
88 stars 78 forks source link

Integration tests consistently failing in itsm_api test on certain python versions with ansible-core `milestone` release #393

Closed mhjacks closed 1 month ago

mhjacks commented 1 month ago
SUMMARY

This failure is occurring regularly in Github actions:

WARNING: Unable to determine context for the following test targets, they will be run on the target host: itsm_api
Running itsm_api integration test role

PLAY [testhost] ****************************************************************

TASK [Gathering Facts] *********************************************************
ok: [testhost]

TASK [itsm_api : create user (object with encrypted fields)] *******************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: not enough arguments for format string
fatal: [testhost]: FAILED! => {"msg": "Unexpected failure during module execution: not enough arguments for format string", "stdout": ""}

PLAY RECAP *********************************************************************
testhost                   : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

NOTICE: To resume at this test target, use the option: --start-at itsm_api
FATAL: Command "ansible-playbook itsm_api-p3urkz4l.yml -i inventory" returned exit status 2.

For example: https://github.com/ansible-collections/servicenow.itsm/actions/runs/10269122915/job/28413853329

The string in question is not meant to be interpreted as a format string. It is a password that happens to contain a % character.

ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
Warning: : You are running the development version of Ansible. You should only
run Ansible from "devel" if you are modifying the Ansible engine, or trying out
features under development. This is a rapidly changing source of code and can
become unstable at any point.
ansible [core 2.18.0.dev0]
  config file = None
  configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/ansible
  ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/hostedtoolcache/Python/3.12.4/x64/bin/ansible
  python version = 3.12.4 (main, Jul [15](https://github.com/ansible-collections/servicenow.itsm/actions/runs/10269122915/job/28413854952#step:8:16) 2024, 21:50:45) [GCC 11.4.0] (/opt/hostedtoolcache/Python/3.12.4/x64/bin/python3)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
2.6.1

This symptom appears to match an issue that was corrected in June in ansible-core devel: https://github.com/ansible/ansible/issues/83498

mhjacks commented 1 month ago

Ansible-core has updated their milestone artifact, which includes the fix, as evidenced by this action run: https://github.com/ansible-collections/servicenow.itsm/actions/runs/10292572556/job/28487264019?pr=388