liip/RMT

How to increase command timeout

core23 opened this issue · 1 comments

I have a problem when RMT tries to execute the composer update command:

In Process.php line 1236:

  [Symfony\Component\Process\Exception\ProcessTimedOutException]
  The process "composer update" exceeded the timeout of 60 seconds.

So how can I increase the timeout for a command?

My .rmt.yml config:

vcs: git

prerequisites:
    - working-copy-check
    - display-last-changes
    - composer-json-check:
          composer: composer
    - command:
          cmd: composer update
    - tests-check:
          command: vendor/bin/phpunit --stop-on-failure
    - command:
          cmd: vendor/bin/phpstan analyse -c phpstan.neon -l 7 src tests
    - command:
          cmd: vendor/bin/php-cs-fixer fix --verbose
    - composer-security-check
    - composer-stability-check
    - command:
          cmd: vendor/bin/composer-require-checker check composer.json
          stop_on_error: false
    - command:
          cmd: git remote -v

pre-release-actions:
    composer-update: ~
    changelog-update:
        format: simple
        dump-commits: true
        exclude-merge-commits: true
    vcs-commit: ~

version-generator: semantic
version-persister: vcs-tag

This seems to be an issue with Symfony/Process that have a hardcoded value of 60 seconds. See https://symfony.com/doc/current/components/process.html#process-timeout

Should be easy to allow changing this value with

$process->setTimeout(3600);

This fix have to be done here: https://github.com/liip/RMT/blob/master/src/Liip/RMT/Action/CommandAction.php#L53, using a new option define here https://github.com/liip/RMT/blob/master/src/Liip/RMT/Action/CommandAction.php#L28

Will be happy to merge a PR if you have time to provide it ;)

Thanks