Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-02-22 01:30:33 +0300
committerRémy Coutable <remy@rymai.me>2019-02-26 14:54:31 +0300
commitc5c71299afa6282026405dd51ba32232499c6fdb (patch)
treebd4a2763eb7b495ac6924ae8e4e04b38030164ec /app/workers
parentd19331833844b8f0bab46b4a0e5f1ae43b0eab0c (diff)
Fix Etag expiration for forked projects
When a pipeline is for a forked merge request, we have to invalidate the ETag for both the target and source project pipelines. Before we were only invalidating the target project's pipeline.
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/expire_pipeline_cache_worker.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/workers/expire_pipeline_cache_worker.rb b/app/workers/expire_pipeline_cache_worker.rb
index 148384600b6..2c070d482a1 100644
--- a/app/workers/expire_pipeline_cache_worker.rb
+++ b/app/workers/expire_pipeline_cache_worker.rb
@@ -37,9 +37,9 @@ class ExpirePipelineCacheWorker
Gitlab::Routing.url_helpers.project_new_merge_request_path(project, format: :json)
end
- def each_pipelines_merge_request_path(project, pipeline)
+ def each_pipelines_merge_request_path(pipeline)
pipeline.all_merge_requests.each do |merge_request|
- path = Gitlab::Routing.url_helpers.pipelines_project_merge_request_path(project, merge_request, format: :json)
+ path = Gitlab::Routing.url_helpers.pipelines_project_merge_request_path(merge_request.target_project, merge_request, format: :json)
yield(path)
end
@@ -59,7 +59,7 @@ class ExpirePipelineCacheWorker
store.touch(project_pipeline_path(project, pipeline))
store.touch(commit_pipelines_path(project, pipeline.commit)) unless pipeline.commit.nil?
store.touch(new_merge_request_pipelines_path(project))
- each_pipelines_merge_request_path(project, pipeline) do |path|
+ each_pipelines_merge_request_path(pipeline) do |path|
store.touch(path)
end
end