| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GroupProjectsFinder#collection_with_user would run the following code:
if group.users.include?(current_user)
When running this code for multiple groups this would result in one
query being executed for every group.
This commit simple removes the entire "if" statement with the code of
the "else" statement. This ensures both paths use the same code, and
removes the need for explicitly checking if a user is a member of the
group.
|
|\
| |
| |
| |
| |
| |
| | |
Resolve "API naming for issue scope"
Closes #44799
See merge request gitlab-org/gitlab-ce!18935
|
| |
| |
| |
| | |
Deprecate corresponding dash versions created-by-me and assigned-to-me
|
|/ |
|
| |
|
|
|
|
|
|
|
| |
To find the pipeline for a specific sha requires scanning the list of
all pipelines for a ref that contains the sha. This makes it hard to
find the pipeline id needed to access a trace for a specific job run
in the pipeline using the API.
|
|
|
|
| |
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
|
|
|
|
|
|
| |
This reverts commit 2c3c5b35549185080296670cfe6710aa80f99944.
Revisit this after https://gitlab.com/gitlab-org/gitlab-ce/issues/45441
|
|\
| |
| |
| |
| |
| |
| | |
Make archived projects completely read-only
Closes #44788
See merge request gitlab-org/gitlab-ce!18136
|
| |
| |
| |
| |
| |
| |
| | |
This prevents creating merge requests targeting archived projects.
This could happen when a project was already forked, but then the
source was archived.
|
|/
|
|
|
|
|
|
| |
This removes the extra check for project-ids which is not needed at all.
This does not necessarily reduce execution time of the query, but
improves planning time by a few millseconds.
Closes #37125.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
These extra sort keys caused sequential scans on the namespaces and projects
page. Removing them makes the page load on GitLab.com.
Closes #44338
|
|
|
|
| |
Closes #40525.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
into 'master'
Add overview of branches and filtered views for active/stale branches
Closes #40187 et #17293
See merge request gitlab-org/gitlab-ce!15402
|
| | |
|
| |
| |
| |
| | |
This was causing todo priority sorting to fail.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Resolve "API support for selecting only updated issues before/after a given date"
Closes #41616
See merge request gitlab-org/gitlab-ce!17417
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Don't use ProjectsFinder in TodosFinder
Closes #43767
See merge request gitlab-org/gitlab-ce!17462
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Using ProjectsFinder in TodosFinder to limit todos to the right projects
leads to overly complicated and slow database queries. This commit
removes the use of ProjectsFinder in favour of using
Project.public_or_visible_to_current_user directly.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/43767
|
|\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | | |
Revert Project.public_or_visible_to_user changes but apply change to SnippetsFinder
Closes #42877
See merge request gitlab-org/gitlab-ce!17476
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This applies the changes introduced in `Project.public_or_visible_to_user`
to the snippets finder only.
We know that for `SnippetsFinder`, this change improves SQL timing from
5/23/25s to 0.7/2/4s (mean/p95/p99). At the same time, the scope was too
broad, (negatively) affecting SQL timings in various other places:
https://gitlab.com/gitlab-com/infrastructure/issues/3772
With this commit, the snippets dashboard stays usuable as we generally
don't run into statement timeouts. In contrast to the earlier change in
!17088, the scope of the change is limited to `SnippetsFinder` only,
thus not affecting other places.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These changes were introduced in MR
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/17088. In
https://gitlab.com/gitlab-com/infrastructure/issues/3772 we discovered
these changes lead to a pretty drastic increase in SQL response timings.
We'll revert these changes so we can work on a better solution in the
mean time without GitLab.com (or other installations) experiecing
reduced performance in the mean time.
|
|/ /
| |
| |
| |
| |
| | |
Because epic index page includes also epics from subgroups
it's necessary to also get descendant group labels for filtering.
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4773#note_61236542
|
|\ \
| |/
|/|
| |
| |
| |
| | |
Add source and target branch filters to merge requests API
Closes #42492
See merge request gitlab-org/gitlab-ce!17355
|
| | |
|
|/
|
|
| |
service
|
|\
| |
| |
| |
| | |
Improve performance of searching for and auto completing of users
See merge request gitlab-org/gitlab-ce!17158
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The frontend code doesn't use this so there's no practical point in
supporting this. We also hardcode the limit to 20 so users can no longer
request their own limit, which could overload the database (depending on
any upper bounds perhaps enforced by Kaminari).
|
| |
| |
| |
| |
| |
| | |
We can instead just use a UNION. This removes the need for plucking
hundreds if not thousands of IDs into memory when a project has many
members.
|
|/ |
|
|\
| |
| |
| |
| | |
Refactor IssuableFinder to extract model-specific logic
See merge request gitlab-org/gitlab-ce!17236
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By extracting a new `filter_items` method, we can override that in the
IssuesFinder and MergeRequestsFinder separately, so we don't need checks that
the model is the correct one, because we can just use the class we're in to know
that.
We can do the same for the VALID_PARAMS constant, by making it a class method.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Simplify database queries in MembersFinder and improve performance for Projects::ProjectMembersController#index
Closes #41461
See merge request gitlab-org/gitlab-ce!17190
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This was the default behavior, because all members with `user_id` set to
`null` were excluded.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For each member being rendered on
Projects::ProjectMembersController#index, there was a query to the users
table to retrieve the corresponding user:
```
SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1
```
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Realized window functions are not available in older MySQL versions
either.
Falling back to DISTINCT ON for postgresql and a convoluted translation
for MySQL.
|
| |/
| |
| |
| | |
Closes #41461.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Immediately using #from here requires a lot of changes in
other finders (e.g. IssuableFinder, TodosFinder). In all places where we
use #merge, this goes completely the wrong way when passed in a relation
that was built with `#from(...)`: The original query's FROM part gets
completely replaced.
This avoids changing all other places and focuses on improving
SnippetFinder with the downside of two (small) codepaths to do the same
thing.
|
| | |
|
|/ |
|