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

use libcurl #4891

Merged
merged 7 commits into from
Nov 17, 2022
Merged

use libcurl #4891

merged 7 commits into from
Nov 17, 2022

Conversation

cangfengzhs
Copy link
Contributor

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Description:

Use libcurl instead of invoke "/usr/bin/curl" with popen

How do you solve it?

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • N/A

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

ex. Fixed the bug .....

@cangfengzhs cangfengzhs added the ready-for-testing PR: ready for the CI test label Nov 16, 2022
@codecov-commenter
Copy link

Codecov Report

Base: 84.56% // Head: 76.95% // Decreases project coverage by -7.60% ⚠️

Coverage data is based on head (a193924) compared to base (63a63ac).
Patch coverage: 84.25% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4891      +/-   ##
==========================================
- Coverage   84.56%   76.95%   -7.61%     
==========================================
  Files        1358     1110     -248     
  Lines      136387    82178   -54209     
==========================================
- Hits       115331    63238   -52093     
+ Misses      21056    18940    -2116     
Impacted Files Coverage Δ
src/graph/executor/admin/SubmitJobExecutor.cpp 56.94% <ø> (+0.78%) ⬆️
src/graph/service/CloudAuthenticator.cpp 0.00% <0.00%> (ø)
src/kvstore/Listener.h 39.13% <ø> (ø)
src/kvstore/Part.h 100.00% <ø> (ø)
src/kvstore/raftex/RaftPart.h 100.00% <ø> (ø)
src/kvstore/wal/FileBasedWal.h 100.00% <ø> (ø)
src/meta/http/MetaHttpReplaceHostHandler.cpp 76.33% <ø> (ø)
src/meta/processors/job/JobManager.cpp 71.65% <ø> (-0.33%) ⬇️
src/graph/visitor/VidExtractVisitor.cpp 48.83% <50.00%> (-0.15%) ⬇️
src/storage/exec/UpdateNode.h 79.85% <50.00%> (ø)
... and 318 more

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@panda-sheep panda-sheep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job~

src/common/http/test/CMakeLists.txt Outdated Show resolved Hide resolved
src/common/http/test/CMakeLists.txt Show resolved Hide resolved
src/meta/CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@critical27 critical27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job

};

struct HttpResponse {
CURLcode curlCode;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CURLcode is a int not a enum? Didn't find it in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an integer and defined by libcurl

static HttpResponse post(const std::string& url,
const std::vector<std::string>& headers,
const std::string& body);
static HttpResponse delete_(const std::string& url, const std::vector<std::string>& headers);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

del? Not a big issue, up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Emm, both are OK. But I don't want to change it:)
Maybe someone who doesn't like delete_ will modify it one day.

Copy link
Contributor

@yixinglu yixinglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the libcurl included in nebula third parties? or use the local system library?

@cangfengzhs
Copy link
Contributor Author

cangfengzhs commented Nov 17, 2022

Is the libcurl included in nebula third parties? or use the local system library?

https://github.com/vesoft-inc/nebula-third-party

It's included in third-party

@Sophie-Xie Sophie-Xie merged commit d59ee99 into vesoft-inc:master Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants