Conversation
Collaborator
Author
|
E2E failures come from #985. This PR merely surfaces the error that's already in there. |
This commit ensures the Blueprint steps will throw an error when they
fail. For now, the error is merely reported in the console. In the future,
there may be a nice UI for this.
Detecting a runPHP failure required adjusting the php_wasm.c code to return
the correct exit code. The previous method of inferring the exit code was
replaced by simply returning `EG(exit_status)` which is populated by the
zend engine.
Furthermore, this PR ships additional unit tests for some Blueprint
steps to ensure they indeed throw as expected.
## Testing instructions
This PR comes with test coverage so confirm all the tests pass in CI.
Also, apply this PR locally and visit the following URL:
http://localhost:5400/website-server/#{%22steps%22:[{%22step%22:%22runPHP%22,%20%22code%22:%22%3C?php%20no_such_fn();%22}]}
It should reveal useful error information in the console.
…ooks as priviliged users
Also, rebuild more PHP versions
da44dd9 to
4b112c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Ensures the Blueprint steps throw an error on failure. For now, the error is merely reported in the console. In the future, there may be a nice UI for this.
This PR is an addition to #605 as it prepares the Blueprint steps for the changes in the Blueprint compilation engine.
Detecting a runPHP failure required adjusting the php_wasm.c code to return the correct exit code. The previous method of inferring the exit code was replaced by simply returning
EG(exit_status)which is populated by the zend engine.Furthermore, this PR ships additional unit tests for some Blueprint steps to ensure they indeed throw as expected.
Changes description
throwOnErroroptionBasePHP.run()now accepts athrowOnErroroption that throws an error whenever PHP returns an exit code different than0:This happens in the following cases:
exit(1)This option is set to
trueby all the Blueprint steps.Remaining work
Testing instructions
This PR comes with test coverage so confirm all the tests pass in CI.
Also, apply this PR locally and visit the following URL:
http://localhost:5400/website-server/#{%22steps%22:[{%22step%22:%22runPHP%22,%20%22code%22:%22%3C?php%20no_such_fn();%22}]}
It should reveal useful error information in the console.