Commit Graph

42 Commits

Author SHA1 Message Date
GitLab Bot 26e466d81e Add latest changes from gitlab-org/gitlab@master 2023-12-06 15:10:41 +00:00
GitLab Bot 3396d8eca0 Add latest changes from gitlab-org/gitlab@master 2023-11-29 09:13:36 +00:00
GitLab Bot 0c6f357040 Add latest changes from gitlab-org/gitlab@master 2023-08-22 18:07:27 +00:00
GitLab Bot df52f8c8af Add latest changes from gitlab-org/gitlab@master 2023-06-02 21:10:20 +00:00
GitLab Bot d170c7eeef Add latest changes from gitlab-org/gitlab@master 2023-02-01 21:12:08 +00:00
GitLab Bot 13ddda5208 Add latest changes from gitlab-org/gitlab@master 2023-01-31 00:10:33 +00:00
GitLab Bot b53b2fbb6b Add latest changes from gitlab-org/gitlab@master 2023-01-12 00:07:21 +00:00
GitLab Bot 52b1470ada Add latest changes from gitlab-org/gitlab@master 2022-10-06 06:08:33 +00:00
GitLab Bot a16398e10f Add latest changes from gitlab-org/gitlab@master 2022-07-29 18:08:58 +00:00
GitLab Bot 93b6ee78bf Add latest changes from gitlab-org/gitlab@master 2022-07-20 15:08:38 +00:00
GitLab Bot e55fd66eae Add latest changes from gitlab-org/gitlab@master 2021-11-02 06:10:00 +00:00
GitLab Bot 840b3aceff Add latest changes from gitlab-org/gitlab@master 2021-07-03 00:06:54 +00:00
GitLab Bot 807d57c18f Add latest changes from gitlab-org/gitlab@master 2021-03-25 06:09:02 +00:00
GitLab Bot 37699393e9 Add latest changes from gitlab-org/gitlab@master 2020-11-13 15:09:24 +00:00
GitLab Bot ff06f859cd Add latest changes from gitlab-org/gitlab@master 2020-11-10 15:09:14 +00:00
GitLab Bot 2e3cbf7d89 Add latest changes from gitlab-org/gitlab@master 2019-12-12 00:07:43 +00:00
GitLab Bot 8644755363 Add latest changes from gitlab-org/gitlab@master 2019-12-01 06:06:11 +00:00
Stan Hu d93b985df0 Use self.ignored_columns += instead of =
This is to accomodate prepended modules.
2019-08-30 13:15:34 -07:00
dineshpanda fa6f19d1f8 Remove dependency on IgnorableColumn concern 2019-08-30 02:09:13 +05:30
Nick Thomas d3a3db4218 Speed up loading and filtering deploy keys and their projects
This commit changes how we eager-load projects, routes, and namespaces
required by the deploy keys endpoint, getting a 10x improvement in my
local testing.

The endpoint still doesn't scale in-general, but going from ~13 seconds
to dump a 63K result to generating the same thing in ~1.6 seconds seems
like a good improvement to me.
2019-08-05 06:42:34 -07:00
Nick Thomas ded3b7574d Stop using pluck to get deploy keys for a user 2019-08-05 06:42:33 -07:00
Semyon Pupkov def3ab2971 Fix rubocop Style/ZeroLengthPredicate 2018-09-18 14:31:17 +05:00
gfyoung 50abbd3e53 Enable frozen string in app/models/*.rb
Partially addresses #47424.
2018-07-26 16:55:41 -07:00
Yorick Peterse 6f292eaa69
Revert the addition of goldiloader
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.
2018-04-18 15:51:39 +02:00
Sean McGivern 4ef3e3491e Add cop for has_many :through without disabled autoloading
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.
2018-04-09 12:47:04 +01:00
Douwe Maan 7bca902a23 Fall back on ghost user when deploy key user is not set 2018-03-28 18:54:15 +02:00
Douwe Maan 536a47b4b7 Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3'
[10.3] Migrate `can_push` column from `keys` to `deploy_keys_project`

See merge request gitlab/gitlabhq!2276

(cherry picked from commit f6ca52d31bac350a23938e0aebf717c767b4710c)

1f2bd3c0 Backport to 10.3
2018-01-16 17:04:51 -08:00
haseeb cc2daa74d8 created services for keys 2017-09-15 15:35:24 +00:00
Yorick Peterse 8fbbf41e29
Added Cop to blacklist the use of `dependent:`
This is allowed for existing instances so we don't end up 76 offenses
right away, but for new code one should _only_ use this if they _have_
to remove non database data. Even then it's usually better to do this in
a service class as this gives you more control over how to remove the
data (e.g. in bulk).
2017-07-06 12:01:36 +02:00
Lin Jen-Shin 2489332297 Don't notify user for deploy keys, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_18517263
2016-11-18 01:23:04 +08:00
Lin Jen-Shin a9765fb47f Introduce has_access_to? so that we could reuse it
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_18439108
2016-11-16 20:31:23 +08:00
Lin Jen-Shin 71ae01fefe Add more tests and fix write to project check 2016-11-11 21:44:33 +08:00
Jeroen van Baarsen f1479b56b7
Remove the annotate gem and delete old annotations
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
2016-05-09 18:00:28 +02:00
Zeger-Jan van de Weg 47da013cf8 Annotate the models 2016-05-06 08:27:46 +02:00
Stan Hu a3157626f1 Re-annotate models 2015-05-03 13:38:27 -07:00
Douwe Maan ed097df627 Clean up code. 2015-04-03 12:28:47 +02:00
Douwe Maan edc4a56d26 Allow admin to create public deploy keys that are accessible to any project. 2015-04-03 12:23:20 +02:00
Dmitriy Zaporozhets 36f861f1b1
Re-annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-09 15:05:03 +03:00
Dmitriy Zaporozhets 8dd37afe34 Reannotate 2013-08-21 12:34:02 +03:00
Dmitriy Zaporozhets 6e35aceff2 Annotated 2013-06-19 15:40:33 +03:00
Dmitriy Zaporozhets 1882baa1aa Feature: Deploy keys between projects 2013-05-06 15:10:55 +03:00
Dmitriy Zaporozhets 543d86f351 Create DeployKey & DeployKeysProject models. Bulding many to many relation between deploy keys and projects 2013-05-06 12:26:36 +03:00