ROU-11926: Protecting code that is run async #1041
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is for protecting the code that is ran asynchronously in the
build
.The root cause is a concurrency race with the
render
, that was optimized in ODC and as such became faster, which caused the async code to run in a moment that the pattern is no longer built, in given conditions. Related with RPM-5839.What was happening
isDataFetched
property, which is part of an Aggregate or DataAction. Specifically, when a user navigates to another page and then returns using the browser's back button, the page state is restored, including the value ofisDataFetched
= true.build
is done asynchronously, it was being triggered when the pattern had already been destroyed causing errors in the console, and potential misbehavior.What was done
Test Steps
Checklist