Skip to content

Commit

Permalink
fix(minipipeline/analysis): distinguish between None and empty (#1401)
Browse files Browse the repository at this point in the history
None means that an algorithm did not run or did not find enough data to
produce a result. Empty means that the algorithm did run, did find
enough data, and did produce an empty result.

The difference between these two states, which generally is not
important when writing Go code, is extremely important to take the
correct decisions when assigning the results of web measurements.

Accordingly, this diff goes through each algorithm and ensures we start
with a None state and only switch to the empty state when we have seen
enough data to determine that the result is indeed empty.

Additionally, in this diff we also add the following new analysis rules:

- `ComputeDNSPossiblyInvalidAddrsClassic`, which is like
`ComputeDNSPossiblyInvalidAddrs` but does not consider TLS, which in
turn is useful to emulate the original Web Connectivity v0.4 behavior;
- `ComputeDNSPossiblyNonexistingDomains`, which tells us for which
domains the probe and the control agree that those domains are undefined
(i.e., they both get `NXDOMAIN`), which is useful to detect this
specific case;

We also renamed `ComputeHTTPFinalResponses` to
`ComputeHTTPFinalResponsesWithControl` and changed the definition such
that we only include responses for which we have a control. This is the
core rule to decide whether we should move forward with considering the
results of the HTTP diff set of algorithms.

The reference issue is ooni/probe#2634.
  • Loading branch information
bassosimone committed Nov 29, 2023
1 parent 18c38ee commit f452bb0
Show file tree
Hide file tree
Showing 37 changed files with 484 additions and 184 deletions.
6 changes: 4 additions & 2 deletions internal/cmd/minipipeline/testdata/analysis.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"DNSExperimentFailure": null,
"DNSTransactionsWithBogons": {},
"DNSTransactionsWithUnexpectedFailures": {},
"DNSTransactionsWithUnexpectedFailures": null,
"DNSPossiblyInvalidAddrs": {},
"DNSPossiblyInvalidAddrsClassic": {},
"DNSPossiblyNonexistingDomains": {},
"HTTPDiffBodyProportionFactor": 1,
"HTTPDiffStatusCodeMatch": true,
"HTTPDiffTitleDifferentLongWords": {},
"HTTPDiffUncommonHeadersIntersection": {
"x-drupal-cache": true,
"x-generator": true
},
"HTTPFinalResponses": {
"HTTPFinalResponsesWithControl": {
"4": true
},
"HTTPFinalResponsesWithTLS": {
Expand Down
Loading

0 comments on commit f452bb0

Please sign in to comment.