Skip to content

feat(pubsub): retries starting subscribe stream#4377

Merged
dbolduc merged 1 commit intogoogleapis:mainfrom
dbolduc:pubsub-streaming-pull-retries
Jan 24, 2026
Merged

feat(pubsub): retries starting subscribe stream#4377
dbolduc merged 1 commit intogoogleapis:mainfrom
dbolduc:pubsub-streaming-pull-retries

Conversation

@dbolduc
Copy link
Copy Markdown
Member

@dbolduc dbolduc commented Jan 24, 2026

Part of the work for #4097

Retry attempts to start a stream using default policies.

I do not have plans to let applications set custom policies, but if we need to, we can add support for custom policies later.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the Pub/Sub API. label Jan 24, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 24, 2026

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 94.94%. Comparing base (d8a069e) to head (a76eccf).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/pubsub/src/subscriber/stream.rs 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4377      +/-   ##
==========================================
+ Coverage   94.92%   94.94%   +0.01%     
==========================================
  Files         191      191              
  Lines        7234     7258      +24     
==========================================
+ Hits         6867     6891      +24     
  Misses        367      367              

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

@dbolduc dbolduc marked this pull request as ready for review January 24, 2026 22:00
@dbolduc dbolduc requested a review from a team January 24, 2026 22:00
Copy link
Copy Markdown
Collaborator

@coryan coryan left a comment

Choose a reason for hiding this comment

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

A few test nits. If this is blocking something, feel free to fix in a follow up PR.

Comment on lines +162 to +168
mockall::mock! {
#[derive(Debug)]
BackoffPolicy {}
impl BackoffPolicy for BackoffPolicy {
fn on_failure(&self, state: &RetryState) -> Duration;
}
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: we have like 5 of these by now. Time to refactor to google-cloud-test-utils ? Hmmm... Dependencies may be more complicated than we want.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Time to refactor to google-cloud-test-utils ?

Probably.

@dbolduc dbolduc merged commit cdbb7de into googleapis:main Jan 24, 2026
30 checks passed
@dbolduc dbolduc deleted the pubsub-streaming-pull-retries branch January 24, 2026 23:24
dbolduc added a commit that referenced this pull request Jan 27, 2026
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