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

Ensure that saving, in the viewer, works for partially loaded documents #18254

Merged
merged 2 commits into from
Jun 16, 2024

Conversation

Snuffleupagus
Copy link
Collaborator

Currently saving a modified PDF document may fail intermittently, if it's triggered before the entire document has been downloaded.
When saving was originally added we only supported forms, and such PDF documents are usually small/simple enough for this issue to be difficult to trigger. However, with editing-support now available as well it's possible to modify much larger documents and this issue thus becomes easier to trigger.

One way to reproduce this issue consistently is to:

Currently saving a modified PDF document may fail *intermittently*, if it's triggered before the entire document has been downloaded.
When saving was originally added we only supported forms, and such PDF documents are usually small/simple enough for this issue to be difficult to trigger. However, with editing-support now available as well it's possible to modify much larger documents and this issue thus becomes easier to trigger.

One way to reproduce this issue *consistently* is to:
 - Open http://localhost:8888/web/viewer.html?file=/test/pdfs/pdf.pdf#disableHistory=true&disableStream=true&disableAutoFetch=true
 - Add an annotation on the first page, it doesn't matter what kind.
 - Save the document.
 - Open the resulting document, and notice that with the `master` branch the annotation is missing.
@Snuffleupagus Snuffleupagus added viewer editor release-blocker Blocker for the upcoming release labels Jun 15, 2024
After the previous commit this method has only a single call-site, hence we can inline the needed part of that check directly in `PDFViewerApplication.download` instead.
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/1db7cb735dfc5e1/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/99a6d174a0cfd84/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/1db7cb735dfc5e1/output.txt

Total script time: 7.58 mins

  • Integration Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/99a6d174a0cfd84/output.txt

Total script time: 17.91 mins

  • Integration Tests: Passed

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@Snuffleupagus Snuffleupagus merged commit 7b0c034 into mozilla:master Jun 16, 2024
7 checks passed
@Snuffleupagus Snuffleupagus deleted the force-save branch June 16, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor release-blocker Blocker for the upcoming release viewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants