-
Notifications
You must be signed in to change notification settings - Fork 132
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
Query with syntax error in history causes failed migration to snapshots #3164
Comments
Looking in the
@jameskerr traced the line numbers referenced in the stack trace above to line 84 in this code snippet from the migration to snapshots that were added in #3135:
The comment in there about "invalid syntax" is what tipped me off to the repro recipe. A heavy Zui user is almost certainly going to make syntax errors at some point, so if having those left behind in the query history is enough to trigger this bug, it seems very likely that's what happened for this user. Ultimately it seems we have at least two things to fix here:
|
I've also got a shortcut repro in Dev mode at Zui commit b61d012 that uses the attached dev-appState.json that's similar to the one I saved off in the prior comment before updating Zui Insiders. To repro:
The failed migration error messages will be visible on the console. |
After discussing with @jameskerr, we wanted to confirm if the problem would also surface if, instead of a query that has a syntax error when issued, we instead issue a valid query but then don't save it. As shown in the attached video, it looks like this does not cause the problem, as in this case when I relaunch into 1.18.1-insiders.12 the entry is still present in the Queries tab. ModifiedQuery.mp4 |
Verified in Zui Insiders release 1.18.1-insiders.14. In the first attached video I first verify the specific migration bug has been addressed. I start out by getting into the repro state in 1.18.1-insiders.3 where I've saved a good query called "Google", and then entered a query that triggers a parse error, then quit the app. After I allow the app to upgrade to 1.18.1-insiders.14 and relaunch into this version, now the migration completes successfully, as confirmed by the presence of my saved query. Verify.mp4This also happens to show a change in behavior resulting from the changes in #3135. Previously, queries with syntax errors did not show up in the History tab, but now they do. I confirmed with @jameskerr that this an expected change. If users complain about this in the future, we could expose a way to delete entries or a way to filter them out. In the second attached video I verify the changes in #3166 that will help us avoid a repeat of the kind of data loss that occurred for the user that experienced the failed migration. I start out having already installed 1.18.1-insiders.14 but have replaced the Verify-Failed-Migration.mp4This effectively means the user would be stuck until they:
Thanks @jameskerr! |
Repro is via update from Zui Insiders 1.18.1-insiders.3 to 1.18.1-insiders.12.
This issue was reported by a community zync user. In their own words:
Here's the baseline steps for a workflow that avoids the problem as shown in the first video below:
google
).Google
)Success.mp4
To trigger the failure, as shown in the video below, right after step 3 in the list above, type a query with bad syntax that causes a parse error. Now after updating to 1.18.1-insiders.12, when the app is relaunched, the Saved Query is gone.
Failure.mp4
The text was updated successfully, but these errors were encountered: