mozilla-services / merino-py

Web Service for Firefox Suggest
Mozilla Public License 2.0
9 stars 9 forks source link

[DISCO-2967] deleting records error + CLI flag #616

Closed bendk closed 2 months ago

bendk commented 2 months ago

References

JIRA: DISCO-2967

Description

Added the --allow-delete flag. If it's not present, don't allow records to be deleted. See https://bugzilla.mozilla.org/show_bug.cgi?id=1908802 for details. I turned off the flag for relevancy updates, because the bug only affects Suggest.

Refactored the CSV uploader so that it records changes it's going to make and executes them at the end. This is needed to correctly determine if there's a deletion. The current pattern is to delete all records, then update ones from the CSV data -- undoing the delete.

PR Review Checklist

Put an x in the boxes that apply

bendk commented 2 months ago

This also affects other CSV uploaders, like MDN and pocket. I think that's correct, please tell me if I shouldn't be messing with them.

Does AMP use our uploader to update their data?