Skip to content

Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 231
    • Issues 231
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 39
    • Merge Requests 39
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Packages
    • Packages
    • List
    • Container Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !347

Open
Opened 2 weeks ago by Ben Hayward@benhayward.ben
  • Report abuse
Report abuse

[Sprint/OldfashionedOwl](fix): Subscription feed upgrade #435

Closes #435

Summary

This page was using some very old code, so I've upgraded it to use the paging tokens. This should avoid situations like this: https://www.minds.com/kratommotivation1/subscriptions

Testing

To test, pick a user with some subscriptions, and visit /{user}/subscriptions.

Click through subscriptions and subscribers, scroll up and down. https://fix-subscription-feed-435.minds.io/

For bonus points, deploy against live data and check: https://www.minds.com/kratommotivation1/subscriptions

Edited 2 weeks ago by Ben Hayward

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b "fix/subscription-feed-435" "origin/fix/subscription-feed-435"

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout "origin/master"
git merge --no-ff "fix/subscription-feed-435"

Step 4. Push the result of the merge to GitLab

git push origin "master"

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

Request to merge fix/subscription-feed-435 into master
Open in Web IDE
  • Email patches
  • Plain diff
Pipeline #88692797 failed for b0e688e8 on fix/subscription-feed-435
          Requires 3 more approvals from Devs, Deployers, and QA.
          Guy Thouret
          Guy Thouret
          Olivia Madrid
          Olivia Madrid
          Mark Harding
          Mark Harding
          Rami Albatal
          Rami Albatal
          Brian Hatchet
          Brian Hatchet
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Closes #435

          Deletes source branch

          • Discussion 4
          • Commits 5
          • Pipelines 3
          • Changes 5
          2/3 threads resolved
          • Loading...
          • Ben Hayward @benhayward.ben added Squad::Yellow scoped label 2 weeks ago

            added Squad::Yellow scoped label

          • Ben Hayward @benhayward.ben added 1 commit 2 weeks ago

            added 1 commit

            • 0f12af4c - Updated

            Compare with previous version

          • Ben Hayward @benhayward.ben unmarked as a Work In Progress 2 weeks ago

            unmarked as a Work In Progress

          • Ben Hayward @benhayward.ben changed the description 2 weeks ago

            changed the description

          • Ben Hayward @benhayward.ben added MR::Awaiting Review scoped label 2 weeks ago

            added MR::Awaiting Review scoped label

          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 5 days ago
            Last updated by Ben Hayward 21 minutes ago
            Core/Subscriptions/Repository.php
            41 if (!$opts['guid']) {
            42 throw new \Exception('GUID is required');
            43 }
            44
            45 $response = new Response;
            46 if ($opts['type'] === 'subscribers') {
            47 $statement = "SELECT * FROM friends";
            48 } else {
            49 $statement = "SELECT * FROM friendsof";
            50 }
            51
            52 $where = ["column1 = ?"];
            53 $values = [$opts['guid']];
            54
            55 $statement .= " WHERE " . implode(' AND ', $where);
            56 $statement .= " ALLOW FILTERING";
            • Mark Harding
              Mark Harding @markeharding · 5 days ago
              Owner

              Why are we using allow filtering?

            • Ben Hayward @benhayward.ben changed this line in version 3 of the diff 24 minutes ago

              changed this line in version 3 of the diff

            • Ben Hayward
              Ben Hayward @benhayward.ben · 21 minutes ago
              Developer

              Sorry, I wasn't fully aware of how performance impacting allow filtering is. Flipped the logic around to search by key, in other table.

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 5 days ago
            Resolved by Ben Hayward 1 hour ago
          • Mark Harding
            Mark Harding @markeharding started a thread on an old version of the diff 5 days ago
            Resolved by Ben Hayward 49 minutes ago
          • Mark Harding @markeharding added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 5 days ago

            added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label

          • Ben Hayward @benhayward.ben resolved all threads 49 minutes ago

            resolved all threads

          • Ben Hayward @benhayward.ben added 44 commits 24 minutes ago

            added 44 commits

            • 0f12af4c...142d395f - 41 commits from branch master
            • 1aa0d7f1 - Updated for feedback
            • 7de7bcb6 - Merge branch 'master' of gitlab.com:minds/engine into fix/subscription-feed-435
            • b0e688e8 - Updated tests

            Compare with previous version

            Toggle commit list
          • Ben Hayward @benhayward.ben resolved all threads 24 minutes ago

            resolved all threads

          • Ben Hayward @benhayward.ben added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label 21 minutes ago

            added MR::Awaiting Review scoped label and automatically removed MR::Requires Changes label

          • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
          Please register or sign in to reply
          0 Assignees
          None
          Assign to
          None
          Milestone
          None
          Assign milestone
          None
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Awaiting Review Squad::Yellow
          Assign labels
          • View project labels
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Guy Thouret
          user avatar
          Olivia Madrid
          user avatar
          Mark Harding
          user avatar
          Rami Albatal
          user avatar
          Brian Hatchet
          user avatar
          Emiliano Balbuena
          user avatar
          Marcelo Rivera
          Reference: minds/engine!347