Commit 3544bdf0 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'revert-0cec257b' into 'master'

Revert "Merge branch 'sh-include-redis-in-workhorse-test' into 'master'"

See merge request gitlab-org/gitlab!40245
parents 1b83c2cb c153ff67
---
title: Include Redis in Workhorse-in-test-suite integration
merge_request: 40026
author:
type: other
...@@ -28,26 +28,6 @@ module Gitlab ...@@ -28,26 +28,6 @@ module Gitlab
end end
# rubocop:enable Rails/Output # rubocop:enable Rails/Output
module Workhorse
extend Gitlab::SetupHelper
class << self
def configuration_toml(dir, _)
config = { redis: { URL: redis_url } }
TomlRB.dump(config)
end
def redis_url
data = YAML.load_file(Rails.root.join('config/resque.yml'))
data.dig(Rails.env, 'url')
end
def get_config_path(dir)
File.join(dir, 'config.toml')
end
end
end
module Gitaly module Gitaly
extend Gitlab::SetupHelper extend Gitlab::SetupHelper
class << self class << self
......
...@@ -247,9 +247,8 @@ module TestEnv ...@@ -247,9 +247,8 @@ module TestEnv
'GitLab Workhorse', 'GitLab Workhorse',
install_dir: workhorse_dir, install_dir: workhorse_dir,
version: Gitlab::Workhorse.version, version: Gitlab::Workhorse.version,
task: "gitlab:workhorse:install[#{install_workhorse_args}]") do task: "gitlab:workhorse:install[#{install_workhorse_args}]"
Gitlab::SetupHelper::Workhorse.create_configuration(workhorse_dir, nil) )
end
end end
def workhorse_dir def workhorse_dir
...@@ -260,14 +259,6 @@ module TestEnv ...@@ -260,14 +259,6 @@ module TestEnv
host = "[#{host}]" if host.include?(':') host = "[#{host}]" if host.include?(':')
listen_addr = [host, port].join(':') listen_addr = [host, port].join(':')
config_path = Gitlab::SetupHelper::Workhorse.get_config_path(workhorse_dir)
# This should be set up in setup_workhorse, but since
# component_needs_update? only checks that versions are consistent,
# we need to ensure the config file exists. This line can be removed
# later after a new Workhorse version is updated.
Gitlab::SetupHelper::Workhorse.create_configuration(workhorse_dir, nil) unless File.exist?(config_path)
workhorse_pid = spawn( workhorse_pid = spawn(
{ 'PATH' => "#{ENV['PATH']}:#{workhorse_dir}" }, { 'PATH' => "#{ENV['PATH']}:#{workhorse_dir}" },
File.join(workhorse_dir, 'gitlab-workhorse'), File.join(workhorse_dir, 'gitlab-workhorse'),
...@@ -275,7 +266,10 @@ module TestEnv ...@@ -275,7 +266,10 @@ module TestEnv
'-documentRoot', Rails.root.join('public').to_s, '-documentRoot', Rails.root.join('public').to_s,
'-listenAddr', listen_addr, '-listenAddr', listen_addr,
'-secretPath', Gitlab::Workhorse.secret_path.to_s, '-secretPath', Gitlab::Workhorse.secret_path.to_s,
'-config', config_path, # TODO: Needed for workhorse + redis features.
# https://gitlab.com/gitlab-org/gitlab/-/issues/209245
#
# '-config', '',
'-logFile', 'log/workhorse-test.log', '-logFile', 'log/workhorse-test.log',
'-logFormat', 'structured', '-logFormat', 'structured',
'-developmentMode' # to serve assets and rich error messages '-developmentMode' # to serve assets and rich error messages
......
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