Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display and search by ip address in ratings admin using IP address from Activity Log #9025

Closed
diox opened this issue Dec 12, 2022 · 7 comments · Fixed by mozilla/addons-server#20101

Comments

@diox
Copy link
Member

diox commented Dec 12, 2022

Instead of relying on the ip_address field in the Rating model, we should use the IPLog.ip_address_binary field instead, both when searching and displaying.

While we're at it, allow searching by IP (which we record for each version submission, including the first) for add-ons.

Prerequisite for #1902

Depends on:

┆Issue is synchronized with this Jira Task

@diox diox self-assigned this Dec 12, 2022
@diox
Copy link
Member Author

diox commented Dec 12, 2022

Regarding search: you can currently do this by manipulating the URL with ip_address=<ip>&addon=<addonid> but a) this only allows a single IP/add-on id and b) this is not easily discoverable, so let's add some UI around this and add multiple IPs/add-ons to be specified.

Note that the ip_address= bit is used by ip_address_link in RatingAdmin

@ioanarusiczki
Copy link

@diox I see the change now on AMO dev, I'll start testing.
It's not yet on -stage.

@diox
Copy link
Member Author

diox commented Jan 11, 2023

I'll need to cherry-pick it for stage because it landed after the tag. I'll do that after your initial round of testing on dev.

@diox
Copy link
Member Author

diox commented Jan 11, 2023

Additional notes:

  • Search by IP is also available in the addons admin. It relies on the ADD_VERSION activity log
  • For ratings, searching by IP for developer replies is not yet supported. It depends on Emit ADD_RATING for developer replies too (or a specific one) #9039
  • For ratings, searching by IP will use add both also edit rating activity logs, with the caveat that it doesn't support edits made before this landed
  • For ratings, when searching by IP, an additional option to filter by add-on (for the add-ons that appear in the ratings that were found) is available

@ioanarusiczki
Copy link

@diox On AMO dev:

  • search with a single IP, or multiple IPs worked for me -> separated by comma. Separated with a space will not return results.

  • search with a single valid addon ID won't work -> it won't return results

the URL looks like https://addons-internal.dev.mozaws.net/en-US/admin/models/ratings/rating/?q=624046
when modified to https://addons-internal.dev.mozaws.net/en-US/admin/models/ratings/rating/?addon=624046 it will return results.

@ioanarusiczki
Copy link

@diox I made some checks on AMO stage too -> looks good.

I also filed #9041

@KevinMind
Copy link
Contributor

@KevinMind KevinMind transferred this issue from mozilla/addons-server May 4, 2024
@KevinMind KevinMind added repository:addons-server Issue relating to addons-server migration:2024 labels May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants