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

Cleanup CMake makefiles for CURL usage #1916

Merged
merged 16 commits into from
Jan 17, 2023

Conversation

marcalff
Copy link
Member

@marcalff marcalff commented Jan 10, 2023

Fixes #1913

Changes

General CMake cleanup related to CURL:

  • Removed multiple find_package(CURL), used find_package(CURL) from only one place in the top level makefile,
  • Removed if(CURL_FOUND) tests, which are semantically incorrect. A given library should be compiled when there is a reason to build it, not because CURL happens to be available. This also make the build more robust in a super build, when unrelated packages can use CURL and set CURL_FOUND for unrelated reasons,
  • Fixed the W3C trace test build, which did not honor the build option,
  • Fixed the WITH_OTLP_HTTP option to be predictable,
  • Added a build option for HTTL client/server examples, there was previously no way to control the build of these artifacts.

See the CHANGELOG Important changes section for more details.

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@marcalff marcalff requested a review from a team January 10, 2023 21:53
@marcalff marcalff marked this pull request as draft January 10, 2023 21:53
Explicitly ask for OTLP_HTTP
@codecov
Copy link

codecov bot commented Jan 10, 2023

Codecov Report

Merging #1916 (8e17b6c) into main (46b16ec) will increase coverage by 0.75%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1916      +/-   ##
==========================================
+ Coverage   86.16%   86.90%   +0.75%     
==========================================
  Files         171      165       -6     
  Lines        5257     4594     -663     
==========================================
- Hits         4529     3992     -537     
+ Misses        728      602     -126     
Impacted Files Coverage Δ
sdk/src/trace/batch_span_processor.cc 90.70% <0.00%> (-0.77%) ⬇️
api/include/opentelemetry/nostd/string_view.h 97.96% <0.00%> (-0.08%) ⬇️
...ntelemetry/ext/http/client/curl/http_client_curl.h
...lemetry/ext/http/client/curl/http_operation_curl.h
...t/src/http/client/curl/http_client_factory_curl.cc
ext/src/http/client/curl/http_operation_curl.cc
...nclude/opentelemetry/ext/http/client/http_client.h
ext/src/http/client/curl/http_client_curl.cc

@marcalff marcalff marked this pull request as ready for review January 12, 2023 14:17
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

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

LGTM

@owent owent self-requested a review January 13, 2023 15:05
Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

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

Do we need also add -DWITH_EXAMPLES_HTTP=ON in at least one CI job? Or we can not ensure the http example can be compiled success.

@marcalff
Copy link
Member Author

Do we need also add -DWITH_EXAMPLES_HTTP=ON in at least one CI job? Or we can not ensure the http example can be compiled success.

Good point, looking into this.

@marcalff
Copy link
Member Author

Do we need also add -DWITH_EXAMPLES_HTTP=ON in at least one CI job? Or we can not ensure the http example can be compiled success.

Good point, looking into this.

Resolved, tests build in maintainer mode.

Copy link
Member

@lalitb lalitb left a comment

Choose a reason for hiding this comment

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

LGTM with nit comments :)

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
ext/src/CMakeLists.txt Show resolved Hide resolved
examples/CMakeLists.txt Show resolved Hide resolved
exporters/zipkin/CMakeLists.txt Show resolved Hide resolved
Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks for the fix :)

This is to force CI to rebuild in github,
stuck with no recovery in github UI.
@marcalff
Copy link
Member Author

@owent @lalitb @esigo

Thanks all for the review.
All comments addressed, now ready to merge.

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.

[BUILD] CMake calls find_package(CURL) in multiple places
4 participants