Skip to content

Conversation

teor2345
Copy link
Member

@teor2345 teor2345 commented Aug 4, 2025

This PR treats the bootstrap node prometheus task as non-essential, and explicitly ignores some exit errors.

Fixes

The boostrap node treats its prometheus task as non-essential: it doesn't exit if that task exits. This matches farmer behaviour. I added comments so we don't accidentally change this in future.

Type Checks

When we ignore a task cancellation, I added explicit types, so we don't accidentally ignore any other errors.

Refactors

I simplified the prometheus select code in the farmer and bootstrap node, so we don't have multiple select! statements. This requires the pattern matching feature of tokio::select!:
https://tokio.rs/tokio/tutorial/select#pattern-matching

Code contributor checklist:

@teor2345 teor2345 self-assigned this Aug 4, 2025
@teor2345 teor2345 requested a review from nazar-pc as a code owner August 4, 2025 23:28
@teor2345 teor2345 added bug Something isn't working refactor improvement it is already working, but can be better labels Aug 4, 2025
Copy link

🛡️ Immunefi PR Reviews

We noticed that your project isn't set up for automatic code reviews. If you'd like this PR reviewed by the Immunefi team, you can request it manually using the link below:

🔗 Send this PR in for review

Once submitted, we'll take care of assigning a reviewer and follow up here.

Base automatically changed from move-net-utils to main August 5, 2025 09:59
@teor2345
Copy link
Member Author

This should be ready for another review, I removed the controversial changes and just kept the bootstrap node prometheus task and type checks.

@teor2345 teor2345 enabled auto-merge August 11, 2025 23:38
@teor2345 teor2345 added this pull request to the merge queue Aug 13, 2025
Merged via the queue into main with commit 3b4e67a Aug 13, 2025
13 checks passed
@teor2345 teor2345 deleted the fix-exit-logs branch August 13, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working improvement it is already working, but can be better refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants