Skip to content

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

Merged
colinmoy merged 1 commit into
googleapis:mainfrom
colinmoy:migrate-pubsub-optional
Jul 16, 2026
Merged

chore(pubsub): migrate to std::optional#16231
colinmoy merged 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 chore(pubsub): migrate to std::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 3 times, most recently 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.54839% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.27%. Comparing base (40d3ab0) to head (5d7c4a3).

Files with missing lines Patch % Lines
...cloud/pubsub/internal/subscription_session_test.cc 71.42% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16231   +/-   ##
=======================================
  Coverage   92.27%   92.27%           
=======================================
  Files        2214     2214           
  Lines      206505   206504    -1     
=======================================
+ Hits       190549   190552    +3     
+ Misses      15956    15952    -4     

☔ 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.

@product-auto-label product-auto-label Bot added the api: pubsub Issues related to the Pub/Sub API. label Jul 2, 2026
@colinmoy colinmoy force-pushed the migrate-pubsub-optional branch from 71f5499 to 00db6db Compare July 8, 2026 22:56
@colinmoy colinmoy force-pushed the migrate-pubsub-optional branch from 00db6db to 5d7c4a3 Compare July 15, 2026 21:45
@colinmoy colinmoy merged commit 2784301 into googleapis:main Jul 16, 2026
62 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants