Skip to content

refactor: cleanups - #104

Merged
Frando merged 1 commit into
mainfrom
Frando/cleanups
Aug 19, 2026
Merged

refactor: cleanups#104
Frando merged 1 commit into
mainfrom
Frando/cleanups

Conversation

@Frando

@Frando Frando commented Aug 17, 2026

Copy link
Copy Markdown
Member

Description

Based on #101.

This has a few cleanups in the client module, no functional changes.

  • Use proper error mapping instead of manual conversions to the Other variants.
  • Remove wrong warn! logs: When the user drops a future, this is normal operation, and not worth a warn log. Also the warn logs there indicated that something went wrong, while it didn't. It is perfectly valid to drop a request future.
  • Inline some functions that were separated into _inner functions for no reason

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh-services/pr/104/docs/iroh_services/

Last updated: 2026-08-19T12:36:26Z

Comment thread src/client.rs
}
ClientActorMessage::SetAttributes { attributes, done } => {
let res = self.send_set_attributes(attributes).await;
if let Err(err) = done.send(res) {

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.

huh, don't we loose logging for all these error cases now?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done is the oneshot sender for the reply channel. It errors if the receiver was dropped, which is not an error, just a dropped future on the caller side. The actual errors are propagated throuh done. Dropping the future of eg. Client::push_metrics is not something we should warn-log IMO, it is just allowed behavior.

@Frando
Frando force-pushed the fix/metrics-reconnect-schema branch from 6fb9756 to 9250399 Compare August 19, 2026 11:16
@Frando
Frando changed the base branch from fix/metrics-reconnect-schema to main August 19, 2026 12:34
@Frando
Frando merged commit 56c6778 into main Aug 19, 2026
25 checks passed
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.

2 participants