-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(qatool): reduce generated test cases churn #1505
Conversation
We add dns.nextdns.io to the QA suite, such that we don't get a wrong NXDOMAIN when trying to use it as the resolver. We optionally sort the test keys to ensure there's less churn in diffs produced when regnerating minipipeline test data. We fix ./script/updateminipipeline.bash to use ./script/go.bash for building as opposed to using go. Closes ooni/probe#2677
tk.ClientResolver = value | ||
tk.mu.Unlock() | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this function because we set the field after all measurements have completed.
@@ -59,13 +59,15 @@ func NewLinearWebAnalysis(input *WebObservationsContainer) (output []*WebObserva | |||
// TagDepth sort at the end of the generated list. | |||
if left.TagDepth.UnwrapOr(-1) > right.TagDepth.UnwrapOr(-1) { | |||
return true | |||
} else if left.TagDepth.UnwrapOr(-1) < right.TagDepth.UnwrapOr(-1) { | |||
} | |||
if left.TagDepth.UnwrapOr(-1) < right.TagDepth.UnwrapOr(-1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer a coding style without else if
when there's a previous return
.
"tags": [ | ||
"depth=0", | ||
"fetch_body=true" | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another bug here: we're not adding the endpoint to tls_handshake_xxx
and http_transaction_xxx
events, which means that they do not sort correctly within the generated JSON.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix this bug as a separate pull request because it seems this one is already huge 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and maybe instead I can just fix it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so, compromise: doing here for LTE, doing in the future for the DSLs.
0, | ||
nil, | ||
started, | ||
trace.Tags()..., | ||
)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such that we have the endpoints in this event (because... why not? It helps with sorting and I don't see why omitting a piece of information we know would ever be wrong).
0, | ||
nil, | ||
finished, | ||
trace.Tags()..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such that we have the endpoints in this event (because... why not? It helps with sorting and I don't see why omitting a piece of information we know would ever be wrong).
0, | ||
nil, | ||
started, | ||
trace.Tags()..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such that we have the endpoints in this event (because... why not? It helps with sorting and I don't see why omitting a piece of information we know would ever be wrong).
0, | ||
nil, | ||
finished, | ||
trace.Tags()..., |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such that we have the endpoints in this event (because... why not? It helps with sorting and I don't see why omitting a piece of information we know would ever be wrong).
nil, | ||
t, | ||
tx.tags..., | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such that we have the endpoints in this event (because... why not? It helps with sorting and I don't see why omitting a piece of information we know would ever be wrong).
nil, | ||
t, | ||
tx.tags..., | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is such that we have the endpoints in this event (because... why not? It helps with sorting and I don't see why omitting a piece of information we know would ever be wrong).
We add dns.nextdns.io to the QA suite, such that we don't get a wrong NXDOMAIN when trying to use it as the resolver. We optionally sort the test keys to ensure there's less churn in diffs produced when regenerating minipipeline test data. We fix ./script/updateminipipeline.bash to use ./script/go.bash for building as opposed to using go. Also, include endpoint information in `tls_handshake_{start,stop}` and `http_transaction_{start,stop}` events such that they are sorted correctly when we sort events to reduce churn. This is necessary because we're using the endpoint information to sort the network events. Part of ooni/probe#2677; the churn is still too high, and I need more changes.
We add dns.nextdns.io to the QA suite, such that we don't get a wrong NXDOMAIN when trying to use it as the resolver.
We optionally sort the test keys to ensure there's less churn in diffs produced when regenerating minipipeline test data.
We fix ./script/updateminipipeline.bash to use ./script/go.bash for building as opposed to using go.
Also, include endpoint information in
tls_handshake_{start,stop}
andhttp_transaction_{start,stop}
events such that they are sorted correctly when we sort events to reduce churn. This is necessary because we're using the endpoint information to sort the network events.Part of ooni/probe#2677; the churn is still too high, and I need more changes.