-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
Please confirm the following
- I agree to follow this project's code of conduct.
- I have checked the current issues for duplicates.
- I understand that AWX is open source software provided for free and that I might not receive a timely response.
Summary
Sometimes the job's artifacts field of a job is not getting populated with data from set_stats from within a playbook.
The playbook content I'm using to test this comes from ansible/test-playbooks#153
After running that and confirming the job is fully finished, I find that artifacts is {}.
Nothing relevant appears in the logs.
This happens in clusters and control-standalone scenarios. Those are the only ones which have been tested.
AWX version
devel
Select the relevant components
- UI
- API
- Docs
Installation method
docker on linux
Modifications
no
Ansible version
2.12
Operating system
Fedora / centos / RHEL
Web browser
Chrome
Steps to reproduce
jt = factories.job_template(
project=project_from_PR(153, 'Playbook to put environment in artifacts'),
playbook='print_environment.yml',
allow_simultaneous=True
)
jt.ds.inventory.add_host()
jobs = [jt.launch() for i in range(16)]
for job in jobs:
job.wait_until_completed()
assert job.artifacts, f'Failed to get artifacts from job {job.id}, output: {job.result_stdout}'
assert 'printenv' in job.artifactsTo summarize, use the test-playbooks content to make a project, create a JT with allow_simultaneous, launch 16 jobs right away. After they have all been launched, wait for completion. After they complete, inspect artifacts field
Expected results
The playbook content will populate the artifacts with the discovered environment variables and other stuff.
Actual results
In job details page, /api/v2/jobs/N/
"artifacts": {},Additional information
No response