Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests #3669

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ check_resultdir ()

check_http_status ()
{
grep "HTTP/1.1 $1" "$rlRun_LOG" || {
echo "failed"
grep "HTTP/1.1 " "$rlRun_LOG"
false
grep -E "HTTP/(1.1|2) $1" "$rlRun_LOG" || {
echo "failed"
grep -E "HTTP/(1.1|2) " "$rlRun_LOG"
false
}
}

Expand Down
5 changes: 4 additions & 1 deletion cli/copr_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,10 @@ def action_download_build(self, args):
"-A", "review.json",
"-A", "rpmlint.txt",
])
cmd.append(chroot.result_url + "fedora-review")
# fedora-review url redirects to the fedora-review/ and wget2 with -A option
# doesn't follow redirects in this case
# upstream issue: TODO
cmd.append(chroot.result_url + "fedora-review/")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I honestly have no idea how to make wget2 work here...

reproducer:
try to run:

wget2 -r -nH --no-parent --reject "index.html*" -e robots=off -P /tmp/tmp3 --cut-dirs 6 https://download.copr-dev.fedorainfracloud.org/results/@copr/TEST1741895613756854978FedoraReview2/fedora-41-x86_64/02921806-hello/fedora-review

with no accept list items and it correctly redirects and downloads the files... but now if you add something that is in that files that were downloaded e.g. review.txt then it downloads nothing

[root@test-env tmp3]# wget -r -nH --no-parent --reject "index.html*" -e robots=off -P /tmp/tmp3 --cut-dirs 6 -A review.txt https://download.copr-dev.fedorainfracloud.org/results/@copr/TEST1741895613756854978FedoraReview2/fedora-41-x86_64/02921806-hello/fedora-review
HTTP ERROR response 404  [https://download.copr-dev.fedorainfracloud.org/robots.txt]
[0] Checking 'https://download.copr-dev.fedorainfracloud.org/results/@copr/TEST1741895613756854978FedoraReview2/fedora-41-x86_64/02921806-hello/fedora-review' ...
HTTP response 301  [https://download.copr-dev.fedorainfracloud.org/results/@copr/TEST1741895613756854978FedoraReview2/fedora-41-x86_64/02921806-hello/fedora-review]
/tmp/tmp3/fedora-rev 100% [=========================================================================================================================================================================================================================================>]     404     --.-KB/s

                          [Files: 0  Bytes: 158  [934 B/s] Redirects: 1  Todo: 0  Errors: 1                                                                                                                                                                          ]
[root@test-env tmp3]# ls
[root@test-env tmp3]#

any ideas how to make it work? I think I am using it right... in that case I'll create upstream issue for wget2


cmd.append(chroot.result_url)
subprocess.call(cmd)
Expand Down