mingrammer / diagrams

:art: Diagram as Code for prototyping cloud system architectures
https://diagrams.mingrammer.com
MIT License
39.59k stars 2.54k forks source link

Why does the following code result in missing lines #1019

Open protester-pog opened 2 months ago

protester-pog commented 2 months ago

`from diagrams import Diagram from diagrams.aws.compute import EC2 from diagrams.aws.database import RDS from diagrams.aws.network import ELB

with Diagram("Grouped Workers", show=False, direction="TB"): ELB("lb") >> [EC2("worker1"), EC2("worker2"), EC2("worker3"), EC2("worker4"), EC2("worker5")] >> RDS("events")`

my python version is 3.10;"The result of executing the code is as shown in the image." grouped_workers

acaylor commented 2 months ago

I see similar issue. is there a bug introduced recently? I also am seeing the last part of the line vanish:

from diagrams import Cluster,Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
from diagrams.aws.network import ClientVpn

with Diagram("Grafana OSS", show=False, direction="TB"):
    lb = ELB("private-lb")
    db = RDS("postgres-db")
    vpn = ClientVpn("vpn")

    with Cluster("Grafana ec2 instances"):
        svc_group = [EC2("grafana1"),
                     EC2("grafana2"),
                     EC2("grafana3")]

    vpn >> lb >> svc_group
    svc_group >> db

grafana_oss

*Edit:

I generated this image with the same code back in February 2024 and the lines looked correct

grafana_oss

mingrammer commented 2 months ago

What versions of Diagrams and GraphViz are you using?

acaylor commented 2 months ago

I'm on macOS. Looks like homebrew has been updating my install of Graphviz.

Installed
/opt/homebrew/Cellar/graphviz/12.1.1 (281 files, 7.9MB) *
❯ pip list |rg -i diagram
diagrams   0.23.4
mingrammer commented 2 months ago

This issue was also reproduced to me (I'm using GraphViz@12.1.0). Higher version of GraphViz maybe the root cause I think. So I'll test it with older version of GraphViz, and need to find how to fix it. Thank you for reporting it.

mingrammer commented 2 months ago

@protester-pog @acaylor With GraphViz@11.0.0, it works properly. Please downgrade the GraphViz less than 12.0.0.

protester-pog commented 2 months ago

@protester-pog @acaylor With GraphViz@11.0.0, it works properly. Please downgrade the GraphViz less than 12.0.0.

Thanks,Now i use 11.0.0 is ok ;last time i use the 12.1.0 ;

protester-pog commented 2 months ago

@protester-pog @acaylor With GraphViz@11.0.0, it works properly. Please downgrade the GraphViz less than 12.0.0.

and I use CentOS7 also ok ![Uploading 222.png…]()