Skip to content

chore(pubsub): migrate to std::optional#16231

Open
colinmoy wants to merge 1 commit into
googleapis:mainfrom
colinmoy:migrate-pubsub-optional
Open

chore(pubsub): migrate to std::optional#16231
colinmoy wants to merge 1 commit into
googleapis:mainfrom
colinmoy:migrate-pubsub-optional

Conversation

@colinmoy

@colinmoy colinmoy commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Replacing explicit usages of absl::optional with std::optional in the PubSub Client library as part of broader modernization efforts

@colinmoy colinmoy requested review from a team as code owners July 1, 2026 21:54
@colinmoy colinmoy changed the title Migrate pubsub optional Jul 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the codebase from absl::optional to std::optional (along with std::nullopt and std::make_optional) across various files in the google/cloud/storage and google/cloud/pubsub libraries, including tests, benchmarks, and examples. It also removes the absl::optional dependency from the CMake configuration. There are no review comments, and the changes align with modern C++17 standards as outlined in the repository style guide. I have no additional feedback to provide.

@colinmoy colinmoy force-pushed the migrate-pubsub-optional branch 2 times, most recently from a86003b to 9a33136 Compare July 1, 2026 22:21
@colinmoy colinmoy force-pushed the migrate-pubsub-optional branch from 9a33136 to 77d0ae7 Compare July 1, 2026 22:33
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.24%. Comparing base (a9075b2) to head (77d0ae7).
⚠️ Report is 19 commits behind head on main.

Files with missing lines Patch % Lines
...cloud/pubsub/internal/subscription_session_test.cc 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16231      +/-   ##
==========================================
- Coverage   92.24%   92.24%   -0.01%     
==========================================
  Files        2265     2265              
  Lines      210126   210126              
==========================================
- Hits       193833   193823      -10     
- Misses      16293    16303      +10     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants