Skip to content

Display the /my-liked-packages page the same way as other package listing. #8887

@isoos

Description

@isoos

Background: Because we don't have the private package-likes information in the search index, we couldn't easily apply a search filter that does search in the scope of the packages that the current user liked. A recent discussion outlined a plan to implement it with the following components:

  • Maintain a (redis) cache of liked packages for a user. It is not clear yet if and how we need to limit the number of liked packages, or at least the packages that go into the cached list. As a start this could be a List of the names, and if it grows too large, we may try to build a bitmap instead (if/when a consistent package ordering is implemented).
  • When the user visits the /my-liked-packages page, we can use this cache to pass it to the search service, and the search service can apply a filter on those packages.
  • Right now the internal search backend is queried with HTTP GET queries. Due to the increased parameter length, we should transition to POST requests, where the body has no size limit. However, we should probably keep some query information in the URL, to help tracking issues if latency jumps. (We should have a few overlapping release with both endpoints, just in case a rollout or a rollback may need them for a few minutes).
  • We should keep the feature of unliking a package, either only when the user is on the /my-liked-packages or also when they are on the generic search page (/packages?q=...). We could add the same like icon to the listings, or add the current "Unlike" button at the bottom of the package listings.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions