GitLab Bot
3b1af5cc7e
Add latest changes from gitlab-org/gitlab@16-1-stable-ee
2023-06-20 10:43:29 +00:00
GitLab Bot
43a25d93eb
Add latest changes from gitlab-org/gitlab@16-0-stable-ee
2023-05-17 16:05:49 +00:00
GitLab Bot
71786ddc8e
Add latest changes from gitlab-org/gitlab@15-9-stable-ee
2023-02-20 13:49:51 +00:00
GitLab Bot
7021455bd1
Add latest changes from gitlab-org/gitlab@15-6-stable-ee
2022-11-17 11:33:21 +00:00
GitLab Bot
ee664acb35
Add latest changes from gitlab-org/gitlab@15-5-stable-ee
2022-10-20 09:40:42 +00:00
GitLab Bot
6ed4ec3e0b
Add latest changes from gitlab-org/gitlab@15-4-stable-ee
2022-09-19 23:18:09 +00:00
GitLab Bot
c46a626682
Add latest changes from gitlab-org/security/gitlab@15-3-stable-ee
2022-08-19 20:49:26 +00:00
GitLab Bot
b39512ed75
Add latest changes from gitlab-org/gitlab@15-3-stable-ee
2022-08-18 08:17:02 +00:00
GitLab Bot
d9ab72d608
Add latest changes from gitlab-org/gitlab@14-4-stable-ee
2021-10-20 08:43:02 +00:00
GitLab Bot
0653e08efd
Add latest changes from gitlab-org/gitlab@14-3-stable-ee
2021-09-20 13:18:24 +00:00
GitLab Bot
b76ae63846
Add latest changes from gitlab-org/gitlab@14-2-stable-ee
2021-08-19 09:08:42 +00:00
GitLab Bot
e8d2c25793
Add latest changes from gitlab-org/gitlab@14-1-stable-ee
2021-07-20 09:55:51 +00:00
GitLab Bot
a5f4bba440
Add latest changes from gitlab-org/gitlab@14-0-stable-ee
2021-06-16 18:25:58 +00:00
GitLab Bot
9dc93a4519
Add latest changes from gitlab-org/gitlab@13-11-stable-ee
2021-04-20 23:50:22 +00:00
GitLab Bot
85dc423f70
Add latest changes from gitlab-org/gitlab@13-4-stable-ee
2020-09-19 01:45:44 +00:00
GitLab Bot
a09983ae35
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
2020-07-20 12:26:25 +00:00
GitLab Bot
8c7f4e9d5f
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
2020-06-18 11:18:50 +00:00
GitLab Bot
ef31adeb0f
Add latest changes from gitlab-org/gitlab@master
2020-03-26 12:07:48 +00:00
GitLab Bot
8957ace315
Add latest changes from gitlab-org/gitlab@master
2020-03-14 00:09:30 +00:00
GitLab Bot
c1924b863a
Add latest changes from gitlab-org/gitlab@master
2020-01-28 21:08:56 +00:00
GitLab Bot
f155cc9034
Add latest changes from gitlab-org/gitlab@master
2019-10-16 03:06:12 +00:00
Heinrich Lee Yu
0c30052427
Use strong memoize utility
2018-11-26 17:41:41 +08:00
Heinrich Lee Yu
3b49a7948c
Prevent loading from cache if commit is nil
2018-11-26 17:41:40 +08:00
Heinrich Lee Yu
0047429a97
Cache project HEAD to prevent unnecessary Gitaly calls
2018-11-26 17:41:39 +08:00
Gabriel Mazetto
cb541aef89
Change project pipeline status cache key to follow project convention
...
Old cache key was: `projects/#{id}/pipeline_status/#{sha}`
New one is: `project:#{id}:pipeline_status:#{sha}`
This allows to delete any project related key just by scanning for:
`project:#{id}`.
2018-11-16 16:22:53 +01:00
Matija Čupić
0079fa19ce
Remove cache_sha parameter
2018-10-26 14:53:04 +02:00
Matija Čupić
dd2e91cc78
Cache pipeline status only for specific sha
2018-10-25 19:57:08 +02:00
gfyoung
e166e5747c
Enable some frozen string in lib/gitlab
...
Enable frozen string for the following files:
* lib/gitlab/auth/**/*.rb
* lib/gitlab/badge/**/*.rb
* lib/gitlab/bare_repository_import/**/*.rb
* lib/gitlab/bitbucket_import/**/*.rb
* lib/gitlab/bitbucket_server_import/**/*.rb
* lib/gitlab/cache/**/*.rb
* lib/gitlab/checks/**/*.rb
Partially addresses #47424 .
2018-10-13 02:31:31 -07:00
Michael Kozono
a54a5d9f39
Use `Gitlab::SafeRequestStore` in more places
...
Even if it doesn’t save lines of code, since people will tend to use
code they’ve seen. And `SafeRequestStore` is safer since you
don’t have to remember to check `RequestStore.active?`.
2018-09-24 12:11:27 -07:00
Lin Jen-Shin
d5c7fe29c8
Add docs for RequestCache, moved from comments
2018-06-22 18:18:42 +08:00
Lin Jen-Shin
4b30aec0aa
Allow `rake cache:clear` clearing pipeline status cache
...
* Use the correct key prefix
* Clear old cache keys
TODO:
At some point we could remove clearing old cache keys.
2018-04-10 20:57:00 +08:00
Lin Jen-Shin
9ac0c76b78
Use StrongMemoize and enable/disable cops properly
2017-11-18 01:01:53 +08:00
Lin Jen-Shin
9ae92b8caa
Add cop to make sure we don't use ivar in a module
2017-09-18 21:23:45 +08:00
Robert Speicher
260c8da060
Whitelist or fix additional `Gitlab/PublicSend` cop violations
...
An upcoming update to rubocop-gitlab-security added additional
violations.
2017-08-14 12:14:11 -04:00
Lin Jen-Shin
3922b80329
Rename the methods to make it fit with current name
2017-07-18 18:04:20 +08:00
Lin Jen-Shin
ffc5b29bd0
Follow feedback on the merge request
2017-07-18 17:48:48 +08:00
Lin Jen-Shin
76c9f071db
Update the comments for the new functionality
2017-07-18 01:30:58 +08:00
Lin Jen-Shin
aada5273fa
Use RequestStoreWrap for Commit#author
...
We also try to use instance variable to cache the result if
RequestStore is not available, so we could keep the same logic,
using the same cache key. Also introduce a way to specify method
specific cache key
2017-07-18 01:18:20 +08:00
Lin Jen-Shin
143fc48aba
Add RequestStoreWrap to cache via RequestStore
...
I don't like the idea of `RequestStore` at all, because it's just a
global state which shouldn't be used at all. But we have a number of
places calling `ProtectedBranch.protected?` and `ProtectedTag.protected?`
in a loop for the same user, project, and ref whenever we're checking
against if the jobs for a given pipeline is accessible for a given user.
This means we're effectively making N queries for the same thing over
and over.
To properly fix this, we need to change how we check the permission,
and that could be a huge work. To solve this quickly, adding a cache
layer for the given request would be quite simple to do.
We're already doing this in Commit#author, and this is extending that
idea and make it generalized.
2017-07-17 23:24:46 +08:00
Paul Charlton
cb3b4a15e6
Support multiple Redis instances based on queue type
2017-07-11 03:35:47 +00:00
Grzegorz Bizon
0430b76441
Enable Style/DotPosition Rubocop 👮
2017-06-21 13:48:12 +00:00
Bob Van Landuyt
019b06b9d2
Load a project's CI status in batch from redis
2017-04-26 12:04:22 +00:00
Bob Van Landuyt
516a405eb2
Take the ref of a pipeline into account when caching status
2017-04-07 17:24:11 +02:00
Bob Van Landuyt
02072e17ab
Rename `ProjectBuildStatus` -> `ProjectPipelineStatus`
2017-04-07 17:24:11 +02:00
Bob Van Landuyt
a6d313001a
Wrap updating of cache after pipeline transition in class method
2017-04-07 17:24:11 +02:00
Bob Van Landuyt
9082d1e046
Rename Ci::PipelineStatus -> Ci::ProjectBuildStatus
2017-04-07 17:24:11 +02:00