-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Payum] infinite loop on state machine exception fixed #9931
Conversation
tautelis
commented
Nov 15, 2018
Q | A |
---|---|
Branch? | 1.0 |
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Related tickets | fixes #9928 |
License | MIT |
The base of this pull-request was changed, you need fetch and reset your local branch Unless you added new commits (to this branch) locally that you did not push yet, Feel free to ask for assistance when you get stuck 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should for sure add some PHPSpec test to cover this change.
It appeared in my notifications that the issue is stale now, so I've reminded about this PR :) of course the PHPSpec is not a point (stupid me from the December 😠), but I still wonder how can we test it to be 100% sure we're fixing a bug? The change does not seem to harm anything, but it should not be a sufficient reason to say it's definitely ok 😄 cc @tautelis @pamil @lchrusciel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it is a pretty important bug fix, I would vote for merge.
However, this class did not have any tests on it. We should think about some functional tests for this component.
Hopefully I stumbled on this, I had a Doctrine exception inside a StateMachine callback (inserting a null value into a non nullable column). Thanks @tautelis ! |
@Zales0123 speaking about tests, there is no structure to perform such test since its an edge case of system working incorrectly and throwing exceptions. It's not possible to test these exceptions with Behat or Spec. The only way would be PHPUnit Functional test which we have none. Update: sorry I was looking at 1.3 version on my project. Apparently there is one |
This really needs merging in, coverage or not. This was absolutely crippling to locate when the loop it causes means you don't even get a log in Sentry when in production mode. |
Just to add, adding the above patch indeed fixed a loop in our UAT environment and successfully the underlying cause: A doctrine error in regards to a key error in a custom table |
The base of this pull-request was changed, you need fetch and reset your local branch Unless you added new commits (to this branch) locally that you did not push yet, Feel free to ask for assistance when you get stuck 👍 |
Thanks, Vytautas! 🎉 |
Thank you both @tautelis and @pamil , with props to @CoderMaggie for the hustle |