Timeout for external commands

Debexpo execute a variety of external commands for testing, qa reporting, importing or GPG manipulation.

Lintian having proven that it could hang around for a while, we've decided to introduce an timeout for all external commands. Namely:

  • Testing:
    • git storage (git)
    • building packages (dpkg-buildpackage, tar, gpg, dpkg-parsechangelog)
  • Importing
    • QA + gitstorage (dpkg-source)
  • QA reporting
    • uscan
    • lintian
    • diffstat
  • GPG
    • gpg
  • Website
    • Get debexpo version (git)

My interrogation is to how organize that within the settings? Should we:

  1. Have a default timeout and a custom one for all commands:
DEFAULT_EXECUTION_TIMEOUT = 30 * 60
EXECUTION_TIMEOUT_LINTIAN = DEFAULT_EXECUTION_TIMEOUT
EXECUTION_TIMEOUT_DPKG_SOURCE = 5 * 60
# ... and so on
  1. Have a per group timeout:
EXECUTION_TIMEOUT_QA = ...
EXECUTION_TIMEOUT_IMPORTER = ...
  1. Just have a unique timeout setting
  2. Something else?

I'm wondering if adding a timeout for all commands is overkill (over-SIGKILL?). Maybe we should do that only for QA commands? Or just non-interactive commands (includes importing, QA and GPG)?

So many questions!!

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information