envd icon indicating copy to clipboard operation
envd copied to clipboard

bug: frontend v1 llb dag .dot file syntax error

Open Kaiyang-Chen opened this issue 2 years ago • 9 comments

Description

When try to turn llb dag result .dot file into .png file, error message showsError: test1.dot: syntax error in line 1 near '{'.

Reproduction

build.envd file:

# syntax=v1
def build():
    base(dev=True)
    install.python()
    install.python_packages(name=["via"])
    install.apt_packages(name=["htop"])

./bin/envd --debug debug llb -p .--dot > test1.dot dot -Tpng test1.dot -o test1.png

Additional Info


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

Kaiyang-Chen avatar Jan 09 '23 03:01 Kaiyang-Chen

Cannot reproduce. cc @VoVAllen @gaocegege

kemingy avatar Jan 09 '23 04:01 kemingy

I can reproduce it with the sample code

# syntax=v1
def build():
    base(dev=True)
    install.python()
    install.python_packages(name=["via"])
    install.apt_packages(name=["htop"])

gaocegege avatar Jan 09 '23 04:01 gaocegege

Cannot reproduce.

Which envd && graphviz version are you using? @gaocegege @Kaiyang-Chen

Mine:

  • envd: latest main
  • dot - graphviz version 7.0.7~dev.20230108.2141 (20230108.2141)

kemingy avatar Jan 09 '23 05:01 kemingy

envd: ede2013 (latest main)

dot - graphviz version 2.43.0 (0)
libdir = "/usr/lib/x86_64-linux-gnu/graphviz"
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.so.6
Using render: dot:core
Using device: dot:dot:core
The plugin configuration file:
	/usr/lib/x86_64-linux-gnu/graphviz/config6a
		was successfully loaded.
    render	:  cairo dot dot_json fig gd json json0 map mp pic pov ps svg tk visio vml vrml xdot xdot_json
    layout	:  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout	:  textlayout
    device	:  canon cmap cmapx cmapx_np dot dot_json eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg json json0 mp pdf pic plain plain-ext png pov ps ps2 svg svgz tk vdx vml vmlz vrml wbmp webp x11 xdot xdot1.2 xdot1.4 xdot_json xlib
    loadimage	:  (lib) eps gd gd2 gif jpe jpeg jpg png ps svg webp xbm

gaocegege avatar Jan 09 '23 07:01 gaocegege

I guess it's related to graphviz. Can you try to upgrade it? I built from source.

kemingy avatar Jan 09 '23 07:01 kemingy

graphviz is already the newest version (2.42.2-6).

I installed via apt-get

gaocegege avatar Jan 09 '23 07:01 gaocegege

graphviz is already the newest version (2.42.2-6).

I installed via apt-get

  • https://gitlab.com/graphviz/graphviz/-/tags
  • https://graphviz.org/download/

APT doesn't have the latest release. It should be 7.0.6.

kemingy avatar Jan 09 '23 07:01 kemingy

But, why is this related to graphviz version? v0 works well but v1 is broken with the old version graphviz.

gaocegege avatar Jan 09 '23 07:01 gaocegege

But, why is this related to graphviz version? v0 works well but v1 is broken with the old version graphviz.

Not sure. Could be a graphviz bug. Check the changelog.

kemingy avatar Jan 09 '23 14:01 kemingy