fedimint / fedimint

Federated E-Cash Mint
https://fedimint.org/
MIT License
536 stars 209 forks source link

feat: use mprocs for dev setup #2165

Closed gotlougit closed 1 year ago

gotlougit commented 1 year ago

Fixes #2136, need some more polishing to get all the daemons running and some error handling like with the tmuxinator.sh script.

Remaining tasks:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.25 :warning:

Comparison is base (4d95fb8) 60.11% compared to head (5e836bc) 59.86%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2165 +/- ## ========================================== - Coverage 60.11% 59.86% -0.25% ========================================== Files 152 152 Lines 30798 31303 +505 ========================================== + Hits 18514 18740 +226 - Misses 12284 12563 +279 ``` [see 80 files with indirect coverage changes](https://codecov.io/gh/fedimint/fedimint/pull/2165/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fedimint) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fedimint). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fedimint)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

maan2003 commented 1 year ago

This works for me! Todo: remove all tmux references in repo

dpc commented 1 year ago

Nice!

LGTM, but Manmeet is the authority here. Feel free to ping me on Discord to ruberstamp after Manmeet approves. :)

justinmoon commented 1 year ago

Todo: remove all tmux references in repo

Let's do this in separate PR. Want to make sure this actually works for people before deleting tmuxinator.

justinmoon commented 1 year ago

Questions / comments:

$ just exit fed-shell
mprocs --ctl '{c: quit}'
Error: Server address is not defined.
maan2003 commented 1 year ago

Makes sense. Then this PR is almost ready. I have added list of remaining tasks in PR description.

maan2003 commented 1 year ago

How should the user quit? I still can't figure that out.

currently it is:

maan2003 commented 1 year ago

When you quit, do all the processes get clean up?

Yes, but fedimintd takes a while.

fedimint-cli isn't defined in the "user" window.

added in remaining tasks

justinmoon commented 1 year ago

currently it is:

  • close user shell manually. (exit)
  • Ctrl-A (focus out of terminal window) q (quit)

Nice, that worked for me.

I think we should copy scripts/tmux-user-shell.sh to like scripts/mprocs-user-shell.sh. Then we can source aliases.sh in it, as well as print out the instructions to quit.

gotlougit commented 1 year ago

Quitting now completely kills the bash shell, I tried using SIGINT and SIGTERM but they didn't seem to work, whereas brute force SIGKILL did the job.

gotlougit commented 1 year ago

I have added tmuxinator back in as best I could, I think both mprocs and tmuxinator can co-exist for now

gotlougit commented 1 year ago

No problem, was happy to contribute!

justinmoon commented 1 year ago

Great work @gotlougit!