Open hassan510-cmd opened 11 months ago
@hassan510-cmd IMO this problem comes from the endpoint_route_handler addon. @simahawk what do you thing about?
@lmignon i try to upgrade endpoint_route_handler instead of upgrade my module, it work fine also
I think you are right
@lmignon @simahawk anything new about this issue ?
Dears, after some dubbing, I have found that the first synced endpoint not working until you sync another one, and I tried to get an explanation for this behavior : 1- we have a table called "endpoint_route" This table contains new custom routes 2- we have a sequence called "endpoint_route_version" that has 2 triggers before inserting and update 3- according to the incremental start with 1 and INCREMENT BY 1 at first time the "last_version" col in "endpoint_route_version" equal to 1 4- after syncing the first endpoint the last version does not change 5- in the override method called routing_map its check on 2 conditions, the second one check if the _endpoint_route_last_version is less than the "last_version" col in "endpoint_route_version" which at first sync endpoint will be equal so, there is no new route will be mapped until you sync another endpoint so the _endpoint_route_last_version will be less than the "last_version" col in "endpoint_route_version" so the super method will work properly case of clear the cls._routing_map
I suggest 2 solutions to handle the first sync endpoint: 1- change check condition to be cls._endpoint_route_last_version <= last_version or 2- add 3rd condition which delete the "_routing_map" attr so the cls._routing_map will get cleared also
In this fork i have applied the first solution
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
Module
fast API
Describe the bug
when I try to create a new app with such an endpoint as root_path into data dir and some routes, it's required to update the module to be able to access this endpoint
To Reproduce
Affected versions:
Steps to reproduce the behavior:
Expected behavior the newly created endpoint should work properly without the need to update the module