composer
composer copied to clipboard
Infinite runtime when requiring ext-gd php extension
Hello, I am getting infinite runetimes when I require gd in php_extensions
I have to cancel the job because each time because it will not stop running …
Here are my logs for this job:
2022-07-26T22:31:30.1388146Z ##[group]Run php-actions/composer@v6
2022-07-26T22:31:30.1388431Z with:
2022-07-26T22:31:30.1388629Z php_version: 8.1
2022-07-26T22:31:30.1388842Z php_extensions: gd
2022-07-26T22:31:30.1389034Z version: 2
2022-07-26T22:31:30.1389241Z dev: no
2022-07-26T22:31:30.1389431Z command: install
2022-07-26T22:31:30.1389639Z interaction: no
2022-07-26T22:31:30.1389825Z progress: no
2022-07-26T22:31:30.1390025Z quiet: no
2022-07-26T22:31:30.1390307Z ##[endgroup]
2022-07-26T22:31:30.1703864Z ##[group]Run bash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/330b13bbb1eadd05bbb627477c1549cd7e62e406/php-build.bash) composer \ && /home/runner/work/_actions/php-actions/composer/v6/composer-action.bash || { echo "::group::Debug output" ; cat /home/runner/work/einfach-mehr-biss/einfach-mehr-biss/output.log ; echo "::endgroup::" ; exit 1; }
2022-07-26T22:31:30.1705149Z [36;1mbash <(curl -s https://raw.githubusercontent.com/php-actions/php-build/330b13bbb1eadd05bbb627477c1549cd7e62e406/php-build.bash) composer \ && /home/runner/work/_actions/php-actions/composer/v6/composer-action.bash || { echo "::group::Debug output" ; cat /home/runner/work/einfach-mehr-biss/einfach-mehr-biss/output.log ; echo "::endgroup::" ; exit 1; }[0m
2022-07-26T22:31:30.1765997Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2022-07-26T22:31:30.1766392Z env:
2022-07-26T22:31:30.1766684Z ACTION_VERSION: 2
2022-07-26T22:31:30.1766930Z ACTION_PHP_VERSION: 8.1
2022-07-26T22:31:30.1767294Z ACTION_PHP_EXTENSIONS: gd
2022-07-26T22:31:30.1767943Z ACTION_TOKEN: ***
2022-07-26T22:31:30.1768238Z ACTION_COMMAND: install
2022-07-26T22:31:30.1768490Z ACTION_ONLY_ARGS:
2022-07-26T22:31:30.1768812Z ACTION_INTERACTION: no
2022-07-26T22:31:30.1769101Z ACTION_DEV: no
2022-07-26T22:31:30.1769329Z ACTION_PROGRESS: no
2022-07-26T22:31:30.1769624Z ACTION_QUIET: no
2022-07-26T22:31:30.1769893Z ACTION_ARGS:
2022-07-26T22:31:30.1770140Z ACTION_SSH_KEY:
2022-07-26T22:31:30.1770418Z ACTION_SSH_KEY_PUB:
2022-07-26T22:31:30.1770714Z ACTION_SSH_DOMAIN:
2022-07-26T22:31:30.1770958Z ACTION_WORKING_DIR:
2022-07-26T22:31:30.1771250Z ACTION_MEMORY_LIMIT:
2022-07-26T22:31:30.1771570Z ##[endgroup]
2022-07-26T22:31:31.1664418Z Building PHP 8.1 with extensions: gd ...
2022-07-26T22:37:56.7626754Z ##[error]The operation was canceled.
+1
I think this may have been the cause
source: https://github.com/mlocati/docker-php-extension-installer#supported-php-extensions
@diamondicq-it thanks for that. I couldn't figure out what the problem was but this seems to be it. Do you think it would be sensible to set this as part of the action, on behalf of the user, or maybe this issue can be resolved by echoing this documentation, with an example of how to set an env variable?
Does setting the env variable fix the issue for you, @peter-neumann-dev
@diamondicq-it thanks for that. I couldn't figure out what the problem was but this seems to be it. Do you think it would be sensible to set this as part of the action, on behalf of the user, or maybe this issue can be resolved by echoing this documentation, with an example of how to set an env variable?
Does setting the env variable fix the issue for you, @peter-neumann-dev
@g105b an example of how to set an env variable would be nice. Thanks.
I could try this within the next days. @diamondicq-it I think you will set this like (at least how I will try to start with)
name : Your Job Name
env:
IPE_GD_WITHOUTAVIF: 1
You can also define this per step: https://docs.github.com/en/actions/learn-github-actions/environment-variables
As @peter-neumann-dev has rightly pointed out, setting environment variables is done with the env property.
Here's the php-actions example-composer repository, used for testing this kind of thing, with a test runner where the environment variables are set, so you can see this working in situ:
https://github.com/php-actions/example-composer/blob/master/.github/workflows/ci-env.yaml
@g105b Had I said in the next few days? 😄
Since the project was delayed before we could deploy to production, it is now back on track. Today I have used it again without any issues. So with IPE_GD_WITHOUTAVIF set and without it seems to work perfect. There is no time difference whatsoever. Maybe because of latest releases …
I think we can close this issue from my perspective 🙂
Glad to hear it's working for you. Feel free to open again if you have any further issues.
Have fun!