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

[FW][FIX] website_sale_coupon: prevent race condition #45356

Conversation

@fw-bot
Copy link
Contributor

fw-bot commented Feb 14, 2020

2 lasts steps are:

  • Click on go to checkout
  • Ensure checkout total is correct

But the last condition was already true before landing to the checkout, thus
the last step would succeed while the page is transitionning to the checkout.

The following would happen every time:

  • Click on go to checkout
  • Last step succeed directly after the previous step click on Go to checkout
    Then, the following would happen rarely:
  • The tour is considered successful
  • The checkout page is loaded
  • Some GET requests are performed
  • The tour is killed (cookies & local storage)
  • Some other GET requests are crashing, such as:
    Error loading file http://127.0.0.1:8069/web/webclient/locale/en_US

The fix simply wait for the checkout page to be loaded as it was supposed to at
first, before checking the last step.

Forward-port of odoo/enterprise#8322

X-original-commit: odoo/enterprise@67686b6
(coupon was moved from enterprise to community in Odoo saas-12.3)

Forward-Port-Of: #45097

@robodoo robodoo added the seen 🙂 label Feb 14, 2020
@fw-bot

This comment has been minimized.

Copy link
Contributor Author

fw-bot commented Feb 14, 2020

Ping @rdeodoo, @d-fence
Cherrypicking a6073b0 of source #45097 failed

stderr:

error: could not apply a6073b0a711... [FIX] delivery: don't use deprecated `_compute`
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

2 lasts steps are:
  - Click on go to checkout
  - Ensure checkout total is correct

But the last condition was already true before landing to the checkout, thus
the last step would succeed while the page is transitionning to the checkout.

The following would happen every time:
  - Click on go to checkout
  - Last step succeed directly after the previous step click on Go to checkout
Then, the following would happen rarely:
  - The tour is considered successful
  - The checkout page is loaded
  - Some GET requests are performed
  - The tour is killed (cookies & local storage)
  - Some other GET requests are crashing, such as:
    `Error loading file http://127.0.0.1:8069/web/webclient/locale/en_US`

The fix simply wait for the checkout page to be loaded as it was supposed to at
first, before checking the last step.

Forward-port of odoo/enterprise#8322

X-original-commit: odoo/enterprise@67686b6
(coupon was moved from enterprise to community in Odoo saas-12.3)

Closes #45097
@rdeodoo rdeodoo force-pushed the odoo-dev:13.0-saas-12.3-fix-race-condition-coupon-tour-fwbot-rde-am9e-fw branch from 5eae911 to b6e9c9e Feb 14, 2020
@rdeodoo

This comment has been minimized.

Copy link
Contributor

rdeodoo commented Feb 14, 2020

_convert to _compute commit not required in 13.0, see odoo-dev@dd182c8 & odoo-dev@6a6a7e6
@robodoo r+

@robodoo robodoo closed this in 6768d87 Feb 14, 2020
@rdeodoo rdeodoo deleted the odoo-dev:13.0-saas-12.3-fix-race-condition-coupon-tour-fwbot-rde-am9e-fw branch Feb 14, 2020
@robodoo robodoo added merged 🎉 and removed merging 👷 labels Feb 14, 2020
@robodoo robodoo deployed to merge Feb 14, 2020 Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.