Repository navigation
bug-2053888: Don't return crash pings unless explicitly requested. - #7271
Conversation
biancadanforth
left a comment
There was a problem hiding this comment.
I'm mostly done reviewing this, but I'm out of time for today. I have enough substantive change requests that I thought I'd submit this partial review. I think I've brought up all the major issues, but I'll take another pass tomorrow as well.
biancadanforth
left a comment
There was a problem hiding this comment.
Added a couple more observations/requests to complete my first pass review.
Thank you for working on this!
1255abb to
97d5af2
Compare
There was a problem hiding this comment.
This is a lot more complicated than I expected!
I think this is really close. Thank you for the updates. Two overall comments (and a few inline):
- Along the same lines as #7271 (comment), we should also avoid the default for
updatesignaturesand include everything. In contrast toverifyprocessed, this one is more of a design question, but I think updating it in the same way is the right call[1]. I didn't mention this one at all before, so my bad for missing it! If you have different thoughts about this one, I'd be very interested to hear them. - The fact that the query param that needs to be added is now
submission_type = "!ping"or"ping"rather than"report"or"ping"to include legacy crash reports is a bit confusing from the user perspective. Simply including"report"as one may expect would omit legacy crash reports missing the field. To date, we've been communicating that you either include:"report","ping"or"report" OR "ping". - This problem will go away on its own 26 weeks (ES retention) after bug-2053871 has been around, which is 2027-03-12. Based on the current project timeline, that's before the adjustment period begins, so I don't think we need to do anything explicitly other than document this behavior in case the timing changes[2].
Footnotes -- click to expand.
[1]: First seen is a property of the crash, not how it was submitted.Of course this assumes that crash pings and crash reports for the same crash have the same signature in most cases. But divergences mean more rows in the Signatures table, so we wouldn't lose data. Convergence actually would benefit us I think as we are much more likely to have a crash ping for a given crash over a crash report, so the first seen times should be more accurate for the same signature. We'd also get coverage for crash ping signatures in cases that there is no matching crash report (which will likely be the majority case).
I also think we'll want to run the updatesignatures cron job one time over the backfill window, since otherwise, the first date times won't be covered when the cron job runs, since reprocessing doesn't modify the date_processed value. I'll file a separate follow-up ticket for that and edit this comment accordingly tomorrow.
- Done: Filed CRINGE 463
[2]: Documenting the behavior (I'll take care of this, but I'm noting it here, since I can't get to this until tomorrow):
- Add a note in the migration plan about this timing and how things work leading up to 2027-03-12.
- Done: See CRINGE-365 comment
- File a follow-up ticket after 2027-03-12 to update the flag/filter value to be
"report"instead of"!ping", and update docs.- Done: See CRINGE-462
- I should also document some of the less obvious benefits for crash detection for the changes we're making, like improvements around the first time seeing a crash signature (
updatesignaturesdiscussed above) e.g. for the demo/presentation I'm supposed to give at some point.- Done: See this comment
biancadanforth
left a comment
There was a problem hiding this comment.
In addition to updatesignatures, there's one more place I found while reviewing https://mozilla-hub.atlassian.net/browse/CRINGE-455?focusedCommentId=1876620 -- get_versions_for_product uses SuperSearchUnredacted with no submission_type, so it inherits the default. However, as we just discovered a few days ago in CRINGE-455, Focus does not send crash pings as of version 151, so it would return a stale or empty list after the cutover without any changes. Can you update that call site as well to include all submission types?
97d5af2 to
e54ae9e
Compare
|
@biancadanforth Thanks for the thorough review! I agree with everything you suggested. I tried to keep the different changes in separate commits to make it easier to review the changes since the last time. |
biancadanforth
left a comment
There was a problem hiding this comment.
Thank you! This is looking good to me. R + WC.
Looks like there's a small linting fix needed for CI. I also requested one additional test fix for updatesignatures similar to including es_helper in the CrashVerify tests.
The other suggestions are not blocking.
| # Include all submission types, even documents without an explicit type. | ||
| "submission_type": ["__null__", "!__null__"], |
There was a problem hiding this comment.
Non-blocking: It doesn't look like webapp/crashstats/crashstats/tests/test_utils.py has any tests currently for get_versions_for_product. Ideally we'd add one for this test case (i.e. that the default is "ping", there are only Focus crash reports and no Focus crash pings, that we get back the versions from the Focus crash pings). It looks like BaseTestViews uses a helper that mocks the function, so we should put it elsewhere to make sure we're actually testing the function itself.
There are a couple more places for the /documentation route that also should include both data sets, but they can be handled in another ticket. No one will notice the issue here until we support crash pings, actually have crash pings in Socorro, and switch the default over. I added a comment to the documentation cleanup ticket: https://mozilla-hub.atlassian.net/browse/CRINGE-391?focusedCommentId=1907764.
SUPERSEARCH_DEFAULT_SUBMISSION_TYPE_FILTER.
…ng product versions.
e54ae9e to
b1291ec
Compare
b1291ec to
e160dca
Compare
16c99a3 to
1bc54ad
Compare
This sets the default for the
submission_typefield for Supersearch queries to!ping, effectively excluding all crash documents that are explicitly tagged as pings, but including documents tagged as reports and documents that don't have an explicit submission type.The patch uses the existing
defaultsmechanism on the SuperSearch "models". The mechanism is currently otherwise unused. To be able to dynamically basedefaultson a setting, I had to use a property, which required a trivial code change in_describe_models. Overall, the production code changes in this PR are just a few lines. The rest of the changes are tests.