Deflake upgrade/downgrade tests by making restart deterministic#2991
Open
Deflake upgrade/downgrade tests by making restart deterministic#2991
Conversation
The flake was a restart race in upgrade tests. seid_upgrade.sh would pkill the old process, immediately launch the new one, and immediately print PASS. In CI the old process sometimes hadn't fully released DB/file locks, so the new process exited with "failed to initialize database: resource temporarily unavailable". Because the script still returned PASS, the test continued until verify_running.sh eventually reported FAIL. Make restart deterministic in both seid_upgrade.sh and seid_downgrade.sh: - Wait for prior seid process to fully exit (pgrep loop) after pkill - Fail fast if old process is still alive after timeout - Start seid with a retry loop to handle the transient DB lock window - Only return PASS when pgrep confirms the process is actually running - Return FAIL after max attempts Also fix a bug in seid_upgrade.sh where a missing $ meant the UPGRADE_VERSION_LIST emptiness check was always false. Flaked on [main](https://github.com/sei-protocol/sei-chain/actions/runs/22481411026/job/65120263775).
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
stevenlanders
approved these changes
Feb 27, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2991 +/- ##
========================================
Coverage 58.17% 58.18%
========================================
Files 2113 2111 -2
Lines 173688 173001 -687
========================================
- Hits 101037 100654 -383
+ Misses 63622 63438 -184
+ Partials 9029 8909 -120
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The flake was a restart race in upgrade tests. seid_upgrade.sh would pkill the old process, immediately launch the new one, and immediately print PASS. In CI the old process sometimes hadn't fully released DB/file locks, so the new process exited with "failed to initialize database: resource temporarily unavailable". Because the script still returned PASS, the test continued until verify_running.sh eventually reported FAIL.
Make restart deterministic in both seid_upgrade.sh and seid_downgrade.sh:
Also fix a bug in seid_upgrade.sh where a missing $ meant the UPGRADE_VERSION_LIST emptiness check was always false.
Flaked on main.