Skip to content

Create .deb packages for ydb c++ sdk and plugins.#620

Merged
Shfdis merged 17 commits into
mainfrom
deb-package
Jun 5, 2026
Merged

Create .deb packages for ydb c++ sdk and plugins.#620
Shfdis merged 17 commits into
mainfrom
deb-package

Conversation

@Shfdis
Copy link
Copy Markdown
Collaborator

@Shfdis Shfdis commented May 18, 2026

The build system was refactored to consolidate many internal static library targets. Now we have 4 aggregates:
libydb-cpp - Core SDK static library
ydb-cpp-iam - IAM credentials plugin
ydb-cpp-otel-metrics - OpenTelemetry metrics plugin
ydb-cpp-otel-tracing - OpenTelemetry tracing plugin
Implemented Debian packages as follows:
The packaging produces four development packages:
libydb-cpp-dev - Core SDK
libydb-cpp-iam-dev - IAM plugin
libydb-cpp-otel-metrics-dev - Metrics plugin
libydb-cpp-otel-tracing-dev - Tracing plugin

@robot-vibe-db
Copy link
Copy Markdown

robot-vibe-db Bot commented May 25, 2026

@Shfdis Please set up your personal token, see instructions: https://nda.ya.ru/t/dur-L1y77biDC2

Comment thread scripts/generate-debian-directory.sh Outdated
Comment thread cmake/PackSDK.cmake Outdated
Comment thread plugins/trace/otel/trace.cpp Outdated
Comment thread cmake/common.cmake
Comment thread cmake/common.cmake Outdated
Comment thread scripts/test_deb_packages.sh
Comment thread scripts/generate-debian-directory.sh
@robot-vibe-db
Copy link
Copy Markdown

robot-vibe-db Bot commented May 25, 2026

AI Review Summary

Verdict: ✅ No critical issues found

Critical issues

No critical issues found.

Other findings

  • Major | Medium: OpenTelemetry headers, static libraries, cmake configs, and pkgconfig files are bundled into the core libydb-cpp-dev package instead of the OTel plugin packages — scripts/generate-debian-directory.sh:166
  • Minor | High: Placeholder maintainer email <whoami@where> will appear in published .deb metadata — cmake/PackSDK.cmake:15, scripts/googleapis_deb/CMakeLists.txt:93
  • Minor | Medium: GetCurrentTraceparent() is a stub returning empty string; consumers may expect a valid W3C traceparent — plugins/trace/otel/trace.cpp:118
  • Minor | Medium: Generator expressions in LINK_LIBRARIES are silently skipped during package target collection, potentially dropping conditional deps — cmake/common.cmake:345
  • Minor | Medium: set_source_files_properties(... PROPERTIES COMPILE_OPTIONS ...) requires CMake 3.29, but the project targets CMake 3.5 and Ubuntu 24.04 ships 3.28 — cmake/common.cmake:326
  • Minor | Medium: libydb-cpp-dev ships vendored copies of libbase64, jwt-cpp, and picojson without documentation of the bundling — scripts/generate-debian-directory.sh:160
  • Minor | Low: Docker test scripts use --network host, granting containers full host network access — scripts/test_deb_packages.sh:18, scripts/test_dpkg_buildpackage.sh:56

This review was generated automatically. Critical issues require attention; other findings are advisory.
If this comment was useful, please give it a 👍 — it helps us improve the review bot.

@robot-vibe-db
Copy link
Copy Markdown

robot-vibe-db Bot commented May 25, 2026

Full analysis log

Analysis performed by claude, claude-opus-4-6.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces Debian (.deb) packaging for the YDB C++ SDK and its plugins, alongside build-system refactoring to consolidate many internal static libraries into four distributable aggregates (core + IAM + OTel metrics + OTel tracing). It also adds CI smoke tests and release publishing automation for the generated packages.

Changes:

  • Add CPack- and dpkg-buildpackage-based Debian packaging producing libydb-cpp-dev plus three plugin -dev packages.
  • Refactor CMake install/export logic to build and install four aggregate static libraries and componentized artifacts (including vendored deps like OTel).
  • Add Docker-based CI tests for building/installing the .deb packages and a workflow to attach them to GitHub releases.

Reviewed changes

Copilot reviewed 36 out of 37 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
third_party/README.md Documents vendored third-party dependencies and their packaging mapping.
tests/deb_package/test_project/main.cpp Minimal consumer app used to validate installed headers/libs via .deb.
tests/deb_package/test_project/CMakeLists.txt Consumer CMake project linking against exported SDK/plugin targets.
tests/deb_package/Dockerfile Container image for .deb smoke-testing the installed SDK.
scripts/test_dpkg_buildpackage.sh Dockerized validation of dpkg-buildpackage flow.
scripts/test_deb_packages.sh Dockerized smoke test for installing and building against generated .deb files.
scripts/test_copy_sources_plugins.sh Adds a script-level test ensuring plugin sources are imported correctly.
scripts/googleapis_deb/yandex-googleapis-api-common-protosConfig.cmake.in CMake package config template for the googleapis proto helper .deb.
scripts/googleapis_deb/CMakeLists.txt CMake/CPack project to build the yandex-googleapis-api-common-protos .deb.
scripts/generate-debian-directory.sh Generates debian/ metadata for source-package builds / PPAs.
README.md Adds documentation for building/installing .deb packages and release assets.
plugins/trace/otel/trace.cpp Updates OTel tracing implementation (string_view APIs + traceparent formatting).
plugins/trace/otel/CMakeLists.txt Adjusts trace plugin sources and installs public headers via component install.
plugins/trace/CMakeLists.txt Ensures trace plugin subdir participates in builds when enabled.
plugins/metrics/otel/metrics.cpp Adds wrapper caching + thread-safety improvements for gauge state; updates meter naming.
plugins/metrics/otel/CMakeLists.txt Adjusts metrics plugin sources and installs public headers via component install.
plugins/metrics/CMakeLists.txt Ensures metrics plugin subdir participates in builds when enabled.
library/cpp/logger/CMakeLists.txt Adjusts logger target linkage (global library linking).
CMakePresets.json Adds a packaging preset for building .deb artifacts under /usr/share/yandex.
CMakeLists.txt Adds aggregate-package library creation/install logic and componentized export install.
CMakeFiles/CMakeSystem.cmake Adds a generated CMake build artifact (should not be tracked).
cmake/ydb-cpp-sdk-config.cmake.in Extends config to find system googleapis package and OTel when relevant.
cmake/testing.cmake Updates OTel FetchContent pin to v1.26.0.
cmake/PackSDK.cmake Configures CPack DEB component packaging and package dependency metadata.
cmake/install.cmake Adds component-aware install helpers and header install behavior changes.
cmake/global_flags.cmake Adjusts how -fpermissive is applied for GCC on Linux.
cmake/external_libs.cmake Adds vendoring/fallback logic for base64/jwt-cpp/otel and system googleapis option.
cmake/common.cmake Adds packaging target-collection utilities and base64 SIMD flag re-application helpers.
.gitmodules Adds submodules for base64, jwt-cpp, opentelemetry-cpp (and includes api-common-protos).
.gitignore Ignores generated debian/ directory.
.github/workflows/tests.yaml Adds CI job to build and smoke-test .deb packaging.
.github/workflows/release_publish.yaml Adds workflow to build .deb packages and upload them to GitHub Releases.
.github/scripts/copy_sources.sh Ensures plugin CMakeLists are included in source-copy flow.
.github/actions/prepare_vm/action.yaml Removes VM preparation steps for base64/jwt-cpp since they’re now vendored/handled differently.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cmake/install.cmake
Comment thread plugins/metrics/otel/metrics.cpp
Comment thread scripts/test_dpkg_buildpackage.sh
Comment thread CMakeFiles/CMakeSystem.cmake
@github-actions github-actions Bot removed the SLO label Jun 4, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

🌋 SLO Test Results

🟡 2 workload(s) tested — 1 workload(s) exceeded warning thresholds

Commit: 8007e86 · View run

Workload Thresholds Duration Report
cpp-key-value-userver 🟢 OK 10m 3s 📄 Report
cpp-key-value 🟡 Warning 10m 16s 📄 Report

Threshold violations:

cpp-key-value:

  • read_retry_attempts: Value 0.07 > warning max 0

Generated by ydb-slo-action

@github-actions github-actions Bot removed the SLO label Jun 4, 2026
@Shfdis Shfdis merged commit 78fc056 into main Jun 5, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants