yuzutech / kroki

Creates diagrams from textual descriptions!

Home Page:https://kroki.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wireviz and symbolator are missing from GitLab 16.10

gpongelli opened this issue · comments

Hi,
I've discovered this fantastic tool some days ago and I've wanted to try it into a gitlab installation.
I've deployed kroki as kubernetes deployment using this chart which uses your latest v0.25.0 with all the companion images.

Kubernetes deployment:

Name:                   kroki
Namespace:              kroki

Labels:                 app.kubernetes.io/instance=kroki
                        app.kubernetes.io/managed-by=Helm
                        app.kubernetes.io/name=kroki
                        app.kubernetes.io/version=0.25.0
                        helm.sh/chart=kroki-5.2.0
...
  Containers:
   kroki:
    Image:        docker.io/yuzutech/kroki:0.25.0
    Port:         8000/TCP
    Host Port:    0/TCP
    Liveness:     http-get http://:http/health delay=0s timeout=1s period=10s #success=1 #failure=3
    Readiness:    http-get http://:http/health delay=0s timeout=1s period=10s #success=1 #failure=3
    Environment:  <none>
    Mounts:       <none>
   bpmn:
    Image:        docker.io/yuzutech/kroki-bpmn:0.25.0
    Port:         8003/TCP
    Host Port:    0/TCP
    Environment:  <none>
    Mounts:       <none>
   diagramsnet:
    Image:        docker.io/yuzutech/kroki-diagramsnet:0.25.0
    Port:         8005/TCP
    Host Port:    0/TCP
    Environment:  <none>
    Mounts:       <none>
   excalidraw:
    Image:        docker.io/yuzutech/kroki-excalidraw:0.25.0
    Port:         8004/TCP
    Host Port:    0/TCP
    Environment:  <none>
    Mounts:       <none>
   mermaid:
    Image:        docker.io/yuzutech/kroki-mermaid:0.25.0
    Port:         8002/TCP
    Host Port:    0/TCP
    Environment:  <none>
    Mounts:       <none>
...

as you can see it's using your docker's latest image.

Then, I've created a markdown file into a gitlab project, containing ALL the diagrams mentioned in example page (yes, ALL the diagrams 😅 ) using the endpoints described here like

```plantuml
```
```structurizr
```
```bytefield
```

and so on, but the only two that doesn't work are

```wireviz
connectors:
  X1:
    type: D-Sub
    subtype: female
    pinlabels: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
  X2:
    type: Molex KK 254
    subtype: female
    pinlabels: [GND, RX, TX]

cables:
  W1:
    gauge: "0.25 mm2"
    length: 0.2
    color_code: DIN
    wirecount: 3
    shield: true

connections:
  -
    - X1: [5,2,3]
    - W1: [1,2,3]
    - X2: [1,3,2]
  -
    - X1: 5
    - W1: s
```

and

```symbolator
module demo_device #(
    //# {{}}
    parameter SIZE = 8,
    parameter RESET_ACTIVE_LEVEL = 1
) (
    //# {{clocks|Clocking}}
    input wire clock,
    //# {{control|Control signals}}
    input wire reset,
    input wire enable,
    //# {{data|Data ports}}
    input wire [SIZE-1:0] data_in,
    output wire [SIZE-1:0] data_out
);
  // ...
endmodule
```

looking deeply at pod's log, I can see there is no call to their endpoints:

{"timestamp":"1718351679107","level":"WARN","thread":"vert.x-eventloop-thread-1","logger":"io.kroki.server.Server","message":"KROKI_PORT is not an integer value 'tcp://10.8.180.75:8000', it's very likely that the value was automatically set by the container runtime, ignoring and using default port 8000","context":"default"}
{"timestamp":"1718351679162","level":"INFO","thread":"vert.x-eventloop-thread-0","logger":"io.vertx.core.impl.launcher.commands.VertxIsolatedDeployer","message":"Succeeded in deploying verticle","context":"default"}
{"timestamp":"1718351758904","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/packetdiag/svg/..."}
{"timestamp":"1718351758935","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/nwdiag/svg/..."}
{"timestamp":"1718351758966","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/seqdiag/svg/..."}
{"timestamp":"1718351758998","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351759029","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/actdiag/svg/..."}
{"timestamp":"1718351759056","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/blockdiag/svg/..."}
{"timestamp":"1718351759616","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/packetdiag/svg/..."}
{"timestamp":"1718351759708","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/rackdiag/svg/..."}
{"timestamp":"1718351760293","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/nwdiag/svg/..."}
{"timestamp":"1718351760357","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/pikchr/svg/..."}
{"timestamp":"1718351760967","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/seqdiag/svg/..."}
{"timestamp":"1718351761026","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/erd/svg/..."}
{"timestamp":"1718351761079","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351761142","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/ditaa/svg/..."}
{"timestamp":"1718351761762","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/actdiag/svg/..."}
{"timestamp":"1718351761827","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/graphviz/svg/..."}
{"timestamp":"1718351762442","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/blockdiag/svg/..."}
{"timestamp":"1718351762512","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/excalidraw/svg/..."}
{"timestamp":"1718351763092","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/excalidraw/svg/..."}
{"timestamp":"1718351763181","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/rackdiag/svg/..."}
{"timestamp":"1718351763184","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/pikchr/svg/..."}
{"timestamp":"1718351763190","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/vega/svg/..."}
{"timestamp":"1718351763211","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/erd/svg/..."}
{"timestamp":"1718351763244","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/vegalite/svg/..."}
{"timestamp":"1718351763563","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/ditaa/svg/..."}
{"timestamp":"1718351763590","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/graphviz/svg/..."}
{"timestamp":"1718351764877","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/vega/svg/..."}
{"timestamp":"1718351767641","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/vegalite/svg/..."}
{"timestamp":"1718351772049","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/nomnoml/svg/..."}
{"timestamp":"1718351772079","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351772113","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351772141","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/nomnoml/svg/..."}
{"timestamp":"1718351772144","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/pikchr/svg/..."}
{"timestamp":"1718351772174","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351772209","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/bpmn/svg/..."}
{"timestamp":"1718351772238","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/bytefield/svg/..."}
{"timestamp":"1718351772269","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/umlet/svg/..."}
{"timestamp":"1718351772337","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351772416","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/bpmn/svg/..."}
{"timestamp":"1718351772453","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351772456","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/pikchr/svg/..."}
{"timestamp":"1718351772513","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/wavedrom/svg/..."}
{"timestamp":"1718351772542","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/svgbob/svg/..."}
{"timestamp":"1718351772573","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/svgbob/svg/..."}
{"timestamp":"1718351772580","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351772640","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/pikchr/svg/..."}
{"timestamp":"1718351772767","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/bytefield/svg/..."}
{"timestamp":"1718351772841","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/...."}
{"timestamp":"1718351773841","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/umlet/svg/..."}
{"timestamp":"1718351773937","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351773942","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/wavedrom/svg/..."}
{"timestamp":"1718351773954","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/svgbob/svg/..."}
{"timestamp":"1718351773962","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/svgbob/svg/..."}
{"timestamp":"1718351773964","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/pikchr/svg/..."}
{"timestamp":"1718351774036","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/structurizr/svg/..."}
{"timestamp":"1718351774058","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351774338","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351774778","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}
{"timestamp":"1718351775056","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/structurizr/svg/..."}
{"timestamp":"1718351775543","level":"INFO","thread":"vert.x-eventloop-thread-1","mdc":{"path":"/plantuml/svg/..."}

(log reduced for github's 65536 character limit)

so, am I writing the markdown correctly for those two diagrams? are "symbolator" and "wireviz" the correct endpoint to use?
are their content correct ?

Thank you very much!

ps
if you need help to add docs on how to use that chart, I can help you 😉

I don't think this is related to Kroki but to the Markdown extension/plugin you are using. Symbolator and WireViz were added "recently" so maybe the Markdown extension/plugin you are using does not recognize this blocks.

gitlab is at v16.10 , are Symbolator and WireViz more recent than that ?

GitLab is currently using Asciidoctor Kroki 0.8.0: https://gitlab.com/gitlab-org/gitlab/-/blob/master/Gemfile#L225

Symbolator and WireViz were added in 0.9.1 https://github.com/asciidoctor/asciidoctor-kroki/releases/tag/ruby-v0.9.1
The latest version is https://github.com/asciidoctor/asciidoctor-kroki/releases/tag/ruby-v0.10.0

So you need to open an issue/merge request at https://gitlab.com/gitlab-org/gitlab/-/issues to update the Asciidoctor Kroki version in GitLab.

thanks @ggrossetie .

just opened an issue and a MR there.

FYI gitlab issue and gitlab MR.

let me know if you need help to add docs on how to use that chart, I could describe that on an issue.

regards.