Skip to content

[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

Conversation

sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Apr 24, 2025

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.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
report: EventReport,
) -> Result<SendReportStatus, ClientError> {
let log = self.log.new(slog::o!("peer" => peer.to_string()));
// For each peer, report it to the network.
Copy link
Contributor

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.)

Copy link
Contributor Author

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
@sunshowers sunshowers changed the base branch from sunshowers/spr/main.4n-installinator-split-fetching-and-progress-reporting-traits to main April 25, 2025 03:18
Created using spr 1.3.6-beta.1
@sunshowers sunshowers enabled auto-merge (squash) April 25, 2025 03:19
@sunshowers sunshowers merged commit 2922698 into main Apr 25, 2025
16 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/4n-installinator-split-fetching-and-progress-reporting-traits branch April 25, 2025 06:04
sunshowers added a commit that referenced this pull request Apr 26, 2025
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
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