You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2022/10/26 12:11:14 UTC

[arrow] branch master updated: ARROW-18157: [Dev][Archery] "archery docker run" sets env var to None when inherited (#14501)

This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new ede0b59446 ARROW-18157: [Dev][Archery] "archery docker run" sets env var to None when inherited (#14501)
ede0b59446 is described below

commit ede0b594468b997212f599455620649925eab8fd
Author: Antoine Pitrou <an...@python.org>
AuthorDate: Wed Oct 26 14:11:04 2022 +0200

    ARROW-18157: [Dev][Archery] "archery docker run" sets env var to None when inherited (#14501)
    
    This would occur when:
    * an environment variable is set to inherited in `docker-compose.yml`
    * the variable isn't set in the calling environment
    * Archery uses `docker` instead of `docker-compose` to run the container (for example because it's a GPU job)
    
    Authored-by: Antoine Pitrou <an...@python.org>
    Signed-off-by: Antoine Pitrou <an...@python.org>
---
 dev/archery/archery/docker/core.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dev/archery/archery/docker/core.py b/dev/archery/archery/docker/core.py
index de5e6cf41c..b0e9d32552 100644
--- a/dev/archery/archery/docker/core.py
+++ b/dev/archery/archery/docker/core.py
@@ -342,7 +342,8 @@ class DockerCompose(Command):
 
             # append env variables from the compose conf
             for k, v in service.get('environment', {}).items():
-                args.extend(['-e', '{}={}'.format(k, v)])
+                if v is not None:
+                    args.extend(['-e', '{}={}'.format(k, v)])
 
             # append volumes from the compose conf
             for v in service.get('volumes', []):