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

ci: use bzlmod module for curl #14467

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Jul 12, 2024

Part of the work for #11485


This change is Reviewable

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.58%. Comparing base (16a443d) to head (3db9092).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #14467      +/-   ##
==========================================
- Coverage   93.59%   93.58%   -0.01%     
==========================================
  Files        2315     2316       +1     
  Lines      207140   207146       +6     
==========================================
- Hits       193871   193864       -7     
- Misses      13269    13282      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coryan coryan force-pushed the chore-use-bzlmod-module-for-curl branch from 0dc9cdd to 3db9092 Compare July 12, 2024 18:47
@coryan coryan marked this pull request as ready for review July 12, 2024 20:13
@coryan coryan requested a review from a team as a code owner July 12, 2024 20:13
@@ -41,18 +41,26 @@ extern "C" size_t CurlOnWriteData(char* ptr, size_t size, size_t nmemb,
return size * nmemb;
}

struct CurlPtrCleanup {
Copy link
Member

Choose a reason for hiding this comment

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

#include "google/cloud/internal/curl_wrappers.h"

instead of redefining. Same goes for CurlSListFreeAll.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not want to use google::cloud::internal in an example.

Copy link
Member

Choose a reason for hiding this comment

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

My mistake. I didn't notice the file.

@@ -60,13 +60,20 @@ nlohmann::json MakeChatPayload(BuildStatus const& bs) {
return nlohmann::json{{"text", std::move(text)}};
}

struct CurlPtrCleanup {
Copy link
Member

Choose a reason for hiding this comment

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

same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These do not link google::cloud::*

Copy link
Member

Choose a reason for hiding this comment

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

Ack, sorry.

Comment on lines +73 to +76
using Headers = std::unique_ptr<curl_slist, CurlSListFreeAll>;
auto const headers = Headers{curl_slist_append(nullptr, kContentType)};
using CurlHandle = std::unique_ptr<CURL, CurlPtrCleanup>;
auto curl = CurlHandle(curl_easy_init());
Copy link
Member

Choose a reason for hiding this comment

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

  auto const headers = CurlHeaders{curl_slist_append(nullptr, kContentType)};
  auto curl = CurlPtr(curl_easy_init());

Comment on lines +59 to +63
using Headers = std::unique_ptr<curl_slist, CurlSListFreeAll>;
auto const headers =
Headers{curl_slist_append(nullptr, authorization.c_str())};
using CurlHandle = std::unique_ptr<CURL, CurlPtrCleanup>;
auto curl = CurlHandle(curl_easy_init());
Copy link
Member

Choose a reason for hiding this comment

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

same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same. I do not think we should use internal types in an example.

@coryan coryan merged commit 2bef5f2 into googleapis:main Jul 15, 2024
63 checks passed
@coryan coryan deleted the chore-use-bzlmod-module-for-curl branch July 15, 2024 17:45
cuiy0006 pushed a commit to cuiy0006/google-cloud-cpp that referenced this pull request Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants