Commit Graph

12 Commits

Author SHA1 Message Date
Sean McGivern da0d8e0491 Fix `Routable.find_by_full_path` on MySQL 2017-05-06 09:45:25 +01:00
Michael Kozono 7d02bcd2e0 Redirect from redirect routes to canonical routes 2017-05-05 12:11:57 -07:00
Stan Hu a0edaa9210 Cache Routable#full_path in RequestStore to reduce duplicate route loads
We see in #27387 that a call to `polymorphic_path` will cause duplicate
SELECT route calls for each merge request in a milestone. This happens
because calling `project.namespace.becomes(Namespace)` will instantiate
a new instance of a Namespace for each merge request, which causes a N+1
query on the routes table. This change caches the state of the route by
the specific class and ID, which dramatically eliminates duplicate work.
2017-04-24 06:43:24 -07:00
Alexis Reigel 63e61cfd83 use more explicit and explanatory sql statement 2017-04-06 10:01:14 +02:00
Alexis Reigel 20575859b1 check all groups for 2fa requirement 2017-04-06 10:01:14 +02:00
Alexis Reigel 5ea4e34f47 add method to get a full routable hierarchy 2017-04-06 10:01:14 +02:00
mhasbini 666c20cb70 Remove repeated routes.path check for postgresql database 2017-03-18 12:04:12 +02:00
Dmitriy Zaporozhets 2989192d1a
Store group and project full name and full path in routes table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-08 19:14:29 +02:00
Dmitriy Zaporozhets 52c5f9c97f
Add User#nested_groups and User#nested_projects methods
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-01-25 13:43:15 +02:00
Dmitriy Zaporozhets 3e0b8e000f Rename Routable.where_paths_in to Routable.where_full_path_in
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-11 10:30:40 +02:00
Dmitriy Zaporozhets b552a4eb18 Validate presence of route by Routable concern
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-11 10:30:40 +02:00
Dmitriy Zaporozhets 83232be0e1
Add nested groups support on data level
* add parent_id field to namespaces table to store relation with nested groups
* create routes table to keep information about full path of every group and project
* project/group lookup by full path from routes table

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-12-08 11:47:16 +02:00