mou
mou2mo ago

Default python script failing to run on 1.344.3

Everything described relates to freshly installed Windmill 1.344.3 in Kubernetes environment. Steps to reproduce 1. Open interface. 2. Click "+ Script" 3. In popover click Python 4. Click on a script window 5. Click on "Test >" button 6. Observe log with an error.
job=01900d67-3179-097e-65f4-f5caaac6c897 tag=python3 worker=wk-default-d9k97-dhtr3 hostname=windmill-workers-default-7dfb985465-d9k97

resolving dependencies...
content of requirements:
wmill

Traceback (most recent call last):
File "/usr/local/bin/pip-compile", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/piptools/scripts/compile.py", line 465, in cli
cache=DependencyCache(cache_dir),
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/piptools/cache.py", line 71, in __init__
os.makedirs(cache_dir, exist_ok=True)
File "<frozen os>", line 215, in makedirs
File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/.cache'
job=01900d67-3179-097e-65f4-f5caaac6c897 tag=python3 worker=wk-default-d9k97-dhtr3 hostname=windmill-workers-default-7dfb985465-d9k97

resolving dependencies...
content of requirements:
wmill

Traceback (most recent call last):
File "/usr/local/bin/pip-compile", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/piptools/scripts/compile.py", line 465, in cli
cache=DependencyCache(cache_dir),
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/piptools/cache.py", line 71, in __init__
os.makedirs(cache_dir, exist_ok=True)
File "<frozen os>", line 215, in makedirs
File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/.cache'
Expected script sucessfully executed, since it is provided and expected to be tested.
5 Replies
rubenf
rubenf2mo ago
Hi @mou , I would suspect you have setup a specific volume for the cache or similar but I can confirm to you 1.344.3 work well on all our dedicated EE instances which are all on kubernetes using our official helm charts
mou
mou2mo ago
Thank you, @rubenf for quick reply. Most likely. I just followed helm chart setup. Should I add an emptyDir volume for cache and mount it in expected location?
rubenf
rubenf2mo ago
If you used the stock helm chart without modification, then it must be your kube flavor which doesn't grant write permission by default or similar you can try with minikube for instance, it will work fine we are ourselves on EKS
mou
mou2mo ago
Indeed. Looks like container is intended to be run as root. But i found my values has a non-root security context DId not know why i set up it this way or from where i copy pasted this security context @rubenf removing securityContext solved my issue. Sorry for bothering.
rubenf
rubenf2mo ago
no worries, we're here for that