Add CI remote include parallelization
Compare changes
Related to #351250 (closed)
In preload_content
, we start executing the HTTP call in another thread.
Then, when the content
method is called, we wait for the HTTP response.
These changes are behind the FF ci_parallel_remote_includes
(#413770 (closed))
Feature.enable(:ci_parallel_remote_includes)
require 'rack'
def run(env)
puts "URL: #{env['REQUEST_URI']} started"
sleep 3
puts "URL: #{env['REQUEST_URI']} finished"
"
test:
script: echo 'hello world'
"
end
app = Proc.new do |env|
[
200,
{ "Content-Type" => "text/x-yaml" },
[run(env)]
]
end
Rack::Server.start(app: app, Port: 9292)
include:
- remote: http://0.0.0.0:9292/file1.yml
- remote: http://0.0.0.0:9292/file2.yml
- remote: http://0.0.0.0:9292/file3.yml
- remote: http://0.0.0.0:9292/file4.yml
- remote: http://0.0.0.0:9292/file5.yml
build:
script: exit 0
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.