ooni / data

OONI Data CLI and Pipeline v5
https://docs.ooni.org/data
8 stars 4 forks source link

Fix processing of network_events in tor test #80

Closed hellais closed 3 months ago

hellais commented 3 months ago

Since the changes were made to support web_connectivity 0.5 it looks like a regression was introduced affecting the parsing of tor related network events.

Specifically the stack trace is as follows:

Traceback (most recent call last):
  File "/home/art/repos/ooni/data/oonipipeline/src/oonipipeline/temporal/activities/observations.py", line 107, in make_observations_for_file_entry_batch
    obs_tuple = measurement_to_observations(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/art/repos/ooni/data/oonipipeline/src/oonipipeline/transforms/observations.py", line 66, in measurement_to_observations
    return transformer.make_observations(msmt)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/art/repos/ooni/data/oonipipeline/src/oonipipeline/transforms/nettests/tor.py", line 18, in make_observations
    tls_observations = self.make_tls_observations(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/art/repos/ooni/data/oonipipeline/src/oonipipeline/transforms/measurement_transformer.py", line 835, in make_tls_observations
    measurement_to_tls_observation(
  File "/home/art/repos/ooni/data/oonipipeline/src/oonipipeline/transforms/measurement_transformer.py", line 436, in measurement_to_tls_observation
    if tls_network_events[0].address:
       ~~~~~~~~~~~~~~~~~~^^^

A sample measurement affected by the bug is this one: 20240710234111.216894_RU_tor_2b7326ed5c0bd30d

hellais commented 3 months ago

This isn't just affecting the tor test, it's also other measurements

hellais commented 3 months ago

This was fixed by: https://github.com/ooni/data/commit/63c7c6c82afbbeda3c110690c39c52200e4e2887