Commit 87a5d2f
committed
Show example cycle when ls-apis errors about them
`cargo xtask ls-apis check` will report an error if the software
component graph contains a cycle, as well as if the deployment units
form a cycle, but prints only the name of a node in the graph that was
in the cycle. If you've added a cycle to either of these graphs, the
error and node can tell you about the what that is wrong. Going a bit
further and printing an example cycle including the troublesome node can
help with the how you got there.
With this change, the first approach at #10231 (which introduced a cycle
in, but all in one deployment unit: sled-agent -> propolis-server ->
sled-agent) errors with a more clear message about propolis-server and
sled-agent being the problems:
```
Error: graph of server-managed API dependencies between components has a cycle
(includes node: "propolis-server", example cycle: propolis-server, omicron-sled-agent)
```1 parent b845b31 commit 87a5d2f
1 file changed
Lines changed: 45 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
122 | 155 | | |
123 | 156 | | |
124 | 157 | | |
| |||
861 | 894 | | |
862 | 895 | | |
863 | 896 | | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
864 | 900 | | |
865 | 901 | | |
866 | | - | |
867 | | - | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
868 | 905 | | |
869 | 906 | | |
870 | 907 | | |
| |||
876 | 913 | | |
877 | 914 | | |
878 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
879 | 919 | | |
880 | 920 | | |
881 | | - | |
882 | | - | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
883 | 924 | | |
884 | 925 | | |
885 | 926 | | |
| |||
0 commit comments