Commit db70616
refactor(riseupvpn): handle failing API and simplify test keys (#1363)
This diff incorporates part of what has been implemented by @cyBerta in
#1125 in response to my review as
well as additional changes based on my own feelings about what is
correct to do here.
Compared to the original diff, these are the changes that I implemented:
1. I have omitted the work to fetch from riseup geo service and figure
out the correct gateways to test. The main reason for not including this
body of work has been to reduce the size of the diff and the amount of
code to deal with.
2. I modified the logic related to failures in fetching the CA and
communicating with riseup services. The test fails immediately if we
cannot fetch the proper CA or we cannot contact riseup services. I did
not feel comfortable disabling the CA to access riseup services and
connecting to the TCP endpoints discovered w/o CA verification.
3. In the test keys, I renamed `api_failure` to `api_failures` because I
do not think it's optimal to keep the same name while the type has
changed from `*string` to `[]string`.
The spirit of the changes is not directly compatible with what we
discussed with @cyBerta. The main difference is in my decision to fail
early in case we miss the preconditions. As I wrote in
#1125 (review),
I think we should be using richer input (and start with its simplest
form) to provision to probes the data they need to perform this
experiment. By provisioning the data ourselves, we remove the coupling
between getting the CA, accessing riseup services to get information on
what gateways we should measure, and measure the gateways, which makes
the experiment several orders of magnitude more robust.
Unfortunately, I do not have time, in this cycle, to perform all this
richer input work. We'll try again for 3.20.
This work is part of ooni/probe#1432.
While there, I forced null callbacks when performing the CA fetch and
contacting riseup services, otherwise we end up printing a non-monotonic
progress status. Admittedly, also omitting to provide progress about
these two operations is bad, but I think we won't be able to provide
monotonic progress until we know what we should fetch in advance.
---------
Co-authored-by: cyBerta <cyberta@riseup.net>1 parent 85da220 commit db70616
2 files changed
Lines changed: 106 additions & 260 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 65 | + | |
| 66 | + | |
71 | 67 | | |
72 | 68 | | |
73 | 69 | | |
74 | 70 | | |
75 | 71 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
| 72 | + | |
| 73 | + | |
81 | 74 | | |
82 | 75 | | |
83 | 76 | | |
| |||
88 | 81 | | |
89 | 82 | | |
90 | 83 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 84 | | |
95 | | - | |
96 | | - | |
| 85 | + | |
97 | 86 | | |
98 | 87 | | |
99 | 88 | | |
| |||
104 | 93 | | |
105 | 94 | | |
106 | 95 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 96 | | |
144 | 97 | | |
145 | 98 | | |
| |||
149 | 102 | | |
150 | 103 | | |
151 | 104 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 105 | | |
158 | 106 | | |
159 | 107 | | |
| |||
206 | 154 | | |
207 | 155 | | |
208 | 156 | | |
209 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
210 | 170 | | |
211 | 171 | | |
212 | 172 | | |
213 | | - | |
214 | | - | |
215 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
216 | 176 | | |
217 | 177 | | |
218 | 178 | | |
219 | 179 | | |
220 | | - | |
221 | | - | |
222 | | - | |
| 180 | + | |
| 181 | + | |
223 | 182 | | |
224 | 183 | | |
225 | 184 | | |
| |||
244 | 203 | | |
245 | 204 | | |
246 | 205 | | |
247 | | - | |
| 206 | + | |
248 | 207 | | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
249 | 213 | | |
250 | 214 | | |
251 | 215 | | |
252 | | - | |
253 | 216 | | |
254 | 217 | | |
255 | 218 | | |
| |||
272 | 235 | | |
273 | 236 | | |
274 | 237 | | |
275 | | - | |
276 | | - | |
| 238 | + | |
277 | 239 | | |
278 | 240 | | |
279 | 241 | | |
| |||
0 commit comments