Closed pando85 closed 1 week ago
I guess that it has to be related with the canvas upgrade to ^3.0.0-rc2
. Vega-lite is still on 2.11.2
I cannot reproduce this issue on https://kroki.io/. Could you please provide a reproduction case?
You are right. I cannot reproduce now with an small test and 0.26.0 docker image or https://kroki.io/
I will close this, I don't know what I saw this morning. Sorry for bothering you.
I was able to reproduce it running kroki like this:
docker run --rm -p 8000:8000 -u 65534 yuzutech/kroki:0.26.0
On 0.25.0 it was working perfectly. Also, I would like to avoid running it as root.
I cannot reproduce on my host:
$ docker run --rm -p 8000:8000 yuzutech/kroki:0.26.0
{"timestamp":"1731527551379","level":"INFO","thread":"vert.x-eventloop-thread-0","logger":"io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer","message":"Succeeded in deploying verticle","context":"default"}
{"timestamp":"1731527555195","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/vegalite/svg","method":"POST","service_name":"vegalite","action":"request_received","bytes_read":"2793","user_agent":"HTTPie/3.2.2"},"logger":"io.kroki.server.service.DiagramHandler","message":"Request received POST /vegalite/svg","context":"default"}
{"timestamp":"1731527555500","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/vegalite/svg","took":"303","method":"POST","service_name":"vegalite","action":"convert","file_format":"svg","user_agent":"HTTPie/3.2.2"},"logger":"io.kroki.server.service.DiagramHandler","message":"Convert took 303ms","context":"default"}
$ cat diag.vlite | http :8000/vegalite/svg Content-Type:text-plain
HTTP/1.1 200 OK
cache-control: public, max-age=432000
content-length: 23895
content-type: image/svg+xml
date: Wed, 13 Nov 2024 19:52:35 GMT
etag: 5.21.0dlaIpK0LPBp2BGm3OICRyW00
expires: Mon, 18 Nov 2024 19:52:35 GMT
last-modified: Sun, 10 Nov 2024 19:58:41 GMT
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" class="marks" width="402" height="192" viewBox="0 0 402 192">
<rect width="402" height="192" fill="white"/>
(...)
</svg>
$ cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS"
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
$ docker -v
Docker version 27.3.1, build ce12230
Also, I would like to avoid running it as root.
You don't need to run it as root.
Hey, see the -u
option in my command to reproduce it.
You are running it as root.
In 0.25.0 it worked with that configuration.
I don't think that's true, since the container is using the user kroki
:
Is there a reason to run it with -u 65534
(nobody)? Is it working if you remove the -u
option? I'm not really sure why/how it worked with 0.25.0.
Having said that, we should probably revert Canvas version to 2.11.2. However, I don't think if it will fix your issue since I don't really understand the relationship between the Canvas error and running the container with the nobody user. It does not make much sense 🤔
Yep, it's really weird. Now I've checked the Dockerfile, and you're totally right. In 0.26.0, the Kroki user is 1001. I will run it with that user, which seems to work.
The build of vega doesn't change so much between 0.25.0 and 0.26.0. So, I don't understand the canvas error.
Anyway, thanks for your guidance. I will close it.
Just for the record: if I ran with readOnlyRootFilesystem: true
and user ID 1001, it still fails. So, vega is writing at some path in the container.
Just for the record: if I ran with readOnlyRootFilesystem: true and user ID 1001, it still fails. So, vega is writing at some path in the container.
Ah I see... I will try to investigate a bit further. Thanks!
Hello,
I updated to 0.26 and now my requests are failing: