This is an automated email from the ASF dual-hosted git repository.
assignuser pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new f28ba4459f GH-44667: [Archery] Suppress pull/push progress logs
(#44669)
f28ba4459f is described below
commit f28ba4459faf7665492fe365bcd78daf533b2702
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sat Nov 9 07:02:50 2024 +0900
GH-44667: [Archery] Suppress pull/push progress logs (#44669)
### Rationale for this change
They are useless and noisy in CI log.
### What changes are included in this PR?
Add the `--quiet` option to `docker pull`/`docker push`.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #44667
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
---
dev/archery/archery/docker/core.py | 6 +++---
dev/archery/archery/docker/tests/test_docker.py | 20 ++++++++++----------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dev/archery/archery/docker/core.py
b/dev/archery/archery/docker/core.py
index 1c486e7aae..2bc2a9939e 100644
--- a/dev/archery/archery/docker/core.py
+++ b/dev/archery/archery/docker/core.py
@@ -232,7 +232,7 @@ class DockerCompose(Command):
def pull(self, service_name, pull_leaf=True, ignore_pull_failures=True):
def _pull(service):
- args = ['pull']
+ args = ['pull', '--quiet']
if service['image'] in self.pull_memory:
return
@@ -427,9 +427,9 @@ class DockerCompose(Command):
def push(self, service_name, user=None, password=None):
def _push(service):
if self.config.using_docker:
- return self._execute_docker('push', service['image'])
+ return self._execute_docker('push', '--quiet',
service['image'])
else:
- return self._execute_compose('push', service['name'])
+ return self._execute_compose('push', '--quiet',
service['name'])
if user is not None:
try:
diff --git a/dev/archery/archery/docker/tests/test_docker.py
b/dev/archery/archery/docker/tests/test_docker.py
index 0849d1e97c..5dd4b1bcce 100644
--- a/dev/archery/archery/docker/tests/test_docker.py
+++ b/dev/archery/archery/docker/tests/test_docker.py
@@ -270,7 +270,7 @@ def test_compose_default_params_and_env(arrow_compose_path):
def test_forwarding_env_variables(arrow_compose_path):
expected_calls = [
- "pull --ignore-pull-failures conda-cpp",
+ "pull --quiet --ignore-pull-failures conda-cpp",
"build conda-cpp",
]
expected_env = PartialEnv(
@@ -290,24 +290,24 @@ def test_compose_pull(arrow_compose_path):
compose = DockerCompose(arrow_compose_path)
expected_calls = [
- "pull --ignore-pull-failures conda-cpp",
+ "pull --quiet --ignore-pull-failures conda-cpp",
]
with assert_compose_calls(compose, expected_calls):
compose.clear_pull_memory()
compose.pull('conda-cpp')
expected_calls = [
- "pull --ignore-pull-failures conda-cpp",
- "pull --ignore-pull-failures conda-python",
- "pull --ignore-pull-failures conda-python-pandas"
+ "pull --quiet --ignore-pull-failures conda-cpp",
+ "pull --quiet --ignore-pull-failures conda-python",
+ "pull --quiet --ignore-pull-failures conda-python-pandas"
]
with assert_compose_calls(compose, expected_calls):
compose.clear_pull_memory()
compose.pull('conda-python-pandas')
expected_calls = [
- "pull --ignore-pull-failures conda-cpp",
- "pull --ignore-pull-failures conda-python",
+ "pull --quiet --ignore-pull-failures conda-cpp",
+ "pull --quiet --ignore-pull-failures conda-python",
]
with assert_compose_calls(compose, expected_calls):
compose.clear_pull_memory()
@@ -316,8 +316,8 @@ def test_compose_pull(arrow_compose_path):
def test_compose_pull_params(arrow_compose_path):
expected_calls = [
- "pull --ignore-pull-failures conda-cpp",
- "pull --ignore-pull-failures conda-python",
+ "pull --quiet --ignore-pull-failures conda-cpp",
+ "pull --quiet --ignore-pull-failures conda-python",
]
compose = DockerCompose(arrow_compose_path, params=dict(UBUNTU='18.04'))
expected_env = PartialEnv(PYTHON='3.8', PANDAS='latest')
@@ -483,7 +483,7 @@ def test_compose_push(arrow_compose_path):
for image in ["conda-cpp", "conda-python", "conda-python-pandas"]:
expected_calls.append(
mock.call(["docker", "compose", f"--file={compose.config.path}",
- "push", image], check=True, env=expected_env)
+ "push", "--quiet", image], check=True, env=expected_env)
)
with assert_subprocess_calls(expected_calls):
compose.push('conda-python-pandas', user='user', password='pass')