mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
126 stars 41 forks source link

Add modified date to scanner API results and reorder results #1840

Open dzeber opened 3 years ago

dzeber commented 3 years ago

We would like to add the modified date field to the results returned by the scanner API, and reorder the API results by descending modified date.

Currently the scanner API returns results ordered by decreasing created date. If review labels are added later on, since these will be associated with the original created date, an API query may have to scan results covering a wide range of created dates to locate these. Using modified date would simplify the query since we would only need to check for modifications since the last query was run.

This came about as I was comparing a recent API pull to an older one covering the same date range, and found that the newer one seems to include ~100 new labeled records per month over 2020.

One question: for the scanner API results, I'm understanding "modified" to mean an add-on did not have a review label previously, so did not show up in the results, then later gets labeled and appears in the results. Would a previously returned API result ever actually change, eg. label gets flipped or scanner results get modified?

cc willdurand

┆Issue is synchronized with this Jira Task

willdurand commented 3 years ago

One question: for the scanner API results, I'm understanding "modified" to mean an add-on did not have a review label previously, so did not show up in the results, then later gets labeled and appears in the results. Would a previously returned API result ever actually change, eg. label gets flipped or scanner results get modified?

It's a bit more complicated than that because we attach labels to scanner results on the fly.

Let me think more about it, the modified date seemed like a good idea when we discussed but I am wondering if we couldn't do something else instead.

KevinMind commented 5 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-52