sbtc-developer-release icon indicating copy to clipboard operation
sbtc-developer-release copied to clipboard

Devenv util script don't work if romeo is not running in a container

Open stjepangolemac opened this issue 1 year ago • 8 comments

Expected Behavior

  1. I comment out the sbtc container in the docker compose file (I can't have it running when working on local romeo)
  2. I run devenv
  3. util commands continue working

Actual Behavior

Commands don't work as they expect the sbtc container to be running to use sbtc-cli inside it.

Steps to Reproduce

  1. Comment out the sbtc part of the docker compose file
  2. Run devenv
  3. Try running util commands

stjepangolemac avatar Oct 13 '23 10:10 stjepangolemac

I think we need to be a bit discerning about what devenv features we support - when we're having all these different options we make the backend of devenv increasingly complicated. After the hackathon we should discuss what features we really need and what we don't.

I could see an argument for removing romeo from the container entirely and expecting romeo to be running locally. @radicleart, @friedger does that match better to the workflow you've been doing to test?

@EmbeddedAndroid since you're the devenv visionary I'm curious what your thoughts are.

AshtonStephens avatar Oct 13 '23 14:10 AshtonStephens

Though, @stjepangolemac, I wouldn't consider this a bug because we know it doesn't do this.

AshtonStephens avatar Oct 13 '23 14:10 AshtonStephens

I could see an argument for removing romeo from the container entirely and expecting romeo to be running locally. @radicleart, @friedger does that match better to the workflow you've been doing to test?

Hey yes for me the main issue is support in Leather for regtest bitcoin addresses - this is a dependency for the bridge on devnet. Due to this I'm running Romeo, Bridge UI and Bridge API standalone on testnet.

mijoco-btc avatar Oct 13 '23 15:10 mijoco-btc

@AshtonStephens Let's build a stable product for the hackathon.

For development of romeo, the scripts using my local sbtc binary were helpful. Maybe we need to duplicate them.

friedger avatar Oct 14 '23 20:10 friedger

We can add a flag to execute on local binaries or default to a service.

What are util scripts anyway? We have a problem if devenv is not helpful for development. Are we stretching devenv too much? It could be beneficial to redefine what devenv is and is not.

I would argue that devenv is a big success, and people will want features tailored to their needs. Would it be helpful to provide different devenv tiers? This way, we can support core features while letting devs customize their local dev experience further from a solid base. Downing services manually has been problematic due to service dependencies. Putting more options on up.sh and down.sh to spin a service subset may be worthwhile.

Utils scripts can have the former flag to choose a running a script in devenv or locally. This allows the user to target devenv or a local resource regardless of the devenv services subset running.

Naïve example of devenv tiers (service subsets) :

  1. bitcoind
  2. bitcoind + stacks
  3. bitcoind + stacks + sbtc
  4. ...

Each tier should have a clear goal/scope.

  1. stacks-node development
  2. Romeo development + stacks integration
  3. leather wallet integration + Romeo integration
  4. e-2-e integration

CAGS295 avatar Oct 16 '23 18:10 CAGS295

I could see an argument for removing romeo from the container entirely and expecting romeo to be running locally

This sounds very reasonable for me, and the same might apply to the bridge related containers post hackaton. The devenv was originally envisioned to be run as infra, and everything else would be external. I understand we might want to bundle more things together for the hackaton, so unbundling it like this can wait.

stjepangolemac avatar Oct 16 '23 19:10 stjepangolemac

I think we would be useful to look into is: https://docs.docker.com/compose/multiple-compose-files/extends/ and https://docs.docker.com/compose/compose-file/10-fragments/

I think this would give us the flexible to on the fly configure the services that needs to be started.

EmbeddedAndroid avatar Oct 16 '23 19:10 EmbeddedAndroid

Wow, I didn't know YAML supported all these kinds of things mentioned in the fragments docs 😅

Cool but also cumbersome in the same time!

stjepangolemac avatar Oct 17 '23 09:10 stjepangolemac