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.
Context
The
BundleActions
test was flaky. There was a race condition in the Column Transform.Example of failure:
Proposed solution
There was a bug in the
ColumnTransform
finalize method. There was a race conditionas the finalizer was sending the
RemoveAction(column)
without waiting for the result.So sometimes column was added before removing the transform column. This was causing
undo to fail (known bug in Grist, adding and removing columns in two tabs and then undoing
in one tab doesn't work, as
AddColumn
action is not idempotent, undoing and redoing canresult with different PK).
I don't know why this call was not
awaited
, but it definitely looks like a bug/hack that nolonger works properly.
Has this been tested?
I don't have a good way to reproduce it. It can be done by brute force (a while loop)
over the Bundle test, it fails reliably. The test with the loop was added and is skipped. It is
left just a documentation of the bug for later use.
I tested manually the flow, and couldn't find any new issues.