Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data from set_stats not getting saved to job artifacts field as a flaky occurrence #11821

Closed
4 of 6 tasks
AlanCoding opened this issue Feb 28, 2022 · 1 comment
Closed
4 of 6 tasks

Comments

@AlanCoding
Copy link
Member

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.artifacts

To 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

@AlanCoding
Copy link
Member Author

I re-ran the script here and was not able to detect any failures, so it seems this was fixed by some unknown changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants