fix(measurex): use same keys of the OONI data format (#572)
This change should simplify the pipeline's job. Reference issue: https://github.com/ooni/probe/issues/1817. I previously dismissed this possibility, but now it seems clear it is simpler to have a very tabular data format internally and to convert such a format to OONI's data format when serializing. The OONI data format is what the pipeline expects, but processing is easier with a more linear/tabular format.
This commit is contained in:
parent
6f90d29bfa
commit
aa27bbe33f
35 changed files with 1539 additions and 993 deletions
12
internal/measurex/failure.go
Normal file
12
internal/measurex/failure.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package measurex
|
||||
|
||||
// NewFailure creates a serializable failure from an error. We
|
||||
// cannot round trip an error using JSON, so we serialize to this
|
||||
// intermediate format that is a sort of Optional<string>.
|
||||
func NewFailure(err error) *string {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
s := err.Error()
|
||||
return &s
|
||||
}
|
||||
Loading…
Reference in a new issue