• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ESMCI / manage_externals / 181
86%

Build:
DEFAULT BRANCH: master
Ran 21 Aug 2018 09:24PM UTC
Jobs 5
Files 11
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
181

push

travis-ci

web-flow
Merge pull request #114 from billsacks/fix_large_output_hang

Fix hangs when a subcommand has a lot of output.
Rework execute_subprocess timeout handling to prevent hangs

The previous implementation, relying on the lower-level
subprocess.Popen, was hanging when trying to get the status of a git
repository with many changed files (see
#113). It seems that the
problem was that subprocess.Popen buffers output, and we would need to
write some extra code to periodically clear the output buffer. This
seemed tricky to get right, so I have backed up to using the
higher-level subprocess.check_output, as we did prior to
#81.

I am using a new method to detect hangs and print a useful message
(which was the point of PR #81), based on threading.Timer. I can't
figure out a way to kill the subprocess when it appears to be hanging,
but at least we can notify the user of this possible problem.

This commit brings this part of the code back to how it was prior to
d6423c6, except now we have a hang-detection timer.

As a side-benefit, it appears that this change speeds up the unit and
system tests, based on a few trial runs before and after this
change. (This is probably due to the removal of the 0.02 sec delay
associated with the previous subprocess.Popen implementation.)

User interface changes?: No

Fixes #113 (Timeout when getting status from a git repository with many changes)

Testing:
test removed: none
unit tests: pass
system tests: pass
manual testing:

(1) Tested the problem reported in #113 by putting a ton of changes in
components/clm (changing permissions on all files, and adding
about 7000 files in a testmods directory). The original hung, this
version succeeded quickly.

(2) Tested the problem reported in #79 and fixed in #81 (because this
PR undoes the changes from #81): I tested with authentication
required (on hobart, by pointing to the NGEET fates repo): I
changed the timeout to 10 seconds, ran
'manage_ex... (continued)

359 of 415 branches covered (86.51%)

Branch coverage included in aggregate %.

1079 of 1163 relevant lines covered (92.78%)

3.7 hits per line

Jobs
ID Job ID Ran Files Coverage
1 181.1 21 Aug 2018 09:24PM UTC 0
90.75
Travis Job 181.1
2 181.2 21 Aug 2018 09:24PM UTC 0
90.89
Travis Job 181.2
3 181.3 21 Aug 2018 09:24PM UTC 0
90.81
Travis Job 181.3
4 181.4 21 Aug 2018 09:24PM UTC 0
90.81
Travis Job 181.4
5 181.5 21 Aug 2018 09:25PM UTC 0
90.75
Travis Job 181.5
Source Files on build 181
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #181
  • fc5acdab on github
  • Prev Build on master (#177)
  • Next Build on master (#184)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc