Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project overview
  • Repository
  • Issues 294
  • Merge Requests 40
  • 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
  • !413

Open
Opened 17 hours ago by Guy Thouret@gthouret
Report abuse

WIP: Extract record view details from analytics/views api call

The details of recording a view are hidden away inside the api call.

These details should be in a class (or set of classes) within the code base and be subject to testing with the API left to do it's job of parameter parsing and error handling.

The motivation for this refactor is the ongoing boost improvements. A critical piece of boost functionality that marks a boost as expired has been hidden away inside this seemingly unrelated API call.

Closes #1077

Edited 17 hours ago by Guy Thouret
Request to merge extract-view-api-1077 into master
The source branch is 2 commits behind the target branch
Open in Web IDE
Pipeline #100660852 passed for 6cefab06 on extract-view-api-1077
          Requires 3 more approvals from Devs, Deployers, and QA.
          Emiliano Balbuena
          Emiliano Balbuena
          Mark Harding
          Mark Harding
          Martin Santangelo
          Martin Santangelo
          Marcelo Rivera
          Marcelo Rivera
          Rami Albatal
          Rami Albatal
          This is a Work in Progress

          Closes #1077

          You can merge this merge request manually using the
          • Discussion 6
          • Commits 1
          • Pipelines 4
          • Changes 5
          • Guy Thouret @gthouret added MR::Awaiting Review Product::Analytics Squad::Blue Type::Refactor scoped labels 17 hours ago

            added scoped labels

          • Guy Thouret @gthouret changed the description 17 hours ago

            changed the description

          • Guy Thouret @gthouret added 1 commit 3 hours ago

            added 1 commit

            • eb34ad78 - Extract record view details from analytics/views api call - #1077

            Compare with previous version

          • Guy Thouret @gthouret added 1 commit 1 hour ago

            added 1 commit

            • cebc9837 - Extract record view details from analytics/views api call - #1077

            Compare with previous version

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

            More regression...

            2019/12/04 15:36:51 [error] 9#9: *65 FastCGI sent in stderr: "PHP message: Exception #1575473811: TypeError: Return value of Minds\Core\Analytics\Views\Record::recordEntity() must be of the type bool, none returned in /var/www/Minds/engine/Core/Analytics/Views/Record.php:144
            Stack trace:
            #0 /var/www/Minds/engine/Controllers/api/v2/analytics/views.php(37): Minds\Core\Analytics\Views\Record->recordEntity()
            #1 /var/www/Minds/engine/Api/Factory.php(87): Minds\Controllers\api\v2\analytics\views->post(Array)
            #2 /var/www/Minds/engine/Controllers/api/api.php(81): 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->post(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: "POST /api/v2/analytics/views/activity/1041704347395690512 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "extract-view-api-1077.minds.io", referrer: "https://extract-view-api-1077.minds.io/newsfeed/subscriptions"
          • Guy Thouret
            Guy Thouret @gthouret · 1 hour ago
            Developer

            Also...

            2019/12/04 15:37:08 [error] 9#9: *65 FastCGI sent in stderr: "PHP message: Attribute rejectReason is not defined in Minds\Core\Boost\Network\Boost (setRejectReason)" while reading response header from upstream, client: 192.168.13.110, server: _, request: "POST /api/v2/analytics/views/boost/1018217353512488976 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "extract-view-api-1077.minds.io", referrer: "https://extract-view-api-1077.minds.io/newsfeed/subscriptions"
          • Guy Thouret
            Guy Thouret @gthouret · 1 hour ago
            Developer

            Objects of type Minds\Core\Boost\Network\Boost are what is read but the functions we pass that object to are actually expecting an object of type Minds\Entities\Boost\Network :thinking:

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

            This is a lift and shift of original functionality. We have two objects declared for the same thing??? I'm confused now.

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

            Minds\Entities\Boost\Network has a setRejectionReason method. Somebody made a typo with setRejectReason and this has never been caught????

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

            Should be setRejectedReason. Was being set by Boost\Network\Repository so never worked since that file was created.

          • Guy Thouret @gthouret added 1 commit 53 minutes ago

            added 1 commit

            • 6cefab06 - Extract record view details from analytics/views api call - #1077

            Compare with previous version

          Please register or sign in to reply
          0 Assignees
          None
          None
          Milestone
          None
          Time tracking
          No estimate or time spent
          4
          Labels
          MR::Awaiting Review Product::Analytics Squad::Blue Type::Refactor
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Emiliano Balbuena
          user avatar
          Mark Harding
          user avatar
          Martin Santangelo
          user avatar
          Marcelo Rivera
          user avatar
          Rami Albatal
          user avatar
          Olivia Madrid
          user avatar
          Brian Hatchet
          Reference: minds/engine!413