This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 60a0c1c cli: Don't spam when downloading build
60a0c1c is described below
commit 60a0c1c5ab5d70ff8b9da2bf04a51262792e1b0e
Author: Alois Mahdal <amahdal(a)redhat.com>
AuthorDate: Fri Dec 13 18:42:18 2019 +0100
cli: Don't spam when downloading build
copr-cli download build uses wget without any verbosity control, which
generates roughly 10 lines per file. --no-verbose should suppress most
of the verbosity while still reporting basics and errors.
For example, my simple build 1128860 of single noarch rpm on 7 chroots,
it will generate 1834 lines. (In my simple build pipeline, this means
that the download just takes over the whole build log.) I've tested the
option (injecting wget wrapper in path) on Fedora 30 and in my case the
number of lines went down from 1834 to 182.
Merges: #1165
---
cli/copr_cli/main.py | 2 +-
cli/tests/test_cli.py | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/cli/copr_cli/main.py b/cli/copr_cli/main.py
index 35aa5f0..4f11a8c 100644
--- a/cli/copr_cli/main.py
+++ b/cli/copr_cli/main.py
@@ -481,7 +481,7 @@ class Commands(object):
sys.stderr.write("No data for build id: {} and chroot:
{}.\n".format(args.build_id, chroot.name))
continue
- cmd = ['wget', '-r', '-nH', '--no-parent',
'--reject', '"index.html*"', '-e',
'robots=off']
+ cmd = ['wget', '-r', '-nH', '--no-parent',
'--reject', '"index.html*"', '-e', 'robots=off',
'--no-verbose']
cmd.extend(['-P', os.path.join(args.dest, chroot.name)])
cmd.extend(['--cut-dirs', str(base_len + 4)])
cmd.append(chroot.result_url)
diff --git a/cli/tests/test_cli.py b/cli/tests/test_cli.py
index 4852c6e..f53e837 100644
--- a/cli/tests/test_cli.py
+++ b/cli/tests/test_cli.py
@@ -289,12 +289,14 @@ def test_download_build(config_from_file,
build_chroot_proxy_get_list, build_pro
expected_sp_call_args = [
mock.call([
'wget', '-r', '-nH', '--no-parent',
'--reject', '"index.html*"',
- '-e', 'robots=off', '-P', './epel-6-x86_64',
'--cut-dirs', '6',
+ '-e', 'robots=off', '--no-verbose', '-P',
'./epel-6-x86_64',
+ '--cut-dirs', '6',
'http://example.com/results/epel-6-x86_64/python-copr-1.50-1.fc20'
]),
mock.call([
'wget', '-r', '-nH', '--no-parent',
'--reject', '"index.html*"',
- '-e', 'robots=off', '-P', './epel-6-i386',
'--cut-dirs', '6',
+ '-e', 'robots=off', '--no-verbose', '-P',
'./epel-6-i386',
+ '--cut-dirs', '6',
'http://example.com/results/epel-6-i386/python-copr-1.50-1.fc20'
])
]
@@ -328,7 +330,8 @@ def test_download_build_select_chroot(config_from_file,
build_chroot_proxy_get_l
expected_sp_call_args = [
mock.call([
'wget', '-r', '-nH', '--no-parent',
'--reject', '"index.html*"',
- '-e', 'robots=off', '-P', u'./epel-6-x86_64',
'--cut-dirs', '6',
+ '-e', 'robots=off', '--no-verbose', '-P',
u'./epel-6-x86_64',
+ '--cut-dirs', '6',
'http://example.com/results/epel-6-x86_64/python-copr-1.50-1.fc20'
]),
]
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.