Revert "rename setting"

This reverts commit 0b97cd49e8.
This commit is contained in:
Arthur Passos 2023-10-02 18:26:31 -03:00
parent 0b97cd49e8
commit 9695bf5db9
2 changed files with 304 additions and 304 deletions

View File

@ -1536,7 +1536,7 @@ class ClickHouseCluster:
allow_analyzer=True,
hostname=None,
env_variables=None,
instance_env_variables=False,
exclusive_env_variables=False,
image="clickhouse/integration-test",
tag=None,
stay_alive=False,
@ -1646,7 +1646,7 @@ class ClickHouseCluster:
copy_common_configs=copy_common_configs,
hostname=hostname,
env_variables=env_variables,
instance_env_variables=instance_env_variables,
exclusive_env_variables=exclusive_env_variables,
image=image,
tag=tag,
stay_alive=stay_alive,
@ -3187,7 +3187,7 @@ class ClickHouseInstance:
copy_common_configs=True,
hostname=None,
env_variables=None,
instance_env_variables=False,
exclusive_env_variables=False,
image="clickhouse/integration-test",
tag="latest",
stay_alive=False,
@ -3277,7 +3277,7 @@ class ClickHouseInstance:
self.path = p.join(self.cluster.instances_dir, name)
self.docker_compose_path = p.join(self.path, "docker-compose.yml")
self.env_variables = env_variables or {}
self.instance_env_variables = instance_env_variables
self.exclusive_env_variables = exclusive_env_variables
self.env_file = self.cluster.env_file
if with_odbc_drivers:
self.odbc_ini_path = self.path + "/odbc.ini:/etc/odbc.ini"
@ -4396,7 +4396,7 @@ class ClickHouseInstance:
# In case the environment variables are exclusive, we don't want it to be in the cluster's env file.
# Instead, a separate env file will be created for the instance and needs to be filled with cluster's env variables.
if self.instance_env_variables is True:
if self.exclusive_env_variables is True:
self.env_variables.update(self.cluster.env_variables)
else:
self.cluster.env_variables.update(self.env_variables)
@ -4474,9 +4474,9 @@ class ClickHouseInstance:
# The current implementation of `self.env_variables` is not exclusive. Meaning the variables
# are shared with all nodes within the same cluster, even if it is specified for a single node.
# In order not to break the existing tests, the `self.instance_env_variables` option was added as a workaround.
# IMHO, it would be better to make `self.env_variables` exclusive by defaultand remove the `self.instance_env_variables` option.
if self.instance_env_variables:
# In order not to break the existing tests, the `self.exclusive_env_variables` option was added as a workaround.
# IMHO, it would be better to make `self.env_variables` exclusive by defaultand remove the `self.exclusive_env_variables` option.
if self.exclusive_env_variables:
self.env_file = p.abspath(p.join(self.path, ".env"))
_create_env_file(self.env_file, self.env_variables)

View File

@ -32,7 +32,7 @@ def cluster():
env_variables={
"http_proxy": "http://proxy1",
},
instance_env_variables=True,
exclusive_env_variables=True,
)
logging.info("Starting cluster...")