Fix/snapshot polling and block directive bugs - #1413
Merged
Conversation
normalizeMarkdownBlocks left the outer scan index unchanged when a :::type directive ran off the end of the file without a closing :::, so the outer loop re-processed (and re-emitted) the last already-output line on its next iteration. Found while adding regression-test coverage for the new Collapsible Blocks feature, which had shipped without any tests.
triggerNow() fired the create-snapshot POST (which only starts an async background job and returns 202) and immediately reloaded status and the list once. If the job hadn't finished by then, the list never updated again on its own, leaving "Create backup now" looking like it silently did nothing on a busy server or large wiki. Now polls status every 800ms (giving up after 3 consecutive errors, same convention as resync.ts/restore.ts) until the job reports done before reloading the list. Found via the e2e suite: backup-restore.spec.ts's live-restore test reliably timed out waiting for the new snapshot row on a loaded machine. Verified the fix against that test directly (180s timeout -> 15.6s pass).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.