Skip to content

feat: add rust job worker with retries and visibility heartbeats - #1700

Open
ferhatelmas wants to merge 4 commits into
masterfrom
ferhat/rust2
Open

ferhatelmas wants to merge 4 commits into
masterfrom
ferhat/rust2

Conversation

@ferhatelmas

Copy link
Copy Markdown
Member

What kind of change does this PR introduce?

feat

What is the current behavior?

The Rust workspace provides SQS transport primitives but has no job worker, handler dispatch, or worker-level retry policy.

What is the new behavior?

Adds a Rust job worker on top of the SQS transport:

  • add message attribute and remove per message send delay and use visibility change for retries
  • process one registered job type per queue with bounded concurrency
  • align messages with the node payload shape and attributes
  • use tenant as SQS message groups
  • a successful job is deleted and failures use configurable backoff and an optional attempt limit sends exhausted messages to a configured DLQ
  • visibility defaults to 60 seconds
  • automatic heartbeats are opt-in and require an execution timeout which signals cancellation, waits for the grace period and retries if it has to abort the handler

Additional context

Queue provisioning is separate to follow up

@ferhatelmas
ferhatelmas requested a review from a team as a code owner November 12, 2026 23:24
Copilot AI balanced review requested due to automatic review settings November 12, 2026 23:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@coveralls

coveralls commented Nov 12, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 43415171408

Coverage remained the same at 87.657%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 16099
Covered Lines: 14553
Line Coverage: 90.4%
Relevant Branches: 10216
Covered Branches: 8514
Branch Coverage: 83.34%
Branches in Coverage %: Yes
Coverage Strength: 1359.19 hits per line

💛 - Coveralls

@claude claude 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.

I reviewed this PR and didn't find any bugs. It's a large new crate with concurrency, timeout/abort and retry semantics, and it changes the public queue API, so a human look would still be worthwhile.

What was reviewed:

  • queue crate: removal of Outgoing::delay/check_send, the attribute round-trip in sqs.rs (both or neither string/binary rejected as InvalidResponse), and attribute bytes counted toward the 1 MiB per-message and per-batch limits.
  • jobs worker: dispatch, heartbeat/timeout/grace handling, retry backoff capping, DLQ copy, and the shared Node payload fixture.
  • Not done: the ElasticMQ-backed --ignored tests were not run in this review.
Extended reasoning...

The change adds about 2,000 lines in a new Rust jobs crate (worker concurrency, visibility heartbeats, execution timeout with cancel and then abort, retry/DLQ policy). It also changes the queue transport's public types and SQS send/receive paths, plus CI and a Node test. It touches no auth, crypto or permission code. CODEOWNERS assigns every path to the storage team. Its size, the async concurrency and timing semantics, and the design choices (dropping per-message delay, retrying through visibility changes) need a human reviewer.

This review covers commit 6c0d540, which is no longer the latest commit on this pull request; later commits are not covered by it.

Signed-off-by: Ferhat Elmas <[email protected]>

This branch has not been deployed

No deployments
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.

3 participants