Host: `HostConfig` is not deserializable

Open Beginner friendly
#369 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
backend

Research direction

Start at the HostConfig definition in tellus/src/host.rs (around lines 258-264), where only Debug, Clone and Copy are derived, and at with_idle_timeout, which already enforces the nonzero idle timeout. Follow how Backoff is deserialized through try_from behind the serde feature, and mirror it for HostConfig. Done when the type deserializes under that feature, and the claims in docs/actors.md:145 and tellus/src/lib.rs:63-67 match the code.

Written by the indexing model from the issue text.

Description

enhancement

HostConfig derives only Debug, Clone and Copy (tellus/src/host.rs:258-264), so it cannot come from a configuration file. docs/actors.md:145 says "The serde feature makes the whole configuration deserializable", and the crate docs (tellus/src/lib.rs:63-67) list the deserializable configurations without it.

Its only invariant, a nonzero idle timeout, is already checked in with_idle_timeout. So deserializing through try_from, as Backoff does, would fit.

Adding the derive behind the serde feature is additive.

Found by reading the code at a320c3f.

Dominant language
Rust
Stars
37
Forks
1
Avg merge
6h 20m
Merged PRs (30d)
135

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tellus-rs/tellus

All issues in tellus-rs/tellus

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.