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

[FIX] runtime: log if willStart takes more than 3s #1633

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

aab-odoo
Copy link
Contributor

Before this commit, when willStart/willUpdateProps took more than 3s, a console.warn was done. In odoo, when a warning is logged during a test, the test fails and the build is considered as "in error".

There's a component that loads several resources (sequentially) in its onWillStart, which sometimes takes more than 3s, making builds fail non deterministically. Since a recent change (which adds another call in the problematic onWillStart), the warning gets logged quite often.

A quick fix is necessary, so we change the warn into a log, which won't make build fail.

We may consider alternatives in the future though:

  • add a parameter to onWillStart, to disable the timeout, or to specify the delay (which is 3s by default)
  • do not warn in test mode

Before this commit, when willStart/willUpdateProps took more than
3s, a console.warn was done. In odoo, when a warning is logged
during a test, the test fails and the build is considered as "in
error".

There's a component that loads several resources (sequentially) in
its onWillStart, which *sometimes* takes more than 3s, making
builds fail non deterministically. Since a recent change (which
adds another call in the problematic onWillStart), the warning gets
logged quite often.

A quick fix is necessary, so we change the warn into a log, which
won't make build fail.

We may consider alternatives in the future though:
 - add a parameter to onWillStart, to disable the timeout, or to
   specify the delay (which is 3s by default)
 - do not warn in test mode
@FrancoisGe FrancoisGe merged commit 9c2d957 into master Aug 14, 2024
3 checks passed
@FrancoisGe FrancoisGe deleted the master-remove-willstart-timeout-warn-aab branch August 14, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants