summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2017-06-05 10:24:57 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2017-06-05 10:24:57 +0000
commit9ccb289aa10f26e418dec06c5d6cf70205560ff4 (patch)
treee4e6a8effef63d1a3143daa52cc91d6419d6a36e /lib
parent3cc5e48668caf97588241001866fd42666b2f8f0 (diff)
parent1709e5cf876cf92c939464a633ddc6858b506e4f (diff)
downloadgitlab-ce-9ccb289aa10f26e418dec06c5d6cf70205560ff4.tar.gz
Merge branch 'zj-job-view-goes-real-time' into 'master'
Initial implementation for real time job view Closes #31397 See merge request !11651
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/etag_caching/router.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/gitlab/etag_caching/router.rb b/lib/gitlab/etag_caching/router.rb
index 2f9d8bfc266..ca49eda51fb 100644
--- a/lib/gitlab/etag_caching/router.rb
+++ b/lib/gitlab/etag_caching/router.rb
@@ -9,8 +9,8 @@ module Gitlab
# - Ending in `noteable/issue/<id>/notes` for the `issue_notes` route
# - Ending in `issues/id`/realtime_changes` for the `issue_title` route
USED_IN_ROUTES = %w[noteable issue notes issues realtime_changes
- commit pipelines merge_requests new
- environments].freeze
+ commit pipelines merge_requests builds
+ new environments].freeze
RESERVED_WORDS = Gitlab::PathRegex::ILLEGAL_PROJECT_PATH_WORDS - USED_IN_ROUTES
RESERVED_WORDS_REGEX = Regexp.union(*RESERVED_WORDS.map(&Regexp.method(:escape)))
@@ -44,6 +44,10 @@ module Gitlab
'project_pipeline'
),
Gitlab::EtagCaching::Router::Route.new(
+ %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/builds/\d+\.json\z),
+ 'project_build'
+ ),
+ Gitlab::EtagCaching::Router::Route.new(
%r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/environments\.json\z),
'environments'
)