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

Avoid infinite loop when we can't find a matching relation with conditions #24

Merged
merged 1 commit into from Nov 18, 2022

Conversation

mflasquin
Copy link
Contributor

@mflasquin mflasquin commented Oct 31, 2022

Questions Answers
Description? Avoid infinite loop when we can't find a matching relation with conditions by adding a stop conditions with 1000 retry. Add a message to explain what we can change to avoid this error. This PR does not solve completely the problem but introduce mitigation steps that should allow avoiding the problem in most cases.
Type? improvement
BC breaks? no
Deprecations? no
Fixed ticket? Fixes #12
How to test? See #12
Possible impacts? ~

On the example provided in #12 the guest entity is blocked because we try to generate guest information and we need a customer guest for that.
However in the config.yml file, we have set we need only 1 customer. In the definition of the customer entity, the customer can be a guest only with 10% chance. So if you're lucky, you have a customer and it works, if you're not lucky... it fails. This PR does not solve completely the problem but introduce mitigation steps that should allow avoiding the problem in most cases by performing retries.

image

@matks
Copy link
Contributor

matks commented Nov 15, 2022

I added some more infos as this PR context is complex

@Progi1984
Copy link

Tested. The fix fixes the bug in the issue context and doesn't change the initial behavior.

@jolelievre
Copy link
Contributor

Thanks @mflasquin and @Progi1984

@jolelievre jolelievre merged commit ff718dd into PrestaShop:master Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generating a guest step is blocked
5 participants