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

Fixing BundleActions test. #1355

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fixing BundleActions test. #1355

wants to merge 2 commits into from

Conversation

berhalak
Copy link
Contributor

Context

The BundleActions test was flaky. There was a race condition in the Column Transform.
Example of failure:

(1) BundleActions should complete transform if column is added during it
NoSuchElementError: No elements match .column_name and /^A$/
https://github.com/gristlabs/grist-core/actions/runs/12370645730/job/34525062263

Proposed solution

There was a bug in the ColumnTransform finalize method. There was a race condition
as 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 can
result with different PK).

I don't know why this call was not awaited, but it definitely looks like a bug/hack that no
longer 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.

@georgegevoian georgegevoian self-requested a review December 23, 2024 15:43
Copy link
Contributor

@georgegevoian georgegevoian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @berhalak!

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