uranusjr commented on code in PR #26951:
URL: https://github.com/apache/airflow/pull/26951#discussion_r993104861
##########
airflow/providers/docker/operators/docker.py:
##########
@@ -304,10 +311,13 @@ def _run_image_with_mounts(self, target_mounts,
add_tmp_variable: bool) -> list[
docker_log_config['max-size'] = self.log_opts_max_size
if self.log_opts_max_file is not None:
docker_log_config['max-file'] = self.log_opts_max_file
+ env_file_vars = {}
+ if self.env_file is not None:
+ env_file_vars = self.unpack_environment_variables(self.env_file)
self.container = self.cli.create_container(
command=self.format_command(self.command),
name=self.container_name,
- environment={**self.environment, **self._private_environment},
+ environment={**self.environment, **self._private_environment,
**env_file_vars},
Review Comment:
Some documentation would be needed to describe the fact that vars in
`env_var` overrides those from `environment` (And honestly I’m not sure this is
the right behaviour? Personally I’d expect the other way around, but that may
not be a universal expectation.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]