| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The user has the rights of a public user execpt it can never create a project,
group, or team. Also it cant view internal projects.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Removed User#project_relations
This is to make things more compatible with EE so merging is easier.
cc @dzaporozhets
See merge request !3192
|
| |
| |
| |
| |
| |
| |
| |
| | |
GitLab EE adds an extra relation that selects a "project_id" column
instead of an "id" column, making it very hard for this method to be
re-used in EE. Since using User#authorized_groups in
ProjectsFinder#all_groups apparently has no performance impact we can
just use it and keep everything compatible with EE.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Disallow blank (non-null) values for a Note's `line_code` attribute
It's unclear how these blank values got added, but GitLab.com had a few:
```
irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count
=> 439
```
We've added a migration to convert any existing records to use a NULL
value when blank, and updated Note to set blank values to nil before
validation.
See merge request !3118
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's unclear how these blank values got added, but GitLab.com had a few:
```
irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count
=> 439
```
We've added a migration to convert any existing records to use a NULL
value when blank, and updated Note to set blank values to nil before
validation.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| | |
fix token issue - timing attack
Updates token comparisons to use a secure version instead of `==`
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13617
See merge request !3062
|
| | |
|
| |\
| | |
| | |
| | | |
fix/token-timing-attack
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The OR condition for source_project_id/target_project_id leads to a
query plan that performs rather poorly on PostgreSQL due to the use of
sub-queries. Because Rails offers no easy alternative for this
particular problem we're forced to using a UNION for both conditions.
The resulting query performs much faster than just using an OR.
|
| | |
| | |
| | |
| | |
| | | |
This ensures searching namespaces works exactly the same as searching
for any other resource.
|
| | |
| | |
| | |
| | |
| | | |
We can just use "arel_table" in these cases instead of
"SomeClass.arel_table".
|
| | |
| | |
| | |
| | |
| | | |
We don't need the extra layer of nesting of UNION queries here (as
User#authorized_projects already returns a UNION'd query).
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previously this used a regular LIKE which is case-sensitive on
PostgreSQL. This ensures that for both PostgreSQL and MySQL the
searching is case-insensitive similar to searching for projects.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Similar to the changes made to Project.search the method
Project.search_by_title now also uses Arel so it can automatically use
ILIKE/LIKE instead of the lower() function.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This chance is broken up in two steps:
1. Use ILIKE on PostgreSQL and LIKE on MySQL, instead of using
"WHERE lower(x) LIKE lower(y)" as ILIKE is significantly faster than
using lower(). In many cases the use of lower() will force a slow
sequence scan.
2. Instead of using 1 query that searches both projects and namespaces
using a JOIN we're using 2 separate queries that are UNION'd
together. Using a JOIN would force a slow sequence scan, using a
UNION avoids this.
This method now uses Arel as Arel automatically uses ILIKE on PostgreSQL
and LIKE on MySQL, removing the need to handle this manually.
|
|\ \ \
| | | |
| | | |
| | | | |
expiring-lock
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The method Project#ci_services would load all services into memory
(including _all_ their columns) and then use Enumerable#select to reduce
the list. Project#ci_service in turn would further reduce this list down
to just 1 Service instance.
Instead of doing all this in Ruby we can just offload the work to the
database, reducing the amount of time spent in these methods. These
changes reduce the time of the first call to Project#ci_services from
around 240 ms to around 10 ms, though the final timings will vary based
on database load. Because Project#ci_service is memoized there's no
further overhead introduced by using a database query.
Fixes gitlab-org/gitlab-ce#14186
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Fixed the GitPushService specs
See merge request !3139
|
| | | | |
| | | | |
| | | | |
| | | | | |
This fixes the remainder of the GitPushService specs.
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fix error 500 in Todos
Closes #14095
Closes #14075
Closes #14109
Closes #14151
See merge request !3141
|
| | |/ / / |
|
| |\ \ \ \
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Commit limits
Prevent timeouts when creating/viewing Merge Requests with many
commits. Also, reduce the number of commits shown in the UI from 500
to 100.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14031
This MR avoids Unicorn timeouts in some places and takes 4.5 seconds
off load times in others, when manually testing with a 4500-commit
compare/MR in the linux repo. It does not limit the number of Commit
objects instantiated in memory, just the amount of HTML generated. It
seems that having 4500 commits objects is not a problem in itself. If
it ever becomes one we could do something for Commit objects like we
did for Diff (introduce a CommitCollection or something).
See merge request !3095
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When rendering 1 commit takes over 5ms (on my laptop: around 9ms), it
saves seconds in rendering time to show 100 instead of 500 commits.
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Remove `Snippet#expires_at`
This was removed from the interface in
https://github.com/gitlabhq/gitlabhq/pull/6027 but its implementation
lingered around for two years.
See merge request !3103
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This was removed from the interface in
https://github.com/gitlabhq/gitlabhq/pull/6027 but its implementation
lingered around for two years.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This ensures the right caches are flushed when adding a branch via the
UI, instead of only flushing this one random cache.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This ensures Repository#add_tag calls Repository#before_push_tag instead
of just 1 random cache expiration method.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This ensures that Repository#rm_branch calls
before_remove_branch/after_remove_branch instead of just 1 random cache
expiration method.
|
| |_|_|/
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The methods used for this are Repository#tag_count and
Repository#branch_count which cache their output in Redis as well as
memoizing it in an instance variable. Both methods have a corresponding
methods/hooks to flush the caches at the right time.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
adds language names to projects list [image attached]
See merge request !3000
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
language you have now to make a commit to the project
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|