-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Direct Access to parse-server #2316
Conversation
24c55e6
to
ea33ef6
Compare
expect(pushStatus.get('status')).toBe('failed'); | ||
done(); | ||
}); | ||
}, 500); |
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.
Need to add some delay here as with DIRECT_ACCESS the status is not updated upon failure...
Closing for now as will rebase when #2346 is merged |
This sounds like a great approach. I'll be sure to review when you reopen. |
If you have time to review #2346 I can get going, I'd like to have that merge pretty soon |
@flovilmart updated the pull request. |
@andrewimm I just reopened it, and tweaked a few parts to make it nicer. |
Current coverage is 92.16% (diff: 90.83%)@@ master #2316 diff @@
==========================================
Files 100 101 +1
Lines 12282 12358 +76
Methods 1522 1542 +20
Messages 0 0
Branches 2020 2035 +15
==========================================
+ Hits 11313 11390 +77
+ Misses 969 968 -1
Partials 0 0
|
@flovilmart updated the pull request. |
ec2778d
to
3eafa04
Compare
@flovilmart updated the pull request. |
It's been a while since the last commit was reviewed and the labels show this pull request needs review. Based on the blame information for the files in this pull request we identified @acinader as a potential reviewer. Could you take a look please or cc someone with more context? |
@@ -3,55 +3,55 @@ var LoggerController = require('../src/Controllers/LoggerController').LoggerCont | |||
var FileLoggerAdapter = require('../src/Adapters/Logger/FileLoggerAdapter').FileLoggerAdapter; | |||
|
|||
describe("Cloud Code Logger", () => { |
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.
just outta curiosity, why the change here? it looks to me like you are just swapping the order of two tests? or am i missing something else...
The bot asked me to look, so I'm looking. Not really adding any value at pr's (yet), but good to read the code. My big question on this one is "why?". Would be helpful to me, though not necessarily helpful to the code review, if you could give me a use case to understand what is going on. |
query = data; | ||
} | ||
|
||
logRequest("internal"+path, method, data, {}); |
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.
add ' ' around +, or better yet, use template
ok, i reviewed it, but since i don't really understand what is going on, its only of value to me, not you ;). |
@flovilmart Are you planning on merging this soon? Looking forward to it. |
Not soon, it needs some rebase as well as fine tuning for cloud code usage. Mostly a custom UserController for the Parse SDK. |
@andrewimm if you got a minute to check that out again, see if there is anything that could be improved here. |
@flovilmart updated the pull request - view changes |
b5cc314
to
e3098fc
Compare
@flovilmart updated the pull request - view changes |
Fixes #1495 When using the DirectRestController, the sessionToken won't be created when saving a new user. |
@flovilmart I did get around to getting set up and running the alpha tag, but I haven't had a chance to run through some of the account creation, editing, cloud code, tests that I want to do. Another day or two. But no issues in my very casual testing this weekend. |
Alright that's good to hear! As long as you don't use Parse.User.currentUser() and Parse.Cloud.useMasterKey() that should be fine. On another note, the installationId for the requests are 'cloud' so we don't generate sessionTokens. I believe it should have very little effet on your code. Or maybe I should support passing installationId as a param. I'm not sure. @andrewimm what do you think? |
@acinader any update on your side? |
If this passes tests I'd be fine with skipping the experimental flag stage. We have a pretty comprehensive test suite, it would be pretty tough to make an implementation that passes tests but still has major issues. |
👍 we ran two releases through qa with alpha on our dev boxes. one with direct on and one with it off. I wanted to do @flovilmart sorry for delay. |
It's gonna be in the next release, 2.2.19, still marked as experimental until we have a better idea on how to make sure it works 💯 So you'll be able to go back to the regular release cycle with the experimental flag on |
@flovilmart So, this is in the current version as experimental. I turned on PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS on our Heroku instance and saw faster performance, but also some issues. Our app is a cloud code web app hosted on Heroku. I noticed in above comments: Why is that? We do use Parse.Cloud.useMasterKey to update Users. I can dig further if needed. |
you should not use Parse.Cloud.useMasterKey() at all. Instead use: user.save(null, {useMasterKey: true}) |
What's the status on this feature in terms of it becoming the standard? I don't see any recent Issues. Is it safe to say it's production ready? |
We need to revamp some tests but yes, we can probably make it mainline. |
This looks like a PR that would give a significant performance improvement without any breaking changes. @acinader This is feature flagged in master, but not currently further looked at and not considered save for production, right? |
I'm the wrong person to ask. I don't use it in production. @dplewis or @davimacedo might have a better idea of what is outstanding to make this the default. |
I just realized that there is a newer thread from 2019. #5442 I'll ask from there. |
This PR enables direct access to parse-server, when using the JS SDK from the current node runtime.
All API calls from the JS-SDK are router through route matching (but /functions/:functionName)
Enable that feature by setting PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS=1