Page MenuHomeSoftware Heritage

Implement timeouts for cloning repositories
ClosedPublic

Authored by olasd on Tue, Sep 10, 5:34 PM.

Details

Summary

This is a workaround for T1962.

Test Plan

tox unittests the timeout behavior

Diff Detail

Repository
rDLDHG Mercurial loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd created this revision.Tue, Sep 10, 5:34 PM
anlambert requested changes to this revision.Tue, Sep 10, 5:51 PM

CI builds are currently failing due to the use of Process.kill method (not available in Python 3.5)

swh/loader/mercurial/loader.py
167

Process.kill has been introduced in Python 3.7

207–212

Just a nitpick, you could add the timeout unity in the debug message.

This revision now requires changes to proceed.Tue, Sep 10, 5:51 PM
olasd updated this revision to Diff 6668.Tue, Sep 10, 6:06 PM

Use process.terminate instead of process.kill (3.5-compatible)

swh/loader/mercurial/loader.py
167

*barf*

olasd updated this revision to Diff 6669.Tue, Sep 10, 6:07 PM

Show timeout unit in log message

olasd marked 2 inline comments as done.Tue, Sep 10, 6:07 PM
anlambert accepted this revision.Tue, Sep 10, 6:08 PM

Looks good to me

This revision is now accepted and ready to land.Tue, Sep 10, 6:08 PM
This revision was automatically updated to reflect the committed changes.