Commit graph

8 commits

Author SHA1 Message Date
GitLab Bot
0ae8428c8e Add latest changes from gitlab-org/gitlab@master 2021-05-11 21:10:21 +00:00
GitLab Bot
a89912871c Add latest changes from gitlab-org/gitlab@master 2020-06-17 12:08:42 +00:00
GitLab Bot
4d5ee2b814 Add latest changes from gitlab-org/gitlab@master 2020-05-27 15:08:11 +00:00
Markus Koller
60755fbc40
Optimize queries for snippet listings
- Avoid N+1 queries for authors and comment counts
- Avoid an additional snippet existence query
2019-09-10 15:24:28 +02:00
Alexandru Croitor
09163e423a Expose merge requests count based on user access
Count issues related merge requests based on user access level. And
issue can have related MRs from projects where user does not have
access so the number of related merge requests should be adjusted
based on user's ability to access the related MRs.

https://gitlab.com/gitlab-org/gitlab-ce/issues/59581
2019-06-18 12:46:46 +03:00
gfyoung
c858f70d07 Enable frozen string for lib/gitlab/*.rb 2018-10-22 07:00:50 +00:00
Sean McGivern
4d4ddb6004 Fail when issuable_meta_data is called on an unlimited collection
This method can be called with an array, or a relation:

1. Arrays always have a limited amount of values, so that's fine.
2. If the relation does not have a limit value applied, then we will load every
   single object in that collection, and prevent N+1 queries for the metadata
   for that. But that's wrong, because we should never call this without an
   explicit limit set. So we raise in that case, and this commit will see which
   specs fail.

The only failing specs here were the issues API specs, and the specs for
IssuableMetadata itself, and both have been addressed.
2017-11-07 16:26:55 +00:00
Stan Hu
88c4248ac7 Remove remaining N+1 queries in merge requests API with emojis and labels
Closes #34159
2017-07-08 22:19:34 -07:00