| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This commit introduces Releases API under /api/v4/projects/:id/releases
* We are introducing release policies at project level.
* We are deprecating releases changes from tags, both api and web
interface.
* Tags::CreateService no longer create a release
This feature is controlled by :releases_page feature flag
|
|
|
|
|
|
| |
- we now use the hierarchy class also for epics
- also rename supports_nested_groups? into supports_nested_objects?
- move it to a concern
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're filtering the events using `Event#visible_to_user?`.
At most we're loading 100 events at once.
Pagination is also dealt with in the finder, but the resulting array
is wrapped in a `Kaminari.paginate_array` so the API's pagination
helpers keep working. We're passing the total count into that
paginatable array, which would include confidential events. But we're
not disclosing anything.
|
|
|
|
|
|
|
|
|
|
|
| |
Given the note is about how to interpret ancestor clusters, use the
finder which actually knows if there are any ancestor clusters to find
out if the note should be shown, rather than passing the same info via a
view to a helper
Added note about Kaminari.paginate_array
Link to followup issue too
|
|
|
|
|
| |
This is in addtion to the can checks we have in the controller, as a
finder can be used elsewhere in the future.
|
|
|
|
|
| |
Show both the cluster(s) of the clusterable, and the cluster(s) of
ancestor groups.
|
|
|
|
|
|
| |
The email is sent to project maintainers containing the last mirror
update error. This will allow maintainers to set alarms and react
accordingly.
|
|\
| |
| |
| |
| | |
Add a flag to use a subquery for group issues search
See merge request gitlab-org/gitlab-ce!23445
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We already had a flag to use a CTE, but this broke searching in some
cases where we need to sort by a joined table. Disabling the CTE flag
makes searches much slower.
The new flag, to use a subquery, makes them slightly slower than the
CTE, while maintaining correctness. If both it and the CTE flag are
enabled, the subquery takes precedence.
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By using the parameters `?labels=None|Any` the user can filter
issues/mrs from the API that has `none/any` label.
Affected endpoints are:
- /api/issues
- /api/projects/:id/issues
- /api/groups/:id/issues
- /api/merge_requests
- /api/projects/:id/merge_requests
- /api/groups/:id/merge_requests
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
'master'
Resolve "Incorrect project list order select default label"
Closes #53290
See merge request gitlab-org/gitlab-ce!23058
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Rails5 deprecation: Passing a class as a value in an Active Record query is deprecated
See merge request gitlab-org/gitlab-ce!23164
|
| |/ |
|
|/ |
|
|\
| |
| |
| | |
# Conflicts:
# spec/models/project_spec.rb
|
| |\
| | |
| | |
| | |
| | | |
Remove PersonalAccessTokensFinder#find_by method
See merge request gitlab-org/gitlab-ce!22617
|
| | |
| | |
| | |
| | |
| | |
| | | |
find_by_token is overriden by TokenAuthenticatable which can be easily
missed or confused with #find_by(:token) defined by ActiveRecord. First
step for safer usage is to remove #find_by.
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Top level clusters controller
See merge request gitlab-org/gitlab-ce!22438
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
To the extent possible swap out `project` with `clusterable`
- Abstract paths for showing cluster or clusters. This will allow us to
swap in alternative paths for group level cluster
- Push :project_id and :namespace_id params from the URL to the POST
body.
- Create a nice helper for to generate links for the destroy
action
For some reason, spec :project_id and :namespace_id param are not going
through `to_param` for a JSON format. Manually call `to_param` to fix
specs.
- Move :layout to BaseController
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This completely rewrites the SnippetsFinder class from the ground up in
order to improve its performance. The old code was beyond salvaging. It
was complex, included various Rails 5 workarounds, comments that
shouldn't be necessary, and most important of all: it produced a really
poorly performing database query.
As a result, I opted for rewriting the finder from scratch, instead of
trying to patch the existing code. Instead of trying to reuse as many
existing methods as possible, I opted for defining new methods
specifically meant for the SnippetsFinder. This requires some extra code
here and there, but allows us to have much more control over the
resulting SQL queries. It is these changes that then allow us to produce
a _much_ more efficient query.
To illustrate how bad the old query was, we will use my own snippets as
an example. Currently I have 52 snippets, most of which are global ones.
To retrieve these, you would run the following Ruby code:
user = User.find_by(username: 'yorickpeterse')
SnippetsFinder.new(user, author: user).execute
On GitLab.com the resulting query will take between 10 and 15 seconds to
run, producing the query plan found at
https://explain.depesz.com/s/Y5IX. Apart from the long execution time,
the total number of buffers (the sum of all shared hits) is around 185
GB, though the real number is probably (hopefully) much lower as I doubt
simply summing these numbers produces the true total number of buffers
used.
The new query's plan can be found at https://explain.depesz.com/s/wHdN,
and this query takes between 10 and 100-ish milliseconds to run. The
total number of buffers used is only about 30 MB.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/52639
|
|\ \ \ |
|
| | | | |
|
| | | | |
|
| | | | |
|
|/ / / |
|
| |/
|/| |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
[11.4] Fix Token lookup for Git over HTTP and registry authentication
See merge request gitlab/gitlabhq!2577
|
|
|
|
| |
requests"
|
|\
| |
| |
| |
| |
| |
| | |
Add Applications API endpoints for listing and deleting entries.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52559
See merge request https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22296
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This refactors the TodoService class according to our code reuse
guidelines. The resulting code is a wee bit more verbose, but it allows
us to decouple the column names from the input, resulting in fewer
changes being necessary when we change the schema.
One particular noteworthy line in TodoService is the following:
todos_ids = todos.update_state(state)
Technically this is a violation of the guidelines, because
`update_state` is a class method, which services are not supposed to use
(safe for a few allowed ones). I decided to keep this, since there is no
alternative. `update_state` doesn't produce a relation so it doesn't
belong in a Finder, and we can't move it to another Service either. As
such I opted to just use the method directly.
Cases like this may happen more frequently, at which point we should
update our documentation with some sort of recommendation. For now, I
want to refrain from doing so until we have a few more examples.
|
|
|
|
|
|
|
|
| |
This refactors the TodosFinder finder according to the new code reuse
rules, as enforced by the CodeReuse cops. I also changed some of the
methods to use regular if statements, instead of assignments and/or
early returns. This results in a more natural flow when reading the
code, and it makes it harder to accidentally return the wrong result.
|
|\
| |
| |
| |
| | |
Add a new project-specific templates API endpoint
See merge request gitlab-org/gitlab-ce!22118
|
| | |
|
| |
| |
| |
| |
| |
| | |
We don't think this is needed any more - see
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21521, and
https://gitlab.com/gitlab-org/gitlab-ce/issues/52271 for removing the flag.
|