changed milestone to %Boost Refactor #mvp
added scoped labels
unmarked as a Work In Progress
- Last updated by Mark Harding
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 - Owner
rename to AbstractFeed
- Developer
That's not a naming convention I've ever seen/used before. Any reason for that?
- Owner
If its an abstract class then it should be prefixed just as interfaces should be appended with interface as per PSR. https://www.php-fig.org/bylaws/psr-naming-conventions/
- Resolved by Guy Thouret
- Resolved by Guy Thouret
- Resolved by Guy Thouret
- Resolved by Guy Thouret
- 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.
- Developer
@markeharding Did I understand what we discussed about the counters correctly in this last change?
- Developer
@markeharding is going to re-review this and we'll get it merged in
assigned to @markeharding
- 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
- Can revoke a boost
Edited by Guy Thouret - Developer
Awaiting @benhayward.ben response as boost offer was sent to him.
- 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"
- 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"
- Owner
Guids are strings or else JS will round them up.
added scoped label and automatically removed label
- Developer
Last fix for the sidebar content just causes the request to time out now.
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
- Developer
Tests are failing for payment. Tests are invalid anyway as the type of the object passed in the Payment tests is not the type of object passed in the API calls.
Guessing the payment stuff was written for first iteration of boost objects (
Entities\Boost\...
) and not what is in use (Core\Boost\...
).Just when I thought I had a handle on Boost, some more danger has presented itself.
It's not clear now what parts of boost are using old and what's using new, what is dead code, what is not.
I'm going to need to assign some time to this if we want to get it out with any kind of confidence.
- Developer
I'm either missing a piece of the puzzle or something has gone very wrong at some point with the development of boost.
- Developer
@markeharding @brianhatchet The saga continues, see the above comments. It would great if you could shed any light on this.
- Developer
Pushed a hack for Payments to properly handle both sets of Boost object for now.
- Developer
Revoking a boost returns
{status: "error"}
Request URL: https://feat-1149-boost-refactor.minds.io/api/v2/boost/newsfeed/1049474072058007557/revoke Request Method: DELETE
added 1 commit
- Owner
If this isn't ready to be merged in anymore then we should put back to WIP.
marked as a Work In Progress
- Developer
Ben sees the peer boost request in inbox with now way of accepting. @markeharding Any insight into how that is supposed to work and if it's actually functional in production?