-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
fix: Replace outdated HTTP request module #8282
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
Conversation
Thanks for opening this pull request!
|
This also un-depreciates |
Changes work for 99% of tests, however for some (3) tests the new request method fails. I've added |
Codecov ReportBase: 94.11% // Head: 94.07% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## alpha #8282 +/- ##
==========================================
- Coverage 94.11% 94.07% -0.04%
==========================================
Files 182 182
Lines 13775 13811 +36
==========================================
+ Hits 12964 12993 +29
- Misses 811 818 +7
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. |
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.
It would be better if we could have 1 PR per issue, because they are different in nature; one is an internal refactor and unrelated to Parse Server 6, the other is a breaking change. Could you
- create a new PR to remove the deprecation for Remove deprecation
DEPPS4
: Remove convenience method for http requestParse.Cloud.httpRequest
#8271 - after merging rebase this PR to refactor internally Replace outdated http request dependency with Node 18's
fetch
#7589
Here I am suggesting keeping I'm not quiet sure how they are seperate issues - in order to remove the old method, we need to introduce a new one so that the tests can pass (as the tests extensively use the http module) |
Issue 1 is to remove the Issue 2 is to replace http request with axios as described in #7589, which is only an internal refactor, once issue 1 is done, because it's not exposed through You could imagine that issue 2 doesn't exist, that we won't switch to axios. Issue 1 would only remove the method |
If that is the case and we are not exposing it externally - is there any real purpose in replacing the HTTP module? Adding an extra dependency with the only production use of hooks, seems a bit extraneous. We could continue to use the HTTP module for tests (and perhaps refactor / update some of the depreciated methods) but remove |
I thought so because you wrote:
And I remember we have had some issues posted by users that the |
I suggest to first remove the external method in a separate PR, and then modify this PR to replace the http lib. That may be easier than the other way around. Do you think it's a lot of work to replace the request dependency with axios internally? |
Ideally pretty much every test that uses |
Closing as Node 18 will support native |
More details in #7589 (comment) |
New Pull Request Checklist
Issue Description
Currently, Parse Server uses a custom HTTP implementation to perform request for hooks, tests, as well as
Parse.Cloud.httpRequest
Related issue: #7589
Closes: #7589
Approach
Replaces existing module with axios.
TODOs before merging