Skip to content

refactor(pubsub): use enum for exactly-once message status#5338

Merged
suzmue merged 2 commits intogoogleapis:mainfrom
suzmue:status-enum
Apr 9, 2026
Merged

refactor(pubsub): use enum for exactly-once message status#5338
suzmue merged 2 commits intogoogleapis:mainfrom
suzmue:status-enum

Conversation

@suzmue
Copy link
Copy Markdown
Contributor

@suzmue suzmue commented Apr 8, 2026

Replaces the pending and nacking booleans in ExactlyOnceInfo with a MessageStatus enum. This enforces mutual exclusivity of the states and makes the code more idiomatic.

The detailed comments explaining the lease extension behavior for each state have been preserved on the enum variants. Tests have been updated to use the new enum.

For #5252

Replaces the pending and nacking booleans in ExactlyOnceInfo with a MessageStatus enum. This enforces mutual exclusivity of the states and makes the code more idiomatic.

The detailed comments explaining the lease extension behavior for each state have been preserved on the enum variants. Tests have been updated to use the new enum.
@suzmue suzmue requested a review from a team as a code owner April 8, 2026 21:39
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Apr 8, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.78%. Comparing base (8fc99b3) to head (49afd75).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5338      +/-   ##
==========================================
+ Coverage   97.77%   97.78%   +0.01%     
==========================================
  Files         222      222              
  Lines       46113    46150      +37     
==========================================
+ Hits        45089    45130      +41     
+ Misses       1024     1020       -4     

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Copy Markdown
Member

@dbolduc dbolduc left a comment

Choose a reason for hiding this comment

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

Good idea

@suzmue suzmue enabled auto-merge (squash) April 9, 2026 17:33
@suzmue suzmue merged commit f173ee7 into googleapis:main Apr 9, 2026
36 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.

2 participants