core: Add support for retrieving CURL error messages, handle unexpected CURL return code on macOS, and log such codes in tests (fixes #519).#517
Merged
LinZhihao-723 merged 20 commits intoAug 22, 2024
Conversation
kirkrodrigues
requested changes
Aug 15, 2024
| "Unexpected CURL error code: " + std::to_string(actual) | ||
| + "; expected: " + std::to_string(expected) | ||
| }; | ||
| FAIL(error_message); |
Member
There was a problem hiding this comment.
Based on https://curl.se/libcurl/c/libcurl-errors.html, can we also use CURLOPT_ERRORBUFFER so that we can get more details about the error (e.g., what specific HTTP error >= 400 it was)?
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
kirkrodrigues
requested changes
Aug 21, 2024
Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
NetworkReader unit tests on unexpected CURL return code.NetworkReader unit tests on unexpected CURL return code (fixes #519).
kirkrodrigues
approved these changes
Aug 22, 2024
kirkrodrigues
left a comment
Member
There was a problem hiding this comment.
For the PR title, how about:
core: Add support for retrieving CURL error messages, handle unexpected CURL return code on macOS, and log such codes in tests (fixes #519).
Member
|
Can you:
|
NetworkReader unit tests on unexpected CURL return code (fixes #519).
Member
Author
|
centOS build failed due to issue #521 which is not related to this PR. |
jackluo923
pushed a commit
to jackluo923/clp
that referenced
this pull request
Dec 4, 2024
…ed CURL return code on macOS, and log such codes in tests (fixes y-scope#519). (y-scope#517) Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
junhaoliao
pushed a commit
to junhaoliao/clp
that referenced
this pull request
May 17, 2026
…ed CURL return code on macOS, and log such codes in tests (fixes y-scope#519). (y-scope#517) Co-authored-by: kirkrodrigues <2454684+kirkrodrigues@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes #519.
In recent workflows, we found that some macOS build failed because of the unit test failures. By further investigation, it is because HTTP error code 416 is not handled as
CURL_HTTP_RETURNED_ERRORin thelibcurlversion of the GH macOS runner. The same issue won't be reproduced in ubuntu 20.04 or 22.04 even with the same version oflibcurl. Therefore, this PR adds special handling for macOS to address the failure in the unit test cases.In addition, as we were approaching the cause of the failure, we realized the CURL error message could be helpful. Therefore, we also add support for retrieving CURL error messages through the
CurlDownloadHandlerto improve the debugability of our CURL utilities. In the unit test, we add logs to print out the error messages when the CURL return code doesn't match the expected one.Validation performed