Skip to content
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

fix: can timeout when updating CFE version #4365

Merged
merged 4 commits into from
Dec 27, 2023
Merged

Conversation

msgmaxim
Copy link
Contributor

Pull Request

Closes: PRO-1064

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

As discussed, this seems like the most appropriate solution at this time. I have tested this on localnet, both the happy path, and with the request timing out (by setting a very short timeout).

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (6ca9226) 71% compared to head (494746f) 71%.
Report is 1 commits behind head on main.

Files Patch % Lines
engine/src/state_chain_observer/client/mod.rs 0% 24 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #4365    +/-   ##
======================================
- Coverage     71%     71%    -0%     
======================================
  Files        394     394            
  Lines      67064   66828   -236     
  Branches   67064   66828   -236     
======================================
- Hits       47925   47704   -221     
+ Misses     16709   16692    -17     
- Partials    2430    2432     +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@msgmaxim msgmaxim force-pushed the fix/cfe-upgrade-gets-stuck branch from deb51ac to f1837cd Compare December 21, 2023 23:31
.await?
.wait_for_in_block()
.await?;
tokio::time::timeout(
Copy link
Contributor

Choose a reason for hiding this comment

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

Just one thing can you add a comment, mentioning the issue? Of course in the end I agree we should add timeouts everywhere. But just while this is a one off timeout.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure it is the second await? Because if the first await on line 778 is the problem, then this timeout will not work.

Copy link
Contributor

Choose a reason for hiding this comment

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

You could put the whole request is an async block and put the timeout around that whole thing?

@msgmaxim msgmaxim merged commit 2f91bc2 into main Dec 27, 2023
@msgmaxim msgmaxim deleted the fix/cfe-upgrade-gets-stuck branch December 27, 2023 23:30
syan095 added a commit that referenced this pull request Jan 3, 2024
…itness-swap

* origin/main:
  test: polkadot runtime update bouncer test (#4286)
  fix: can timeout when updating CFE version (#4365)
  feat: add chaintracking metric (#4369)
  fix: remove pre-witnessing functionality (#4358)
  chore: changelog 1.1 (#4330)
  pick: hotfixes from release branch (#4363)
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