[WIP] RFC: Dependency Upgrades & Warning Cleanup#46
Open
goranc wants to merge 331 commits into
Open
Conversation
…ures and pipe the result back to actor refs as a message + further improvements
…sages & communication)
…before the other has joined the cluster causes the ACK to never be sent
…ve `CoordinatorSpawner` actor
…f a singleton is starting or if the singleton is running
…ngleton Create new cluster singleton system Refactor sharding to use cluster singletons Improvements to node termination API improvements (e.g PipeTo / pipe_to) QoL improvements
- Added explicit type annotation `: ()` for Redis DEL command result to properly handle the unit return type - Prevents potential type inference issues and improves code clarity by being explicit about expected return value
- Updated default feature set in Cargo.toml to include "remote" and "persistence" modules - Makes core distributed functionality available without explicit feature flags - Simplifies initial setup for new users by providing commonly used features out of the box
- Removed unused imports from actor/context.rs including HashMap and various valuable types - Cleaned up actor/lifecycle.rs by removing Instrument and Valuable imports - Streamlined actor/mod.rs by removing numerous unused imports and feature-gated code - Fixed Display implementation in actor/refs/mod.rs to use proper debug trait casting - Removed mutable qualifiers from unused mut bindings in journal/provider.rs and client/connect.rs - Cleane
- Modernized macro imports by replacing #[macro_use] with explicit imports - Removed unused variables and fields from structs to fix warnings - Updated async function calls to properly await results - Removed redundant box_pointers allow attribute from proto files - Added missing #[allow(dead_code)] attributes where needed - Fixed potential unwrap errors by using parse_macro_input! macro - Updated Redis dependency to version 0.23.3 - Cleane
- Upgraded redis dependency from 0.23.3 to 0.32.3 to support latest features - Refactored Redis query calls to use proper generic type parameters and remove redundant type annotations - Improved error handling in journal operations with explicit handling of Ok(None) cases - Added conditional compilation for Duration import based on client-auth-jwt feature - Enhanced readability of Redis command responses with structured pattern matching
- Moved valuable imports under tracing-unstable feature flag in actor/context.rs - Removed unused imports across multiple files (Any, Debug, Display, Hash, Hasher, etc.) - Renamed unused variables with underscore prefix to silence compiler warnings - Fixed deprecation warning by using DateTime::from_naive_utc_and_offset instead of from_utc - Removed unused TimerMode::Notify variant and related code path - Simplified actor_addr assignment
- Removed unused imports across multiple files: - Removed ToActorId from actor_messaging.rs - Removed CoreActorRef from system/mod.rs - Removed TimeZone from jwt.rs - Removed Message from discovery.rs - Removed Arc from discovery.rs - Simplified match pattern in ShardCoordinator by using if let with nested match - Fixed duplicate feature check for tracing-unstable in session/mod.rs The changes focus on cleaning up the codebase by
- Removed unused shards_by_node function from ShardCoordinator - Simplified SystemEvent pattern matching in discovery handler - Removed unused reallocating_shards HashSet from ShardCoordinator - Cleaned up ShardHost by removing unused fields and simplifying message handling - Removed unused coordinator field from ShardingCore - Eliminated unused entity passivation code and empty file - Removed unused methods and fields from Shard implementation
- Added Debug trait and accessor methods for ActorStarted, ActorStopped, and ActorReceived event structs - Refined actor tracing span configuration with mutually exclusive feature flags - Cleaned up imports and formatting across multiple files - Fixed formatting in supervised.rs warning messages and trace logs - Removed unused imports and empty lines for better code organization The changes focus on improving the actor event system's API and making
- Added coordinator field to ShardingCore struct to store coordinator instance - Created new public coordinator() method to access the shard coordinator singleton - Imported missing Singleton type from singleton module - Maintains encapsulation by returning cloned coordinator reference
- Updated tracing from 0.1.37 to 0.1.41 - Updated uuid from 1.1.2 to 1.18.1 - Updated serde from 1.0 to 1.0.228 and serde_json to 1.0.133 - Updated async-trait to 0.1.89 and futures to 0.3.31 - Updated bytes to 1.9.0 and anyhow to 1.0.93 - Maintained existing feature flags and optional dependencies
- Updated tokio to 1.48.0 and related dependencies (tokio-util, tokio-stream) - Upgraded axum to 0.8.5 and utoipa to version 5 with required API changes - Added graceful shutdown handling for pending requests to prevent ResultChannelClosed errors - Improved sharded actor message handling with retry mechanism on channel closure - Modified health API response format to use structured actor response times - Updated axum route parameters to use
- Added handling for ResultChannelClosed errors during actor restarts and node termination - Modified test assertions to accept both successful responses and expected failure cases - Updated test to be more resilient to timing-related issues during shard rebalancing - Added debug logging for different response scenarios to aid troubleshooting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Key Changes
Upgraded core crates:
tokio from 1.32.0 to 1.48.0
tokio-util from 0.7.8 to 0.7.16
tokio-stream from 0.1.14 to 0.1.16
tracing from 0.1.37 to 0.1.41
uuid from 1.1.2 to 1.18.1
serde from 1.0 to 1.0.228
serde_json from 1.0 to 1.0.133
futures from 0.3.28 to 0.3.31
async-trait from 0.1 to 0.1.89
bytes from 1.4.0 to 1.9.0
anyhow from 1.0.71 to 1.0.93
axum from 0.6.18 to 0.8.5
utoipa from 3 to 5
utoipa-swagger-ui from 3 to 9
redis from 0.32.3 to newer version
Code improvements:
Updated axum server initialization to use the new axum::serve API instead of the deprecated Server::bind
Added proper error handling for TCP listener binding
Enhanced remote actor system shutdown to properly clear pending requests
Made requests field public in RemoteHandler for better accessibility
Added missing imports for ActorRefErr and RemoteResponse types
Warning cleanup:
Addressed several unused import and dead code warnings throughout the codebase
Cleaned up code to improve build output clarity
This PR brings the project up to date with the latest dependency versions, improving performance, security, and compatibility while cleaning up code warnings.