#2188 RFE: provide direct URL to logfile when a failure occurs
Closed: Fixed 3 years ago by mikem. Opened 4 years ago by dmalcolm.

I'm upstreaming this 10-year old RH bugzilla RFE:
https://bugzilla.redhat.com/show_bug.cgi?id=571484
Caveat: i haven't done any Koji builds recently, so please forgive me if this is out-of-date and Koji handles this better now.

Description of problem:
When a Koji build fails, it tells me that a failure occurred, the task ID that failed, and the logfile to look at.

This makes it possible to track down the failure, but it typically involves clicking around within the web URL.

Would it be possible to:
(i) give the direct URL to the log containing the error, and
(ii) directly quote the tail of the log.

For example, given this failure:

[david@brick F-12]$ make build
/usr/bin/koji  build  dist-f12-updates-candidate 'cvs://cvs.fedoraproject.org/cvs/pkgs?rpms/RunSnakeRun/F-12#RunSnakeRun-2_0_0-0_3_b4_fc12'
Created task: 2039048
Task info: http://koji.fedoraproject.org/koji/taskinfo?taskID=2039048
Watching tasks (this may be safely interrupted)...
2039048 build (dist-f12-updates-candidate, /cvs/pkgs:rpms/RunSnakeRun/F-12:RunSnakeRun-2_0_0-0_3_b4_fc12): free
2039048 build (dist-f12-updates-candidate, /cvs/pkgs:rpms/RunSnakeRun/F-12:RunSnakeRun-2_0_0-0_3_b4_fc12): free -> open (ppc03.phx2.fedoraproject.org)
  2039049 buildSRPMFromSCM (/cvs/pkgs:rpms/RunSnakeRun/F-12:RunSnakeRun-2_0_0-0_3_b4_fc12): open (ppc10.phx2.fedoraproject.org)
  2039049 buildSRPMFromSCM (/cvs/pkgs:rpms/RunSnakeRun/F-12:RunSnakeRun-2_0_0-0_3_b4_fc12): open (ppc10.phx2.fedoraproject.org) -> closed
  0 free  1 open  1 done  0 failed
  2039056 buildArch (RunSnakeRun-2.0.0-0.3.b4.fc12.src.rpm, noarch): free
  2039056 buildArch (RunSnakeRun-2.0.0-0.3.b4.fc12.src.rpm, noarch): free -> open (ppc10.phx2.fedoraproject.org)
  2039056 buildArch (RunSnakeRun-2.0.0-0.3.b4.fc12.src.rpm, noarch): open (ppc10.phx2.fedoraproject.org) -> FAILED: BuildError: error building package (arch noarch), mock exited with status 1; see build.log for more information
  0 free  1 open  1 done  1 failed
2039048 build (dist-f12-updates-candidate, /cvs/pkgs:rpms/RunSnakeRun/F-12:RunSnakeRun-2_0_0-0_3_b4_fc12): open (ppc03.phx2.fedoraproject.org) -> FAILED: BuildError: error building package (arch noarch), mock exited with status 1; see build.log for more information
  0 free  0 open  1 done  2 failed

2039048 build (dist-f12-updates-candidate, /cvs/pkgs:rpms/RunSnakeRun/F-12:RunSnakeRun-2_0_0-0_3_b4_fc12) failed
make: *** [build] Error 1

at the FAILED line, I see that task 2039056 has failed, and the error is in "build.log".

It would be nice if
1. the command-line tool automatically printed this relevant URL after (or within) the FAILED line: http://koji.fedoraproject.org/koji/getfile?taskID=2039056&name=build.log so that I can click on it to investigate (rather than going hunting through the web UI). i.e. the URL that's for the specific logfile for the specific subtask that failed.
2. Further , if the tool could quote from the tail of the relevant log, perhaps via: http://koji.fedoraproject.org/koji/getfile?taskID=2039056&name=build.log&offset=-2000

(the quoted logs above are years out-of-date, of course)

Hope this is constructive.

Version-Release number of selected component (if applicable):
koji-1.3.1-3.fc12.noarch


There are two ways. First is a watch-logs command, second one is download-logs - both takes one or more task ids as and arguments (and eventually log name, etc.) Is this something which is sufficient for you?

Metadata Update from @tkopecek:
- Custom field Size adjusted to None

3 years ago

I was just about to request this same feature but found this avoiding a dupe.

I typically employ watch-task --mine after submitting my build request via tito. Many xterms offer ctrl-click through on URLs so having this with watch-task would be useful since right now I use bookmarks and a bunch of clicking, though sometimes I do use download-logs especially if I want to grep. But I'm only now trying watch-logs --mine --follow. That might be the best way yet, but my initial impression is it awfully busy (as I'd expect) so it eats up my scroll-back history rather harshly.

So I do believe this would be useful, but maybe user knowledge is also lacking?

Metadata Update from @tkopecek:
- Issue set to the milestone: 1.23

3 years ago

Metadata Update from @tkopecek:
- Issue tagged with: testing-ready

3 years ago

Metadata Update from @mfilip:
- Issue tagged with: testing-done

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2505 Merged 3 years ago