-
-
Notifications
You must be signed in to change notification settings - Fork 596
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: Saving a new Parse.Object
with an unsaved Parse.File
fails
#1662
Conversation
Fixes parse-community#1660 (Caused by passing a Parse.File into the LocalDataStore, which is unexpected)
Thanks for opening this pull request!
|
Could you add test ? |
Codecov ReportBase: 99.89% // Head: 99.89% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## alpha #1662 +/- ##
=======================================
Coverage 99.89% 99.89%
=======================================
Files 61 61
Lines 5991 5992 +1
Branches 1373 1374 +1
=======================================
+ Hits 5985 5986 +1
Misses 6 6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…ic localDataStore)
I've added the test case |
@swittk I wrote the entire LocalDatastore code myself. Can you add an integration test to replicate the issue? I might have overlooked this |
It's not a bug related to the LocalDatastore itself I think; but rather in the save() method of ParseObject which allows both Parse-SDK-JS/src/ParseObject.js Line 2371 in f27d043
But then in the Parse-SDK-JS/src/ParseObject.js Line 2494 in f27d043
I've spent the past few hours trying to get it to fail in the integration test, but it won't. The situation does occur in-browser with Parse SDK 3.5.1 and 4.0.0 though (Parse.File reaching LocalDatastore causing the crash). The test cases in (Here's an example of what my current hotfix to the problem looks like in node_modules) |
@swittk I can verify that this is an issue. Can you add this failing test to your PR and rebase?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good so far
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just waiting for the CI to pass
It seems like the CI hasn't run yet? ._. |
Now it is running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! The flaky test will be fixed shortly.
Parse.Object
with an unsaved Parse.File
fails
# [4.0.0-alpha.9](4.0.0-alpha.8...4.0.0-alpha.9) (2023-02-04) ### Bug Fixes * Saving a new `Parse.Object` with an unsaved `Parse.File` fails ([#1662](#1662)) ([16535a4](16535a4))
🎉 This change has been released in version 4.0.0-alpha.9 |
# [4.1.0-beta.1](4.0.1...4.1.0-beta.1) (2023-03-01) ### Bug Fixes * `LiveQuerySubscription.unsubscribe` resolves promise before unsubscribing completes ([#1727](#1727)) ([1c96205](1c96205)) * Node engine version upper range is <19 despite Node 19 support ([#1732](#1732)) ([febe187](febe187)) * Saving a new `Parse.Object` with an unsaved `Parse.File` fails ([#1662](#1662)) ([16535a4](16535a4)) ### Features * `LiveQueryClient.close` returns promise when WebSocket closes ([#1735](#1735)) ([979d660](979d660)) * Upgrade Node Package Manager lock file `package-lock.json` to version 2 ([#1729](#1729)) ([e993786](e993786))
🎉 This change has been released in version 4.1.0-beta.1 |
# [4.1.0-alpha.1](4.0.1...4.1.0-alpha.1) (2023-03-01) ### Bug Fixes * `LiveQuerySubscription.unsubscribe` resolves promise before unsubscribing completes ([#1727](#1727)) ([1c96205](1c96205)) * Node engine version upper range is <19 despite Node 19 support ([#1732](#1732)) ([febe187](febe187)) * Saving a new `Parse.Object` with an unsaved `Parse.File` fails ([#1662](#1662)) ([16535a4](16535a4)) ### Features * `LiveQueryClient.close` returns promise when WebSocket closes ([#1735](#1735)) ([979d660](979d660)) * Upgrade Node Package Manager lock file `package-lock.json` to version 2 ([#1729](#1729)) ([e993786](e993786))
🎉 This change has been released in version 4.1.0-alpha.1 |
# [4.1.0](4.0.1...4.1.0) (2023-05-01) ### Bug Fixes * `LiveQuerySubscription.unsubscribe` resolves promise before unsubscribing completes ([#1727](#1727)) ([1c96205](1c96205)) * Node engine version upper range is <19 despite Node 19 support ([#1732](#1732)) ([febe187](febe187)) * Saving a new `Parse.Object` with an unsaved `Parse.File` fails ([#1662](#1662)) ([16535a4](16535a4)) ### Features * `LiveQueryClient.close` returns promise when WebSocket closes ([#1735](#1735)) ([979d660](979d660)) * Upgrade Node Package Manager lock file `package-lock.json` to version 2 ([#1729](#1729)) ([e993786](e993786))
🎉 This change has been released in version 4.1.0 |
Fixes #1660 (Caused by passing a Parse.File into the LocalDataStore, which is unexpected)
New Pull Request Checklist
Issue Description
Saving a new Parse.Object with an unsaved Parse.File fails.
Closes: #1660
Approach
Checks that the object being pinned to the localDataStore is a ParseObject.