Skip to content

bug-2053888: Don't return crash pings unless explicitly requested. - #7271

Merged
smarnach merged 17 commits into
mainfrom
default-to-crash-reports
Nov 18, 2026
Merged

smarnach merged 17 commits into
mainfrom
default-to-crash-reports

Conversation

@smarnach

Copy link
Copy Markdown
Contributor

This sets the default for the submission_type field 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 defaults mechanism on the SuperSearch "models". The mechanism is currently otherwise unused. To be able to dynamically base defaults on 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.

@biancadanforth biancadanforth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread webapp/crashstats/settings/base.py Resolved
Comment thread webapp/crashstats/settings/base.py Resolved
@biancadanforth biancadanforth self-assigned this Sep 23, 2026

@biancadanforth biancadanforth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple more observations/requests to complete my first pass review.

Thank you for working on this!

@smarnach
smarnach force-pushed the default-to-crash-reports branch from 1255abb to 97d5af2 Compare October 20, 2026 12:59
@smarnach
smarnach requested a review from a team as a code owner October 20, 2026 12:59

@biancadanforth biancadanforth left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

  1. Along the same lines as #7271 (comment), we should also avoid the default for updatesignatures and include everything. In contrast to verifyprocessed, 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.
  2. 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.

[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.
  • File a follow-up ticket after 2027-03-12 to update the flag/filter value to be "report" instead of "!ping", and update docs.
  • 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 (updatesignatures discussed above) e.g. for the demo/presentation I'm supposed to give at some point.

Comment thread webapp/crashstats/settings/base.py Resolved

@biancadanforth biancadanforth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@smarnach
smarnach force-pushed the default-to-crash-reports branch from 97d5af2 to e54ae9e Compare November 10, 2026 15:23
@smarnach

Copy link
Copy Markdown
Contributor Author

@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 biancadanforth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread webapp/crashstats/crashstats/utils.py Outdated
Comment on lines +491 to +492
# Include all submission types, even documents without an explicit type.
"submission_type": ["__null__", "!__null__"],

@biancadanforth biancadanforth Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@smarnach
smarnach force-pushed the default-to-crash-reports branch from e54ae9e to b1291ec Compare November 18, 2026 14:17
@smarnach
smarnach force-pushed the default-to-crash-reports branch from b1291ec to e160dca Compare November 18, 2026 14:21
@smarnach
smarnach enabled auto-merge November 18, 2026 14:24
@smarnach
smarnach force-pushed the default-to-crash-reports branch from 16c99a3 to 1bc54ad Compare November 18, 2026 14:39
@smarnach
smarnach added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 119d620 Nov 18, 2026
1 check passed
@smarnach
smarnach deleted the default-to-crash-reports branch November 18, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants