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

Rotate PHP runtime after runtime crash #1628

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

brandonpayton
Copy link
Member

Motivation for the change, related issues

We want Playground to be able be more resilient in the face of PHP crashes. This PR rotates the PHP runtime when a PHP runtime error is detected.

Fixes #1453

Testing Instructions (or ideally a Blueprint)

  • Added new unit test
  • CI

Copy link
Collaborator

@bgrgicak bgrgicak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me, but let's check why the e2e test is failing.

@brandonpayton
Copy link
Member Author

Looks like there is a PHP fatal in the failing e2e test. I think this PR should only rotate the runtime when the actual runtime crashes in some way. PHP fatals occur when the runtime is functioning as designed and should not count here. Time to dig into this some more...

 1) enableMultisite step should re-activate the plugins

image

@brandonpayton
Copy link
Member Author

Good news. It looks like there is a .source property on the PHP error event, and the value "php-wasm" is expected for php-wasm errors. (nice, @bgrgicak)

@brandonpayton brandonpayton force-pushed the rotate-php-runtime-after-crash branch from 2948e57 to 86d618b Compare July 23, 2024 23:35
@brandonpayton brandonpayton merged commit 093e082 into trunk Jul 23, 2024
5 checks passed
@brandonpayton brandonpayton deleted the rotate-php-runtime-after-crash branch July 23, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Rotate PHP runtime on crash so it can continue to satisfy subsequent requests
2 participants