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

Transformer should not create temporary files inside the codebase #3818

Closed
ssbarnea opened this issue Oct 6, 2023 · 2 comments
Closed

Transformer should not create temporary files inside the codebase #3818

ssbarnea opened this issue Oct 6, 2023 · 2 comments
Assignees
Labels

Comments

@ssbarnea
Copy link
Member

ssbarnea commented Oct 6, 2023

When interrupting linter testing I discover random file named tmp... inside the codebase. I believe that our transformed does this and I do think that we should avoid creating temporary files inside the source tree. Instead these temporary files should be created into the system provided temporary directory.

@Qalthos I think that you know this area of code quite well to be able to make a patch for it.

@ssbarnea ssbarnea added new Triage required bug labels Oct 6, 2023
@ssbarnea ssbarnea removed the new Triage required label Oct 6, 2023
@ssbarnea
Copy link
Member Author

ssbarnea commented Oct 6, 2023

I think that I discovered another issue related to transformer and our testing. On arch testing failed as we run out of disk space on /tmp (2GB default). Once I started looking on it I found something quite unexpected. For each transformer tests, pytest-xdist copied the entire examples/ folder with included collections (~100MB).

--- /tmp/pytest-of-root/pytest-0/popen-gw1/test_transformer_jinja_spacing0/examples/playbooks/collections ------------------------------------------------------
                                     /..
   95.4 MiB [######################] /ansible_collections
    2.2 MiB [                      ]  community-general-6.3.0.tar.gz
  564.0 KiB [                      ]  community-crypto-2.12.0.tar.gz
  484.0 KiB [                      ]  ansible-windows-1.13.0.tar.gz
  420.0 KiB [                      ]  community-docker-3.4.2.tar.gz
  172.0 KiB [                      ]  ansible-posix-1.5.1.tar.gz
    8.0 KiB [                      ]  community-molecule-0.1.0.tar.gz
    4.0 KiB [                      ]  requirements.yml
    4.0 KiB [                      ]  .gitignore

@ssbarnea
Copy link
Member Author

ssbarnea commented Oct 6, 2023

Aven after bumping the /tmp from 2GB to 10GB, i got test failures now due to running out of memory. The test VM has 2 cpus and 4GB RAM, which should be fine for running the tests. The system uses only under 400MB to run.

ssbarnea added a commit that referenced this issue Oct 6, 2023
ssbarnea added a commit that referenced this issue Oct 6, 2023
ssbarnea added a commit that referenced this issue Oct 6, 2023
ssbarnea added a commit that referenced this issue Oct 6, 2023
ssbarnea added a commit that referenced this issue Oct 6, 2023
ssbarnea added a commit that referenced this issue Oct 6, 2023
ssbarnea added a commit that referenced this issue Oct 9, 2023
@github-project-automation github-project-automation bot moved this from Roadmap to Done in 🧰 devtools project board Nov 29, 2023
@github-project-automation github-project-automation bot moved this from Backlog to Done in ansible-lint --fix Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Archived in project
Development

No branches or pull requests

2 participants