Skip to content

feat(cpp): Add bazel building and testing infrastructure#2785

Merged
hubcio merged 7 commits intoapache:masterfrom
slbotbm:cpp-infra
Mar 3, 2026
Merged

feat(cpp): Add bazel building and testing infrastructure#2785
hubcio merged 7 commits intoapache:masterfrom
slbotbm:cpp-infra

Conversation

@slbotbm
Copy link
Copy Markdown
Contributor

@slbotbm slbotbm commented Feb 19, 2026

Which issue does this PR close?

Closes #2762

Rationale

What changed?

Adds bazel build system + stub classes and their tests + ci scripts

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

If AI tools were used, please answer:

  1. Which tools? codex
  2. Scope of usage? build system implementation
  3. How did you verify the generated code works correctly? checking on local environment
  4. Can you explain every line of the code if asked? Yes

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.52%. Comparing base (2eefbc3) to head (9bed620).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2785      +/-   ##
============================================
- Coverage     67.53%   67.52%   -0.01%     
  Complexity      739      739              
============================================
  Files          1048     1048              
  Lines         84103    84103              
  Branches      60704    60716      +12     
============================================
- Hits          56795    56791       -4     
+ Misses        24950    24944       -6     
- Partials       2358     2368      +10     
Flag Coverage Δ
csharp 67.06% <ø> (-0.19%) ⬇️
go 6.33% <ø> (ø)
java 54.83% <ø> (ø)
node 92.26% <ø> (-0.07%) ⬇️
python 0.00% <ø> (ø)
rust 69.71% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@atharvalade
Copy link
Copy Markdown
Contributor

Nice work on the infra setup. the CI integration and Bazel config are clean.

Two things to fix before merge though: the Expiry class in iggy.hpp has all its getters (expiry_type(), expiry_value(), value()) under private: unlike the other three classes, so it's completely opaque after construction (and the test can only SUCCEED() without asserting anything). Also, the genrule srcs hard-codes just src/lib.rs as soon as a second .rs file is added, Bazel won't detect changes to it and will serve stale cached builds. Swapping to glob(["src/**/*.rs"]) should fix that.

@slbotbm
Copy link
Copy Markdown
Contributor Author

slbotbm commented Feb 24, 2026

@atharvalade thanks for the review! those were some things that had been left over from when I was experimenting with the public interface. I've standardized all of the getter functions and corrected the bazel build file as well.

Comment thread .github/actions/cpp-bazel/pre-merge/action.yml Outdated
Comment thread foreign/cpp/include/iggy.hpp Outdated
Comment thread foreign/cpp/include/iggy.hpp Outdated
Comment thread foreign/cpp/include/iggy.hpp Outdated
Comment thread foreign/cpp/BUILD.bazel Outdated
Comment thread foreign/cpp/include/iggy.hpp Outdated
Comment thread foreign/cpp/MODULE.bazel Outdated
Comment thread foreign/cpp/Cargo.toml Outdated
Comment thread foreign/cpp/include/iggy.hpp
Comment thread foreign/cpp/.bazelrc
@slbotbm
Copy link
Copy Markdown
Contributor Author

slbotbm commented Feb 27, 2026

@hubcio Thanks for the review. I'll address the other two comments after thinking about the best approach

Comment thread .github/actions/cpp-bazel/pre-merge/action.yml Outdated
@hubcio hubcio merged commit 88f43f5 into apache:master Mar 3, 2026
74 checks passed
kriti-sc pushed a commit to kriti-sc/iggy that referenced this pull request Mar 6, 2026
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.

[C++ SDK] Create build system + CI infrastructure

4 participants