Extract worker_api from restate-core into restate-worker-api crate#4630
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 369421bbd8
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| impl<K, V, S> NetSerde for HashMap<K, V, S> | ||
| where | ||
| K: NetSerde, | ||
| V: NetSerde, | ||
| { |
There was a problem hiding this comment.
Restore NetSerde support for std::collections::HashMap
NetSerde is now implemented for crate::hash::HashMap (hashbrown) instead of std::collections::HashMap, which narrows supported field types compared to the previous implementation in restate-encoding. Any #[derive(NetSerde)] type that still uses std::collections::HashMap will fail trait bounds after this change, and this refactor’s test updates already had to switch map imports to compensate. Keeping an impl for the standard map type preserves existing NetSerde behavior and avoids forcing unrelated type migrations.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
In a future PR, std::collections::HashMap will be banned by clippy, currently NetSerde's use of hashmap is only needed for a test-case which I've refactored.
Test Results 5 files - 3 5 suites - 3 2m 12s ⏱️ - 3m 3s Results for commit 2c990df. ± Comparison against base commit a4c8893. This pull request removes 51 and adds 41 tests. Note that renamed tests count towards both. |
Test Results 5 files - 3 5 suites - 3 2m 1s ⏱️ - 3m 14s Results for commit 2c990df. ± Comparison against base commit a4c8893. This pull request removes 51 and adds 33 tests. Note that renamed tests count towards both. |
Test Results 5 files - 2 5 suites - 2 2m 3s ⏱️ -43s Results for commit 1333dfe. ± Comparison against base commit a4c8893. This pull request removes 45 and adds 33 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Part of the effort to decompose the restate-types monolith into focused, composable utility crates. Add `restate-platform` as a low-dependency foundation crate that provides key type aliases, traits, and essential types the rest of the project can reliably depend upon. It sits at the bottom of the dependency graph with minimal transitive dependencies. Moves the following into restate-platform: - Error traits (GenericError, CodedError) from restate-types - Storage traits (StorageEncode, StorageDecode) from restate-types - Network marker trait (NetSerde) from restate-encoding - Memory estimation trait (EstimatedMemorySize) from restate-memory - Hash re-exports (HashMap, HashSet) for consistent hashing - Sync utilities (OwnedSemaphorePermit)
Move the worker_api module out of restate-core into its own dedicated crate to reduce coupling and improve modularity. The new restate-worker-api crate contains ProcessorsManagerHandle, ProcessorsManagerCommand, and PartitionProcessorInvocationClient with all associated error types. As part of the extraction, replaced assert2::let_assert! with idiomatic let...else patterns, removing the assert2 dependency from the new crate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the worker_api module out of restate-core into its own dedicated
crate to reduce coupling and improve modularity. The new restate-worker-api
crate contains ProcessorsManagerHandle, ProcessorsManagerCommand, and
PartitionProcessorInvocationClient with all associated error types.
As part of the extraction, replaced assert2::let_assert! with idiomatic
let...else patterns, removing the assert2 dependency from the new crate.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Stack created with Sapling. Best reviewed with ReviewStack.