GitLab steht aufgrund wichtiger Wartungsarbeiten am Montag, den 8. März, zwischen 17:00 und 19:00 Uhr nicht zur Verfügung.

Unverified Commit c5c71299 authored by Stan Hu's avatar Stan Hu Committed by Rémy Coutable

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.
parent d1933183
......@@ -37,9 +37,9 @@ def new_merge_request_pipelines_path(project)
Gitlab::Routing.url_helpers.project_new_merge_request_path(project, format: :json)
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)
......@@ -59,7 +59,7 @@ def update_etag_cache(pipeline, store)
store.touch(project_pipeline_path(project, pipeline))
store.touch(commit_pipelines_path(project, pipeline.commit)) unless pipeline.commit.nil?
each_pipelines_merge_request_path(project, pipeline) do |path|
each_pipelines_merge_request_path(pipeline) do |path|
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment