-
Notifications
You must be signed in to change notification settings - Fork 43
[4/n] [installinator] split fetching and progress reporting traits #8038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4/n] [installinator] split fetching and progress reporting traits #8038
Conversation
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1 [skip ci]
installinator/src/reporter.rs
Outdated
report: EventReport, | ||
) -> Result<SendReportStatus, ClientError> { | ||
let log = self.log.new(slog::o!("peer" => peer.to_string())); | ||
// For each peer, report it to the network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny nit - not sure this comment applies anymore? ("For each" sounds to me like we'll be looping over multiple peers, but that happens external to us now.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, thanks!
Created using spr 1.3.6-beta.1 [skip ci]
Created using spr 1.3.6-beta.1
There's been a long-standing issue with the installinator where reports to wicketd get delayed quite substantially. That happens because we use one task to send reports out to every peer, blocking until all of those peers come back. I'd assumed in the past that if installinator reached out to an unreachable peer, it would receive a TCP connection refused message, but that isn't the case -- instead, it times out. This causes reports to only be sent out roughly every 15 seconds which isn't ideal. To fix this issue, spin up separate report tasks for each peer. Introduce separate tasks for: * discovery (make this a persistent task that publishes updates to a watch channel) * peer reconciliation (new peers have new report tasks spun up, while removed peers' report tasks are cancelled) * reporting (each peer now has its own report loop) Also simulate some kinds of network flakiness in our property-based tests. I did a mupdate on dublin and saw that installinator reports started coming through every 2 seconds rather than every 15 or so, as expected. Depends on: - #8035 - #8036 - #8037 - #8038 - #8039 - #8040
While working on better progress reporting, I realized that fetching and progress reporting really are quite different, and are best represented through different traits.
This removes several panics and implicit unused behaviors, so it acts as a really nice cleanup on top of facilitating the next few commits in the series.
There are no functional changes in this PR -- it's just refactoring.