Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project overview
  • Repository
  • Issues 293
  • Merge Requests 38
  • CI / CD
  • Security & Compliance
  • Packages
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !410

Open
Opened 1 week ago by Guy Thouret@gthouret
Report abuse

Refactor Boost Code

Closes #1149

Edited 3 days ago by Guy Thouret
Request to merge feat/1149-boost-refactor into master
The source branch is 20 commits behind the target branch
Open in Web IDE
Pipeline #101063297 passed for cfe70dfa on feat/1149-boost-refactor
          Requires 3 more approvals from Devs, Deployers, and QA.
          Rami Albatal
          Rami Albatal
          Marcelo Rivera
          Marcelo Rivera
          Ben Hayward
          Ben Hayward
          Olivia Madrid
          Olivia Madrid
          Martin Santangelo
          Martin Santangelo
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Closes #1149

          • Discussion 15
          • Commits 1
          • Pipelines 8
          • Changes 54
          4/5 threads resolved
          • Guy Thouret @gthouret changed milestone to %Boost Refactor #mvp 1 week ago

            changed milestone to %Boost Refactor #mvp

          • Guy Thouret @gthouret added MR::Awaiting Review Squad::Blue scoped labels 1 week ago

            added scoped labels

          • Guy Thouret @gthouret added 1 commit 3 days ago

            added 1 commit

            • cd72577e - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret @gthouret added 1 commit 3 days ago

            added 1 commit

            • e7269ef5 - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret @gthouret added 1 commit 3 days ago

            added 1 commit

            • 6efd9e52 - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret @gthouret added 1 commit 3 days ago

            added 1 commit

            • 722e6865 - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret @gthouret unmarked as a Work In Progress 3 days ago

            unmarked as a Work In Progress

          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 2 days ago
            Last updated by Guy Thouret 1 day ago
            Core/Boost/Feed.php
            1 <?php
            2
            3 namespace Minds\Core\Boost;
            4
            5 use Minds\Core\Data\cache\abstractCacher;
            6 use Minds\Core\Entities\Resolver;
            7 use Minds\Entities\User;
            8 use Minds\Core;
            9 use Minds\Helpers\Time;
            10
            11 abstract class Feed
            • Mark Harding
              Mark Harding @markeharding · 2 days ago
              Owner

              rename to AbstractFeed

            • Guy Thouret
              Guy Thouret @gthouret · 1 day ago
              Developer

              That's not a naming convention I've ever seen/used before. Any reason for that?

            • Please register or sign in to reply
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 2 days ago
            Resolved by Guy Thouret 1 day ago
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 2 days ago
            Resolved by Guy Thouret 1 day ago
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 2 days ago
            Resolved by Guy Thouret 1 day ago
          • Mark Harding
            Mark Harding @markeharding started a thread on the diff 2 days ago
            Resolved by Guy Thouret 1 day ago
          • Guy Thouret @gthouret added 1 commit 1 day ago

            added 1 commit

            • e131e830 - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret
            Guy Thouret @gthouret · 1 day ago
            Developer

            I added the requested docblocks. They don't seem to add any value over the stuff I'd already documented. The methods are self documenting. I'm literally just repeating what the method already says over and over again unless I'm missing something.

          • Guy Thouret @gthouret added 1 commit 1 day ago

            added 1 commit

            • 0a443c1c - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret
            Guy Thouret @gthouret · 1 day ago
            Developer

            @markeharding Did I understand what we discussed about the counters correctly in this last change?

          • Guy Thouret @gthouret mentioned in issue #1134 1 day ago

            mentioned in issue #1134

          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet · 1 day ago
            Developer

            @markeharding is going to re-review this and we'll get it merged in

          • Brian Hatchet :speech_balloon: @brianhatchet assigned to @markeharding 1 day ago

            assigned to @markeharding

          • Guy Thouret
            Guy Thouret @gthouret · 1 hour ago
            Developer

            My tests so far:

            • Boosts appear in rotator
            • Boosts appear in sidebar
            • Can create a newsfeed boost
            • Can create a sidebar boost
            • Can send a boost offer to another channel
            • Can receive and accept a boost offer from another channel
            Edited by Guy Thouret 52 minutes ago
          • Guy Thouret
            Guy Thouret @gthouret · 1 hour ago
            Developer

            Awaiting @benhayward.ben response as boost offer was sent to him.

          • Guy Thouret
            Guy Thouret @gthouret · 53 minutes ago
            Developer

            Creating a sidebar boost emits the following log notice, though it does complete successfully.

            2019/12/06 00:32:28 [error] 8#8: *342 FastCGI sent in stderr: "PHP message: Attribute handler is not defined in Minds\Core\Boost\Network\Boost (getHandler)PHP message: Attribute handler is not defined in Minds\Core\Boost\Network\Boost (getHandler)PHP message: Attribute handler is not defined in Minds\Core\Boost\Network\Boost (getHandler)PHP message: Attribute handler is not defined in Minds\Core\Boost\Network\Boost (getHandler)" while reading response header from upstream, client: 192.168.13.110, server: _, request: "POST /api/v2/boost/user/996163850711601168/0 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "feat-1149-boost-refactor.minds.io", referrer: "https://feat-1149-boost-refactor.minds.io/newsfeed/subscriptions"
          • Guy Thouret
            Guy Thouret @gthouret · 52 minutes ago
            Developer

            On first load, the GET request for the sidebar content emits the following:

            2019/12/06 00:21:34 [error] 8#8: *15 FastCGI sent in stderr: "PHP message: Exception #1575591694: TypeError: Argument 1 passed to Minds\Core\Boost\Network\Iterator::setOffset() must be of the type int, string given, called in /var/www/Minds/engine/Controllers/api/v1/boost/fetch.php on line 58 and defined in /var/www/Minds/engine/Core/Boost/Network/Iterator.php:57
            Stack trace:
            #0 /var/www/Minds/engine/Controllers/api/v1/boost/fetch.php(58): Minds\Core\Boost\Network\Iterator->setOffset('')
            #1 /var/www/Minds/engine/Api/Factory.php(87): Minds\Controllers\api\v1\boost\fetch->get(Array)
            #2 /var/www/Minds/engine/Controllers/api/api.php(76): Minds\Api\Factory::build(Array, Object(Zend\Diactoros\ServerRequest), Object(Zend\Diactoros\Response\JsonResponse))
            #3 /var/www/Minds/engine/Core/Router.php(157): Minds\Controllers\api\api->get(Array)
            #4 /var/www/Minds/engine/index.php(9): Minds\Core\Router->route()
            #5 {main}" while reading response header from upstream, client: 192.168.13.110, server: _, request: "GET /api/v1/boost/fetch/content?limit=8&offset=&rating=2 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "feat-1149-boost-refactor.minds.io", referrer: "https://feat-1149-boost-refactor.minds.io/newsfeed/subscriptions"
          • Guy Thouret @gthouret added MR::Requires Changes scoped label and automatically removed MR::Awaiting Review label 51 minutes ago

            added scoped label and automatically removed label

          • Guy Thouret @gthouret added 1 commit 44 minutes ago

            added 1 commit

            • cfe70dfa - Refactor Boost Code - #1149

            Compare with previous version

          • Guy Thouret
            Guy Thouret @gthouret · 30 minutes ago
            Developer

            Last fix for the sidebar content just causes the request to time out now. :rolling_eyes:

            2019/12/06 01:13:26 [error] 8#8: *111 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.13.110, server: _, request: "GET /api/v1/boost/fetch/content?limit=8&offset=&rating=2 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "feat-1149-boost-refactor.minds.io", referrer: "https://feat-1149-boost-refactor.minds.io/newsfeed/subscriptions"
            
            [06-Dec-2019 01:14:26] WARNING: [pool www] child 11, script '/var/www/Minds/engine/index.php' (request: "GET /index.php?limit=8&offset=&rating=2") execution timed out (120.331320 sec), terminating
            [06-Dec-2019 01:14:26] WARNING: [pool www] child 11 exited on signal 15 (SIGTERM) after 397.361877 seconds from start
          Please register or sign in to reply
          Assignee
          Mark Harding's avatar
          Mark Harding @markeharding
          Boost Refactor #mvp
          Milestone
          Boost Refactor #mvp
          Time tracking
          No estimate or time spent
          2
          Labels
          MR::Requires Changes Squad::Blue
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Rami Albatal
          user avatar
          Marcelo Rivera
          user avatar
          Ben Hayward
          user avatar
          Olivia Madrid
          user avatar
          Martin Santangelo
          user avatar
          Mark Harding
          user avatar
          Emiliano Balbuena
          Reference: minds/engine!410