-
Notifications
You must be signed in to change notification settings - Fork 224
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
Devimint use random ports #3247
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3247 /- ##
==========================================
Coverage 58.58% 58.59% 0.01%
==========================================
Files 196 196
Lines 41599 41653 54
==========================================
Hits 24371 24408 37
- Misses 17228 17245 17
☔ View full report in Codecov by Sentry. |
dae6224
to
dc8e99f
Compare
devimint/src/external.rs
Outdated
@@ -33,6 34,26 @@ pub struct Bitcoind { | |||
impl Bitcoind { | |||
pub async fn new(processmgr: &ProcessManager) -> Result<Self> { | |||
let btc_dir = utf8(&processmgr.globals.FM_BTC_DIR); | |||
let conf = format!( | |||
"\ | |||
regtest=1 |
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.
r#" ... "#';
raw strings might work better, possibly move to another file and include_str!(...);
it anyway.
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.
surprising that include_str! works with format!
FM_LOGS_DIR: PathBuf = mkdir(FM_TEST_DIR.join("logs")).await?; | ||
|
||
FM_PORT_BTC_RPC: u16 = port_alloc(1)?; |
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.
Note: port_alloc
keeps the port pre-allocated for like 60 seconds. That how much time the app has to actually bind and use it (which will prevent port_alloc
from using it further). For deviming I worry it might not be enough, so we could have another method that binds it for longer.
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.
60s should be more than enough. devimint starts in <15s for me locally, and all port bindings happens even before that. 4x margin is good enough.
62ff67f
to
2859752
Compare
Is green? Do we land? |
2859752
to
b16a3cf
Compare
now green, and also running tests without isolation. |
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.
🎉 🎉 🎉
Does this fix #3161? |
Backport failed for Please cherry-pick the changes locally. git fetch origin releases/v0.1
git worktree add -d .worktree/backport-3247-to-releases/v0.1 origin/releases/v0.1
cd .worktree/backport-3247-to-releases/v0.1
git checkout -b backport-3247-to-releases/v0.1
ancref=$(git merge-base 086f4ba989c7914ccc3c207ff0bd35a03695252c 95895845a5d0b7da2806cc896e84f93f97876cf9)
git cherry-pick -x $ancref..95895845a5d0b7da2806cc896e84f93f97876cf9 |
current status: everything works!