Python, No usable temporary directory found

I had to Google this today and was kind of surprised by how many odd workarounds are used for this one, and most of them seem wrong. What is it? The error will create a traceback and it will look similar to this: Fontconfig error: No writable cache directories time=2024-08-05T17:57:28.924000 level=ERROR location=__init__.py:75:handle_exception msg="Error" request_id="" exception="Traceback (most recent call last): File \"/var/www/.cache/pypoetry/virtualenvs/pdf-maker-xS3fZVNL-py3.12/lib/python3.12/site-packages/flask/app.py\", line 880, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File \"/var/www/....

August 5, 2024 · 4 min

Rotating Github (Action) secrets

So, here’s a fun problem I ran into at work: We use Github Actions to deploy all our services to Kubernetes. And in order to do a deployment, we have kube configs (as secrets) setup to connect to a Kubernetes cluster when a workflow runs. The Kubernetes config has an expiration date and will become invalid when the Kubernetes certificates are rotated (k0s takes great care of that). When they expire, the deploys fail until we update the secret on Github Actions....

February 11, 2024 · 5 min