Ton Steijvers
06/21/2023, 2:38 PMadduser
command in Debian 12 works slightly different than the one in Debian 11, in the fact that on Debian 12 a home folder is not implicitly created any more for system users.
Because of this upgrade, we have seen our Prefect jobs that use persist_result=True
crash with this error:
12:07:48.020 | ERROR | Flow run 'caped-dingo' - Crash detected! Execution was interrupted by an unexpected exception: Traceback (most recent call last):
File "/usr/local/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/nonexistent/.prefect/storage'
We fixed by adding --home=/home/<my-user>
option to the adduser
command in our Dockerfile.