Skip to content

Commit

Permalink
Merge branch 'feat/distribution'
Browse files Browse the repository at this point in the history
  • Loading branch information
loyd committed Jul 30, 2023
2 parents 43156bd + c82bcfc commit 3630aa4
Show file tree
Hide file tree
Showing 81 changed files with 7,082 additions and 927 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->

## [Unreleased] - ReleaseDate
### Added
- network: initial implementation of distribution.
- macros: support `#[message(protocol = "X")]`.
- macros: add `set_protocol!`.
- messages: `SubscribeToActorStatuses::forcing()`.

### Changed
- **BREAKING** errors: replace `RequestError::Closed(envelope)` with `Failed`.
- **BREAKING** message: check uniqueness of (protocol, name) pair.
- message: now `AnyMessage` implements `Message`, but it's still hidden.
- message: add `Message::{name,protocol,labels,upcast}`.
- macros: improve error reporting.

### Fixed
- request: now `RequestError::Ignored` can be returned only if the envelope is received.
- macros: allow generic requests in `msg!`: `msg!(match e { (R, token) => .. })`.

## [0.2.0-alpha.4] - 2023-07-06

Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ members = [
"elfo-dumper",
"elfo-telemeter",
"elfo-pinger",
"elfo-network",
"examples",
]

Expand Down
4 changes: 2 additions & 2 deletions elfo-configurer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ async fn ping(ctx: &Context, config_list: &[ConfigWithMeta]) -> bool {
.flatten()
.filter_map(|result| match result {
Ok(()) | Err(RequestError::Ignored) => None,
Err(RequestError::Closed(_)) => Some(String::from("some group is closed")),
Err(RequestError::Failed) => Some(String::from("some group is closed")),
})
// TODO: include actor keys in the error message.
.inspect(|reason| error!(%reason, "ping failed"));
Expand All @@ -404,7 +404,7 @@ fn match_configs(
filter: TopologyFilter,
) -> Vec<ConfigWithMeta> {
topology
.actor_groups()
.locals()
// Entrypoints' configs are updated only at startup.
.filter(|group| !group.is_entrypoint)
.filter(|group| match filter {
Expand Down
2 changes: 2 additions & 0 deletions elfo-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ readme.workspace = true

[features]
test-util = ["tokio/test-util"]
network = ["rmp-serde", "elfo-macros/network"]
unstable = []
unstable-stuck-detection = ["dep:thread_local"]

Expand Down Expand Up @@ -49,6 +50,7 @@ serde_json = { version = "1.0.64", features = ["raw_value"] }
regex = "1.6.0"
thread_local = { version = "1.1.3", optional = true }
unicycle = "0.9.3"
rmp-serde = { version = "1.1.0", optional = true }

[dev-dependencies]
anyhow = "1.0.40"
Expand Down
2 changes: 1 addition & 1 deletion elfo-core/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use serde::{Deserialize, Serialize};
use tracing::{error, info, warn};

use crate::{
addr::Addr,
envelope::Envelope,
errors::{SendError, TrySendError},
group::{RestartPolicy, TerminationPolicy},
Expand All @@ -17,6 +16,7 @@ use crate::{
request_table::RequestTable,
scope,
subscription::SubscriptionManager,
Addr,
};

// === ActorMeta ===
Expand Down
32 changes: 0 additions & 32 deletions elfo-core/src/addr.rs

This file was deleted.

Loading

0 comments on commit 3630aa4

Please sign in to comment.