Open diox opened 2 years ago
Note that
FileUpload.ip_address
needs to be kept. This is because we rely on it to keep the ip address used at upload time when we later log the IP inIPLog
when theVersion
is created.
Should we update the field in FileUpload
to be an IPAddressBinaryField
too then? It's more "correct" but also arguably unnecessary as we don't search for ips over the FileUpload
table (at least, that I'm aware of).
We could, but I don't think that's necessary, for the reason you gave. It's really only there to keep the IP temporarily and pass it down at version creation time.
@wagnerand are any of these fields still used in queues queries, that you're aware of?
blocked. https://github.com/eviljeff/olympia/tree/19672-drop-old-ip-address-fields has progress so far.
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-120
Once we're sure we no longer need the legacy plain text ip address columns we have in various models for old manual queries, we should remove them. The binary field in
IPLog
made in mozilla/addons#8855 should be used for all our queries.This includes:
last_login_ip
inUserProfile
ip_address
inRating
_ip_address
(the non-binary one) inIPLog
last_login_ip
andip_address
inUserRestrictionHistory
(there is an argument to be made that this entire model is obsolete since we have anActivityLog
for those events too - discuss with Operations whether we could replace it entirely with that)All code that uses those fields need to be updated to use the
IPLog
binary field instead. The fields need to be set as nullable and then the columns removed in a subsequent push.This should happen on December 1st at the earliest: 180 days after the push that introduced
IPLog
logging forRating
s, which we didn't backfill (the activity logs for ratings are not kept longer than that).Note that
FileUpload.ip_address
needs to be kept. This is because we rely on it to keep the ip address used at upload time when we later log the IP inIPLog
when theVersion
is created. We could consider adding a separateActivityLog
forFileUpload
creation, find it when theVersion
is created to link it, but that's a bit cumbersome.┆Issue is synchronized with this Jira Task