Alexandre Segura

Results 143 comments of Alexandre Segura

Generally speaking, it would be smart to move this extract to `Cube`. This way, we can benefit from `Cube`'s caching capabilities, and also it's almost already available via the API.

For an unknown reason, a missing `Content-Type` header was causing empty files, only in production Should be fixed in df74398e21659e288ff717638dcd1bde5b23a2c9

Actually, the problem persists in production. Cube server only returns results on the 2nd HTTP call 🤔

Found the problem. In production, sometimes the Cube server responds with ["Continue wait"](https://cube.dev/docs/http-api/rest#prerequisites-continue-wait): ``` < HTTP/1.1 200 OK < * Connection #0 to host cubejs.coopcycle.org left intact {"error":"Continue wait","stage":{"stage":"Executing query","timeElapsed":4985}}...

@lucasferraro yep, pre-aggregation should definitely be setup. For the moment, I'm just implementing a retry mechanism to hotfix the issue.

Retry strategy implemented in a66fdb31c38cf1f92a66bb2ca37c9bf52c72b58f

1/ Create a `ROLE_DISPATCHER` role in `security.yml` https://github.com/coopcycle/coopcycle-web/blob/d41dd8175bf0ea7d566e7cf418e4da47afb180d5/app/config/security.yml#L11-L17 2/ Allow selecting the `ROLE_DISPATCHER` role in `userEditAction` https://github.com/coopcycle/coopcycle-web/blob/master/src/Controller/AdminController.php#L596 3/ When user has the `ROLE_DISPATCHER` role, hide the "Export" button on the...

![2023-03-02 17 49 44](https://user-images.githubusercontent.com/1162230/222499822-2a2a029d-da3f-443e-bd1e-a4d53288f640.jpg)

A more detailed list of restrictions: ``` Menu area Action dispatcher allowed? Dashboard Add task yes Edit task yes (Re)assign task yes Delete task yes Import tasks from file yes...