gql icon indicating copy to clipboard operation
gql copied to clipboard

Graphviz dot produces indeterminsitic result, breaking the CI SVG check

Open knaeckeKami opened this issue 2 years ago • 0 comments

repeat 20 multipack info | dot -Tsvg -x | md5

outputs

2db5aa6b11b6b4f52e8283f2435d5212
d6156c52000e690a7c3e72e52553b9db
2db5aa6b11b6b4f52e8283f2435d5212
2db5aa6b11b6b4f52e8283f2435d5212
1979929664b2fbc1bce4975000f37ac3
5201338dd5c626e72645bbcedf9ea4bf
5201338dd5c626e72645bbcedf9ea4bf
2db5aa6b11b6b4f52e8283f2435d5212
5201338dd5c626e72645bbcedf9ea4bf
2db5aa6b11b6b4f52e8283f2435d5212
2db5aa6b11b6b4f52e8283f2435d5212
2db5aa6b11b6b4f52e8283f2435d5212
5201338dd5c626e72645bbcedf9ea4bf
5201338dd5c626e72645bbcedf9ea4bf
5201338dd5c626e72645bbcedf9ea4bf
5201338dd5c626e72645bbcedf9ea4bf
5201338dd5c626e72645bbcedf9ea4bf
2db5aa6b11b6b4f52e8283f2435d5212
5201338dd5c626e72645bbcedf9ea4bf
1979929664b2fbc1bce4975000f37ac3

on my machine. It should output the same hash every time if the algorithm was deterministic. The output of multipack info is deterministic, so it must be dot which is the culprit here. The actual difference in the SVG is tiny, it seems to come down to some rounding differences.

I believe this is a known issue of dot discussed here: https://gitlab.com/graphviz/graphviz/-/issues/1767

Because of this, the check SVG step in the CI does not really make sense in my opinion, since it would often fail even though the SVG image is up to date.

knaeckeKami avatar Aug 06 '22 10:08 knaeckeKami