Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to turn off graceful logging #306

Closed
1 task done
greg0ire opened this issue Oct 12, 2020 · 7 comments · Fixed by #313
Closed
1 task done

Add a way to turn off graceful logging #306

greg0ire opened this issue Oct 12, 2020 · 7 comments · Fixed by #313
Assignees
Labels
enhancement New feature or request

Comments

@greg0ire
Copy link

Describe the feature

I would like a way to make sure failing to install an extension fails the build

Version

  • I have checked releases, and the feature is missing in the latest patch version of v2.

Underlying issue

Not being able to figure out what is going wrong

Describe alternatives

No alternatives considered

Additional context

See confused people at sonata-project/exporter#394 (comment)

Are you willing to submit a PR?

I'm not planning to, but I guess I could.

@greg0ire greg0ire added the enhancement New feature or request label Oct 12, 2020
@shivammathur
Copy link
Owner

Extension mongodb does not support PHP 8 yet.

Workflows do not fail for failing extensions and tools to make sure setup can be cross platform as some are platform specific.

Currently you can ensure the workflows fail on a project basis by adding a step after setup-php to fail the workflow.

For example

name: Check mongodb
run: php -r "if(! extension_loaded('mongodb')) {throw new Exception('mongodb not found');}"

or fail for multiple extensions, check - #194 (comment)

@greg0ire
Copy link
Author

Ok, I see the use case, but IMO by default it should fail. It would be great to have something like this:

extensions: mongodb
mandatory_extensions: oci8,gd

If the whole point of a job is to test Oracle, and tests for Oracle are in fact skipped because the install silently failed, things are needlessly hard to troubleshoot.

@shivammathur
Copy link
Owner

I'm adding a env variable in next release, when set will change the behaviour to failing by default.

@ocean90
Copy link

ocean90 commented Oct 15, 2020

This should also apply to tools. For example the installation of deployer is current failing due to missing downloads and it took a while to understand what the issue was because the action didn't fail thus the log was collapsed by default.

@shivammathur
Copy link
Owner

@ocean90 Yes, it will work for both extensions and tools

@shivammathur
Copy link
Owner

@ocean90 @greg0ire
Now you should be able to set fail-fast: true which will fail the workflow when an extension or a tool fails to setup.

- name: Setup PHP
  uses: shivammathur/setup-php@v2
  with:
    php-version: '7,4'
    tools: deployer
  env:
    fail-fast: true

@greg0ire
Copy link
Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants