Closed Bug 1241192 Opened 10 years ago Closed 7 years ago

Form validate invalid date parameters in SuperSearch

Categories

(Socorro :: Webapp, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: peterbe, Unassigned)

Details

Attachments

(1 file)

If you search for `date:>=2016-01-31` and `date:<=2016-01-01` there's a logical mismatch. There are no crashes that are greater than Jan 31st AND less than Jan 1st. Also, (see attached screenshot), this could easily be avoided by disallowing the date to be >TODAY.
I don't think we should prevent the date from being greater than today. However, we indeed should raise a comprehensible error when the date parameters are illogic.
(In reply to Adrian Gaudebert [:adrian] from comment #1) > I don't think we should prevent the date from being greater than today. > However, we indeed should raise a comprehensible error when the date > parameters are illogic. Isn't the date tied to which index we query on?
It's the opposite, the indices are tied to the dates. But there's a protection mechanism in place, that will swallow errors about missing indices, so it's fine to be able to query in the future. Worst case it will return no results. The problem here is that we hit a very specific case where we query on zero indices. We could either detect that there is no index and return an empty result, or raise an exception about the logical mismatch.

Seems like SuperSearch is doing this now. This URL:

https://crash-stats.mozilla.com/search/?product=Firefox&date=%3E%3D2019-02-08T23%3A39%3A00.000Z&date=%3C2019-02-04T23%3A39%3A00.000Z&_facets=signature&page=1&_sort=-date&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform

Kicks up this error:

date:

 * Operator combination failed 2019-02-08 23:39:00+00:00 >= 2019-02-04 23:39:00+00:00

I think we're good here.

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: