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

opentelemetry-cpp: add version 1.16.1, 1.17.0 #25902

Merged
merged 6 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions recipes/opentelemetry-cpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
sources:
"1.17.0":
url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.17.0.tar.gz"
sha256: "13542725463f1ea106edaef078c2276065cf3da998cb1d3dcf92630daa3f64d4"
"1.16.1":
url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.16.1.tar.gz"
sha256: "b8a78bb2a3a78133dbb08bcd04342f4b1e03cb4a19079b8416d408d905fffc37"
"1.14.2":
url: "https://github.com/open-telemetry/opentelemetry-cpp/archive/v1.14.2.tar.gz"
sha256: "c7e7801c9f6228751cdb9dd4724d0f04777ed53f524c8828e73bf4c9f894e0bd"
Expand Down
11 changes: 1 addition & 10 deletions recipes/opentelemetry-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class OpenTelemetryCppConan(ConanFile):
"with_stl": [True, False],
"with_gsl": [True, False],
"with_abseil": [True, False],
"with_otlp": ["deprecated", True, False],
Copy link
Member

Choose a reason for hiding this comment

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

Removed so that the new versions don't have this from the get-go, and it's been deprecated long enough to warrant removal for old versions

"with_otlp_grpc": [True, False],
"with_otlp_http": [True, False],
"with_zipkin": [True, False],
Expand All @@ -50,7 +49,6 @@ class OpenTelemetryCppConan(ConanFile):
"with_stl": False,
"with_gsl": False,
"with_abseil": True,
"with_otlp": "deprecated",
"with_otlp_grpc": False,
"with_otlp_http": True,
"with_zipkin": True,
Expand Down Expand Up @@ -100,9 +98,6 @@ def config_options(self):
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
if self.options.with_otlp != "deprecated":
self.output.warning(f"{self.ref}:with_otlp option is deprecated, do not use anymore. "
"Please, consider with_otlp_grpc or with_otlp_http instead.")

def layout(self):
cmake_layout(self, src_folder="src")
Expand Down Expand Up @@ -195,7 +190,7 @@ def validate(self):

def build_requirements(self):
if self.options.with_otlp_grpc or self.options.with_otlp_http:
self.tool_requires("opentelemetry-proto/1.3.0")
self.tool_requires("opentelemetry-proto/1.3.2")
Copy link
Member

Choose a reason for hiding this comment

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

open-telemetry/opentelemetry-cpp#2991 changes in the documentation seem to imply that there's not need to map 1:1 unless a new version requires a minimum version, so after checking locally, old versions till compile with this, so I've simplified this @ArielGMachado, lmkwyt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without knowing much in depth about the opentelemetry-cpp's internals, what I understand from documentation (https://github.com/open-telemetry/opentelemetry-cpp/blob/main/docs/maintaining-dependencies.md) is that opentelemetry-cpp generates code from opentelemetry-proto as part of the opentelemetry-cpp build. That are protobuf specs.
Each 3rd party version that uses in opentelemetry-cpp is being indicated in the file third_party_release of each release.
When upgrading opentelemetry-proto to a newer release code can requires adjustment, so if a version requires code and a specific version of opentelemetry-proto, it is indicated in the release.
According to the (Release info v1.16.0) , was upgraded to opentelemetry-proto/1.3.1, and in the (Release info v1.17.0) was upgraded to opentelemetry-proto/1.3.2.
I made the change in the recipe according to this principle to ensure the receipe compile each version with the exact dependency version they indicate in the release and not diverge in the Conan recipe from the official version of opentelemetry-cpp project.
I hope this helps you understand the reason for the change.

self.tool_requires("protobuf/<host_version>")

if self.options.with_otlp_grpc:
Expand All @@ -212,10 +207,6 @@ def _create_cmake_module_variables(self, module_file):
""")
save(self, module_file, content)

def package_id(self):
# deprecated
del self.info.options.with_otlp

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)

Expand Down
9 changes: 0 additions & 9 deletions recipes/opentelemetry-cpp/all/test_v1_package/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions recipes/opentelemetry-cpp/all/test_v1_package/conanfile.py

This file was deleted.

4 changes: 4 additions & 0 deletions recipes/opentelemetry-cpp/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
versions:
"1.17.0":
folder: all
"1.16.1":
folder: all
"1.14.2":
folder: all
"1.12.0":
Expand Down