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

MakeJinja deletes the whole repo on Task Configure #1174

Closed
Sinless777 opened this issue Jan 16, 2024 · 16 comments
Closed

MakeJinja deletes the whole repo on Task Configure #1174

Sinless777 opened this issue Jan 16, 2024 · 16 comments

Comments

@Sinless777
Copy link

So I am running into a unique scenario when running task configure of the repo
it deletes the whole repo, and leaves this in the console

PLAY RECAP ***************************************************************************************************************************************************************************************************************************
localhost                  : ok=46   changed=0    unreachable=0    failed=0    skipped=5    rescued=0    ignored=0

task: [.template] ./.venv/bin/makejinja
Remove output '/mnt/e/Projects/Production-Cluster'
Traceback (most recent call last):
  File "/mnt/e/Projects/Production-Cluster/.venv/bin/makejinja", line 8, in <module>
  File "/mnt/e/Projects/Production-Cluster/.venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
  File "/mnt/e/Projects/Production-Cluster/.venv/lib/python3.10/site-packages/rich_click/rich_command.py", line 126, in main
  File "/mnt/e/Projects/Production-Cluster/.venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
  File "/mnt/e/Projects/Production-Cluster/.venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
  File "/mnt/e/Projects/Production-Cluster/.venv/lib/python3.10/site-packages/typed_settings/cli_click.py", line 247, in new_func
  File "/mnt/e/Projects/Production-Cluster/.venv/lib/python3.10/site-packages/makejinja/cli.py", line 32, in makejinja_cli
  File "/mnt/e/Projects/Production-Cluster/.venv/lib/python3.10/site-packages/makejinja/app.py", line 36, in makejinja
  File "/usr/lib/python3.10/shutil.py", line 731, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib/python3.10/shutil.py", line 729, in rmtree
    os.rmdir(path)
PermissionError: [Errno 13] Permission denied: '/mnt/e/Projects/Production-Cluster'
task: Failed to run task "configure": exit status 1
sinless777@DESKTOP-5QMAPL8:/mnt/e/Projects/Production-Cluster$ 
@Sinless777
Copy link
Author

I have narrowed it down to a python version issue 3.10 will not work with this repo it needs 3.11

@Sinless777
Copy link
Author

So after changing python version 3.10 => 3.11 The makejinja works properly.

Python version3.11 is a hard requirement and i would recommend adding a check for that.

@onedr0p
Copy link
Owner

onedr0p commented Jan 16, 2024

Thanks for looking into this and the fix! I'll be sure to update the readme to reflect this.

@onedr0p
Copy link
Owner

onedr0p commented Jan 16, 2024

I have updated the readme here 3517747

@Sinless777
Copy link
Author

Stay tuned ill have more info for wsl in a bit Ill send a script for wsl setup

@onedr0p
Copy link
Owner

onedr0p commented Jan 16, 2024

I have added a simple python version check in #1176

@onedr0p
Copy link
Owner

onedr0p commented Jan 17, 2024

I am not sure if that check is even needed, when I tried to install makejinja on Python 3.10 I got this error:

ERROR: Ignored the following versions that require a different python version: 2.1.0 Requires-Python >=3.11,<4.0; 2.1.1 Requires-Python >=3.11,<4.0; 2.1.2 Requires-Python >=3.11,<4.0; 2.1.3 Requires-Python >=3.11,<4.0; 2.1.4 Requires-Python >=3.11,<4.0; 2.2.0 Requires-Python >=3.11,<4.0; 2.3.0 Requires-Python >=3.11,<4.0; 2.3.1 Requires-Python >=3.11,<4.0; 2.3.2 Requires-Python >=3.11,<4.0; 2.3.3 Requires-Python >=3.11,<4.0; 2.3.4 Requires-Python >=3.11,<4.0; 2.3.5 Requires-Python >=3.11,<4.0
ERROR: Could not find a version that satisfies the requirement makejinja==2.3.5 (from versions: 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.6.0, 0.7.0, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 1.0.0b1, 1.0.0b2, 1.0.0b3, 1.0.0b4, 1.0.0b5, 1.0.0b6, 1.0.0b7, 1.0.0b8, 1.0.0b9, 1.0.0b10, 1.0.0b11, 1.0.0b12, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.4, 1.1.5b1, 1.1.5b2, 1.1.5b3, 1.1.5b4, 1.1.5, 2.0.0b1, 2.0.0b2, 2.0.0b3, 2.0.0b4, 2.0.0b5, 2.0.0b6, 2.0.0b7, 2.0.0b8, 2.0.0, 2.0.1, 2.0.2)
ERROR: No matching distribution found for makejinja==2.3.5

@onedr0p
Copy link
Owner

onedr0p commented Jan 17, 2024

Anyways I merged a PR for this #1176

I am going to close this issue but feel free to post anything you find in WSL2-land as it might help others out. Thanks for the feedback!

@onedr0p onedr0p closed this as completed Jan 17, 2024
@Sinless777
Copy link
Author

I am not sure if that check is even needed, when I tried to install makejinja on Python 3.10 I got this error:

ERROR: Ignored the following versions that require a different python version: 2.1.0 Requires-Python >=3.11,<4.0; 2.1.1 Requires-Python >=3.11,<4.0; 2.1.2 Requires-Python >=3.11,<4.0; 2.1.3 Requires-Python >=3.11,<4.0; 2.1.4 Requires-Python >=3.11,<4.0; 2.2.0 Requires-Python >=3.11,<4.0; 2.3.0 Requires-Python >=3.11,<4.0; 2.3.1 Requires-Python >=3.11,<4.0; 2.3.2 Requires-Python >=3.11,<4.0; 2.3.3 Requires-Python >=3.11,<4.0; 2.3.4 Requires-Python >=3.11,<4.0; 2.3.5 Requires-Python >=3.11,<4.0
ERROR: Could not find a version that satisfies the requirement makejinja==2.3.5 (from versions: 0.1.0, 0.1.1, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.6.0, 0.7.0, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 1.0.0b1, 1.0.0b2, 1.0.0b3, 1.0.0b4, 1.0.0b5, 1.0.0b6, 1.0.0b7, 1.0.0b8, 1.0.0b9, 1.0.0b10, 1.0.0b11, 1.0.0b12, 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2, 1.1.4, 1.1.5b1, 1.1.5b2, 1.1.5b3, 1.1.5b4, 1.1.5, 2.0.0b1, 2.0.0b2, 2.0.0b3, 2.0.0b4, 2.0.0b5, 2.0.0b6, 2.0.0b7, 2.0.0b8, 2.0.0, 2.0.1, 2.0.2)
ERROR: No matching distribution found for makejinja==2.3.5

Yea the version used for makejinja in this repo is not available for python 3.10

@onedr0p
Copy link
Owner

onedr0p commented Jan 17, 2024

Did you try to downgrade the version of makeninja to get around that or something?

@DRAGandDROP
Copy link

facing the same issue when starting from scratch.
Stage 2 point 4 (task ansible:deps) does not work, with the error mentioned by SinLess-Games.
Even though Python3.11 is installed on the machine.

@onedr0p
Copy link
Owner

onedr0p commented Jan 21, 2024

@DRAGandDROP are you also on WSL? I cannot reproduce the error on MacOS or Linux.

@onedr0p onedr0p reopened this Jan 21, 2024
@DRAGandDROP
Copy link

i'm on ubuntu administration-vm on proxmox

@onedr0p
Copy link
Owner

onedr0p commented Jan 21, 2024

Any help diagnosing this would be great. In the mean time I'll try to reproduce it by running it on various systems.

@DRAGandDROP
Copy link

just found it.
i needed to set python3.11 as default python version then it work without issues.
installed python3 via apt, which only installs 3.10. manually installing 3.11 will install it next to 3.10, which still is default.
thanks for your quick response! @onedr0p

@onedr0p
Copy link
Owner

onedr0p commented Jan 21, 2024

Whew that's good to know. Glad you got it resolved!

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

No branches or pull requests

3 participants