Closed acinader closed 5 years ago
@acinader I opened https://github.com/montymxb/parse-server-test/pull/3 a while ago to run the tests against Parse Server 3.0+. @montymxb Can you take a look at it?
@dplewis well I can reproduce the fact that tests fail with parse 3 that don't fail with 2.
I have no idea what is going on. There is so much output from the tests and my phpunit experience is very limited (so far).
Also, I got an email from packagist that this package needs to be conformed to changes in github.
So, I don't have time to dig in today, but I will over the next couple of days to a) figure out how to test against 3 and have all pass b) update packagist to use github hooks or whatever is required....
@acinader we could fork @montymxb parse-server-test
to parse-community to keep it up-to-date.
ideally, we can just use docker and not maintain a repo for this. I wanna mess around with it. Not a fan of using forever for this, just too complicated and seems unnecessary off the cuff. But again, I need to get into it to see what's what.
When the tests have completed, I'd like all the scaffolding torn down.
Docker is a good idea for running the server :)
Hopefully you guys, @dplewis @flovilmart can help me get some momentum going :)?
Here's the first example of a test that passes against parse-server 2.8 but fails against master/3.13.
for this test
Here's the verbose output from 2.8
verbose: REQUEST for [POST] /parse/classes/_User: {
"authData.anonymous": null,
"username": "asdf",
"password": "********"
} method=POST, url=/parse/classes/_User, host=localhost:1337, accept=*/*, x-parse-application-id=app-id-here, x-parse-client-version=php1.4.0, x-parse-rest-api-key=rest-api-key-here, content-type=application/json, content-length=63, authData.anonymous=null, username=asdf, password=********
verbose: Raw request from cloud code current : {"authData":{"anonymous":null},"username":"asdf","ACL":{"*":{"read":true,"write":false},"qk8G4wlNIh":{"read":true,"write":true}},"createdAt":"2019-01-28T22:41:25.431Z","sessionToken":"r:38851d2707ad721b6f67d69a69643fe8","updatedAt":"2019-01-28T22:41:25.431Z","objectId":"qk8G4wlNIh"} | original : undefined
verbose: RESPONSE from [POST] /parse/classes/_User: {
"status": 201,
"response": {
"objectId": "qk8G4wlNIh",
"createdAt": "2019-01-28T22:41:25.431Z",
"sessionToken": "r:38851d2707ad721b6f67d69a69643fe8"
},
"location": "http://localhost:1337/parse/users/qk8G4wlNIh"
} status=201, objectId=qk8G4wlNIh, createdAt=2019-01-28T22:41:25.431Z, sessionToken=r:38851d2707ad721b6f67d69a69643fe8, location=http://localhost:1337/parse/users/qk8G4wlNIh
And here's the output from master:
verbose: REQUEST for [POST] /parse/classes/_User: {
"authData.anonymous": null,
"username": "asdf",
"password": "********"
} method=POST, url=/parse/classes/_User, host=localhost:1337, accept=*/*, x-parse-application-id=app-id-here, x-parse-client-version=php1.4.0, x-parse-rest-api-key=rest-api-key-here, content-type=application/json, content-length=63, authData.anonymous=null, username=asdf, password=********
error: Uncaught internal server error. Error: key authData.anonymous must not contain '.'
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:914:19)
at serializeObject (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:348:18)
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:728:17)
at serializeObject (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:348:18)
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:938:17)
at BSON.serialize (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/bson.js:63:28)
at Query.toBin (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/commands.js:143:25)
at serializeCommands (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/pool.js:1045:43)
at Pool.write (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/pool.js:1261:3)
at WireProtocol.command (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:186:12) Error: key authData.anonymous must not contain '.'
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:914:19)
at serializeObject (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:348:18)
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:728:17)
at serializeObject (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:348:18)
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:938:17)
at BSON.serialize (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/bson.js:63:28)
at Query.toBin (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/commands.js:143:25)
at serializeCommands (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/pool.js:1045:43)
at Pool.write (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/pool.js:1261:3)
at WireProtocol.command (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:186:12)
Error: key authData.anonymous must not contain '.'
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:914:19)
at serializeObject (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:348:18)
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:728:17)
at serializeObject (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:348:18)
at serializeInto (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/parser/serializer.js:938:17)
at BSON.serialize (/Users/arthur/code/parse-server-test/node_modules/bson/lib/bson/bson.js:63:28)
at Query.toBin (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/commands.js:143:25)
at serializeCommands (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/pool.js:1045:43)
at Pool.write (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/connection/pool.js:1261:3)
at WireProtocol.command (/Users/arthur/code/parse-server-test/node_modules/parse-server/node_modules/mongodb-core/lib/wireprotocol/3_2_support.js:186:12)
Smells like a regression on the server
Sent with GitHawk
regression!?! this is a job for BISECT!
5e15cc9d4c7632aea0858f3f67867872d45f71e3 is the first bad commit
commit 5e15cc9d4c7632aea0858f3f67867872d45f71e3
Author: Florent Vilmart <364568+flovilmart@users.noreply.github.com>
Date: Wed Aug 15 09:05:57 2018 -0400
* fix(package): update mongodb to version 3.1.3 (#4969)
* fix(package): update mongodb to version 3.1.3
Closes #4962
* chore(package): update lockfile
https://npm.im/greenkeeper-lockfile
:100644 100644 e8823238898363106bb89b052b6d981828a9d0df 87dfaea9d54682597649617abef45182f7484008 M package-lock.json
:100644 100644 2a6051a3bb70ab2126e33ba835e64bab9bcc1541 26e5b6cb5a5c12fbe15c3a5da5a518afbf1c083c M package.json
hmmmm. 8/15? Something is fishy here....
now let's see if i can repro on the js sdk.....
of course I can't! cause if no one could sign up for like 6 months, we'd prolly know.
in addition to which, i have had many many users sign up using our php sdk against parse-server 3+.
So this is some kind of tooling issue.....and the tooling is really hard to use anywhoo, so gonna try a different approach.
brb
@acinader not sure what's the issue, this fails when attempting to upgrade the use from anonymous, which is not supported on JS.
well, that is just one test @flovilmart there's a few dozen that fail against 3 that work against 2. I'll look at a few more to see if I can figure out what is going on.
oy.
I tried a few things on the php side to maintain the functionality of deleting the anonymous authData when a user sets her username, but I haven't found a working solution.
I introduced this issue in https://github.com/parse-community/parse-php-sdk/pull/417
So, any suggestion? I'm keen to get out a new release.
I could roll back 417 and just live with the authData.anonymous on registered users. Not sure it was causing any problems, I just noticed that the behavior was different with the ios sdk, so I was trying to conform.
I could look into implementing the authData clean up in parse-server as a back stop to the sdks handling?
oh, and if I rollback #417 then i'm down to just a small handful of tests that fail that I'll need to pursue.
now if i rollback #417 then all tests pass. (with merging #428)
ok, i think I have all tests passing. now just have to figure out what is going on with packagist.
I don't think I am going to bite off switching to docker for testing right now. @dplewis you wanna figure out how we can switch npm over from @montymxb ?
i've just been using
"parse-server-test": "dplewis/parse-server-test#1.3.8"
and i think that just merging your branch into your master and then using dplewis/parse-server-test
is just fine for now imho until we can simplyfy the testing. what do you think?
That's what I've been using, its a solution for now
@dplewis I think this is ready.
I think i've mucked up packagist a bit. we may need to go to 1.5.1 to unmuck it.
https://packagist.org/packages/parse/php-sdk
it thinks that 1.5.0 is released and it doesn't have the stuff in this branch.
my bad.
It looks good to me! I'll leave packagist to you
Codecov Report
99.15% <ø> (ø)
Continue to review full report at Codecov.