An error occurred fetching the project authors.
- 21 Sep, 2018 1 commit
-
-
Sanad Liaquat authored
-
- 17 Sep, 2018 2 commits
-
-
Yorick Peterse authored
This commit adds the module `FromUnion`, which provides the class method `from_union`. This simplifies the process of selecting data from the result of a UNION, and reduces the likelihood of making mistakes. As a result, instead of this: union = Gitlab::SQL::Union.new([foo, bar]) Foo.from("(#{union.to_sql}) #{Foo.table_name}") We can now write this instead: Foo.from_union([foo, bar]) This commit also includes some changes to make this new setup work properly. For example, a bug in Rails 4 (https://github.com/rails/rails/issues/24193) would break the use of `from("sub-query-here").includes(:relation)` in certain cases. There was also a CI query which appeared to repeat a lot of conditions from an outer query on an inner query, which isn't necessary. Finally, we include a RuboCop cop to ensure developers use this new module, instead of using Gitlab::SQL::Union directly. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
-
Yorick Peterse authored
This commit adds the module `FromUnion`, which provides the class method `from_union`. This simplifies the process of selecting data from the result of a UNION, and reduces the likelihood of making mistakes. As a result, instead of this: union = Gitlab::SQL::Union.new([foo, bar]) Foo.from("(#{union.to_sql}) #{Foo.table_name}") We can now write this instead: Foo.from_union([foo, bar]) This commit also includes some changes to make this new setup work properly. For example, a bug in Rails 4 (https://github.com/rails/rails/issues/24193) would break the use of `from("sub-query-here").includes(:relation)` in certain cases. There was also a CI query which appeared to repeat a lot of conditions from an outer query on an inner query, which isn't necessary. Finally, we include a RuboCop cop to ensure developers use this new module, instead of using Gitlab::SQL::Union directly. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
-
- 11 Sep, 2018 2 commits
-
-
Yorick Peterse authored
These Cops enforces the code reuse rules as defined in merge request https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21254.
-
Yorick Peterse authored
These Cops enforces the code reuse rules as defined in merge request https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21254.
-
- 29 Aug, 2018 2 commits
- 25 Aug, 2018 2 commits
-
-
Bob Van Landuyt authored
When using ruby interpolation in externalized strings, they can't be detected. Which means they will never be presented to be translated. To mix variables into translations we need to use `sprintf` instead. Instead of: _("Hello #{subject}") Use: _("Hello %{subject}) % { subject: 'world' }
-
Bob Van Landuyt authored
When using ruby interpolation in externalized strings, they can't be detected. Which means they will never be presented to be translated. To mix variables into translations we need to use `sprintf` instead. Instead of: _("Hello #{subject}") Use: _("Hello %{subject}) % { subject: 'world' }
-
- 16 Aug, 2018 2 commits
-
-
Yorick Peterse authored
This method usually has really bad performance implications, as it loads rows into memory and deletes them one by one.
-
Yorick Peterse authored
This method usually has really bad performance implications, as it loads rows into memory and deletes them one by one.
-
- 08 Aug, 2018 1 commit
-
-
Andreas Brandl authored
-
- 20 Jun, 2018 1 commit
-
-
Bob Van Landuyt authored
This notifies developers when calling `find(_by!)` chained on `execute`. And suggests using the methods from `FinderMethods`. These will perform the correct authorization checks on the resource when it is found.
-
- 18 Apr, 2018 3 commits
-
-
Yorick Peterse authored
This reverts the addition of the "goldiloader" Gem and all use of it. While this Gem is very promising it's causing a variety of problems on GitLab.com due to it eager-loading too much data in places where we don't expect/can handle this. At least for the time being this means we have to go back to manually fixing N+1 query problems, but at least those should not cause a negative impact on availability.
-
Yorick Peterse authored
This reverts the addition of the "goldiloader" Gem and all use of it. While this Gem is very promising it's causing a variety of problems on GitLab.com due to it eager-loading too much data in places where we don't expect/can handle this. At least for the time being this means we have to go back to manually fixing N+1 query problems, but at least those should not cause a negative impact on availability.
-
🙈 jacopo beschi 🙉 authored
-
- 14 Apr, 2018 2 commits
- 09 Apr, 2018 2 commits
-
-
Sean McGivern authored
Goldiloader is great, but has several issues with has_many :through relations: * https://github.com/salsify/goldiloader/issues/12 * https://github.com/salsify/goldiloader/issues/14 * https://github.com/salsify/goldiloader/issues/18 Rather than try to figure out which applies in each case, we should just do the drudge work of manually disabling autoloading for all relations of this type. We can always use regular preloading for specific cases, but this way we avoid generating invalid queries through Goldiloader's magic.
-
Sean McGivern authored
Goldiloader is great, but has several issues with has_many :through relations: * https://github.com/salsify/goldiloader/issues/12 * https://github.com/salsify/goldiloader/issues/14 * https://github.com/salsify/goldiloader/issues/18 Rather than try to figure out which applies in each case, we should just do the drudge work of manually disabling autoloading for all relations of this type. We can always use regular preloading for specific cases, but this way we avoid generating invalid queries through Goldiloader's magic.
-
- 06 Apr, 2018 2 commits
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 21 Mar, 2018 2 commits
-
-
Douwe Maan authored
EE Port: Server Side Request Forgery in Services and Web Hooks See merge request gitlab/gitlab-ee!603
-
Douwe Maan authored
Server Side Request Forgery in Services and Web Hooks See merge request gitlab/gitlabhq!2337
-
- 08 Mar, 2018 2 commits
-
-
Gabriel Mazetto authored
-
Gabriel Mazetto authored
-
- 12 Jan, 2018 2 commits
-
-
Lin Jen-Shin authored
with StrongMemoize
-
Lin Jen-Shin authored
with StrongMemoize
-
- 11 Jan, 2018 2 commits
-
-
🙈 jacopo beschi 🙉 authored
-
Jacopo authored
Adds a Rubocop rule (with autocorrect) to ensure line break around conditionals. Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 26 Dec, 2017 2 commits
-
-
Lin Jen-Shin authored
Also try to use the same config from EE
-
Lin Jen-Shin authored
Also try to use the same config from EE
-
- 22 Dec, 2017 2 commits
-
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
Rémy Coutable authored
Signed-off-by: Rémy Coutable <remy@rymai.me>
-
- 13 Dec, 2017 2 commits
-
-
Douwe Maan authored
-
Douwe Maan authored
-
- 11 Dec, 2017 1 commit
-
-
Sean McGivern authored
remove_column should only be used in the up (or change) step of a migration if it's a post-deployment migration. Otherwise there will be downtime due to the ActiveRecord column cache, which we can avoid by using the IgnorableColumn concern in combination with a post-deployment migration.
-
- 30 Nov, 2017 1 commit
-
-
Lin Jen-Shin authored
* no-ivar-in-modules: Cache allowed_ids Fix a few layout error Make it clear that this is an acceptable use Reword Instance variables in views Move ModuleWithInstanceVariables to Gitlab namespace Explain how to disable it in the doc Just define allowed_ids and override it with empty value Updates based on feedback Remove codes from bad merge Allow initialize method and single ivar Use StrongMemoize and enable/disable cops properly WIP Fix grammar: judge -> judgement Allow simple ivar ||= form. Update accordingly Add cop to make sure we don't use ivar in a module
-
- 22 Nov, 2017 1 commit
-
-
Lin Jen-Shin authored
And use .rubocop.yml to exclude paths we don't care, rather than using the cop itself to exclude.
-
- 17 Nov, 2017 1 commit
-
-
Lin Jen-Shin authored
-