[MacPorts] #49759: fetch.type {git, bzr} hits buildbot timeout after 20 minutes without output
MacPorts
noreply at macports.org
Sat Nov 11 07:50:57 UTC 2017
#49759: fetch.type {git,bzr} hits buildbot timeout after 20 minutes without output
-------------------------+--------------------------------
Reporter: ryandesign | Owner: macports-tickets@…
Type: defect | Status: reopened
Priority: Normal | Milestone: MacPorts 2.4.0
Component: base | Version: 2.3.4
Resolution: | Keywords: buildbot
Port: |
-------------------------+--------------------------------
Changes (by ryandesign):
* status: closed => reopened
* resolution: fixed =>
Comment:
Replying to [comment:10 jmroot]:
> In [changeset:"bb55225290ccf0f6bd6f7210c27132cbb28584d2/macports-base"
bb55225/macports-base]:
> {{{
> #!ConfigurableCommitTicketReference repository="macports-base"
revision="bb55225290ccf0f6bd6f7210c27132cbb28584d2"
> Enable progress reporting for git and bzr fetch
>
> Fixes: https://trac.macports.org/ticket/49759
> }}}
This doesn't fix the problem.
For git, removing `-q` and adding `--progress` makes it output progress,
even when not using a tty, but the progress does not print newlines; it
uses linefeeds so that the progress information stays on the same line
while updating itself. But either the output is not flushed until it
prints a newline, or buildbot is looking for newlines specifically,
because buildbot will not consider it output unless it sees a newline at
least once every 20 minutes.
For bzr, adding `--verbose` does nothing to affect the output of the
checkout command, at least not that I can see; Dave Evans observed the
same in comment:ticket:49812:19. Instead, setting the environment variable
`BZR_PROGRESS_BAR=text` will cause it to print progress, even when not
using a tty, but it's the same kind of progress as git outputs, with
linefeeds instead of newlines.
`tr` can be used to turn the linefeeds into newlines, and this is what I
do in the attached patch, which is a little messy but works for me for
both bzr and git. bzr outputs progress once a second; git's output isn't
as predictable. This might be a lot of output for ports that fetch huge
amounts of data, like inkscape-devel or widelands-devel. It could be
reduced by replacing `tr -su '\r' '\n'` with a custom program that only
prints a line if it has been more than, say, 1 minute since the last line
was printed. Then again, cvs and svn checkouts print one line per file,
which can get pretty large too.
If we use `tr`, do we need to use `findBinary` to locate it?
I do not know if piping the output through `tr` or a custom program will
hide a possible error exit status from bzr or git.
I didn't check whether other vcs systems like hg need similar treatment.
--
Ticket URL: <https://trac.macports.org/ticket/49759#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list