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

fix(storage): snapshotChanges should return a success snapshot #2704

Merged
merged 4 commits into from
Dec 3, 2020

Conversation

jamesdaniels
Copy link
Member

@jamesdaniels jamesdaniels commented Dec 3, 2020

Ugh this was still broken. task.snapshot and task.on('state_changed', ...) never return the "last" snapshot, have to use the promise form of task to get at it.

  • Works on tasks that are already running
  • Now emits a final success snapshot before completion
  • Emits a filterable canceled or error snapshot prior to a throw There appears to be a JS SDK bug blocking this 😢 in theory it should work in a future release
  • Added tests for canceling, pausing, and resuming

@jamesdaniels jamesdaniels changed the title fix(storage): fromTask on a running task should work as expected fix(storage): snapshotChanges should return a complete task snapshot Dec 3, 2020
@jamesdaniels jamesdaniels changed the title fix(storage): snapshotChanges should return a complete task snapshot fix(storage): snapshotChanges should return a success task snapshot Dec 3, 2020
@jamesdaniels
Copy link
Member Author

jamesdaniels commented Dec 3, 2020

It appears I'm going in circles here. I believe this is a JS SDK bug firebase/firebase-js-sdk#4158

I've put in enough work arounds to have things working decently IMO but developers still can't filter errors before they throw...

@jamesdaniels jamesdaniels changed the title fix(storage): snapshotChanges should return a success task snapshot fix(storage): snapshotChanges should return a success snapshot Dec 3, 2020
@jamesdaniels jamesdaniels merged commit 972aa85 into master Dec 3, 2020
@jamesdaniels jamesdaniels deleted the from_running_task branch December 3, 2020 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants