Skip to content

Use new start method for retry start in nats-server crate#1603

Open
Jarema wants to merge 1 commit into
mainfrom
fix-server-retry
Open

Use new start method for retry start in nats-server crate#1603
Jarema wants to merge 1 commit into
mainfrom
fix-server-retry

Conversation

@Jarema

@Jarema Jarema commented Jun 12, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Tomasz Pietrek tomasz@synadia.com

Signed-off-by: Tomasz Pietrek <tomasz@synadia.com>
@synadia-claude-reviewer

synadia-claude-reviewer Bot commented Jun 12, 2026

Copy link
Copy Markdown

Claude finished @Jarema's task in 53s —— View job


PR Review

  • Examine PR diff
  • Review changed code in context
  • Assess correctness, safety, and async patterns
  • Post review findings

Change summary: Single line in nats-server/src/lib.rs (test-only module) — tokio_retry::Retry::spawntokio_retry::Retry::start.

Assessment: No issues found.

The rename is correct and aligns with the tokio-retry crate's API evolution. start better reflects the semantics (returns a Future; no task is actually spawned), whereas spawn was a misleading name for the operation. The tokio-retry dependency is declared as "0.3.0" which resolves to the latest 0.3.x release (currently 0.3.2), where start is available.

The change is confined entirely to #[cfg(test)] code, so there is no impact on the public API or production paths.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cae99c6b2e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread nats-server/src/lib.rs

let retry_strategy = tokio_retry::strategy::ExponentialBackoff::from_millis(500).take(3);
let mut stream = tokio_retry::Retry::spawn(retry_strategy, || {
let mut stream = tokio_retry::Retry::start(retry_strategy, || {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Raise the tokio-retry version before calling start

This call only compiles when Cargo resolves tokio-retry to the new release that added Retry::start; the crate still declares tokio-retry = "0.3.0" in nats-server/Cargo.toml, and 0.3.0/0.3.1 expose Retry::spawn instead. Any build using an existing lockfile or minimal-version resolution within the allowed 0.3.x range will fail here, so the dependency lower bound needs to be bumped along with this API change.

Useful? React with 👍 / 👎.

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.

1 participant