| ▲ | 101008 13 hours ago | ||||||||||||||||||||||||||||||||||||||||
There is something you are not explaining (at least I couldn't find it, sorry if you do), but how do you manage apps states? Basically databases? Most of these agents solutions are focusing on git branches and worktrees, but at least none of them mention databases. How do you handle them? For example, in my projects, this means I would need ten different copies of my database. What about other microservices that are used, like redis, celery, etc? Are you duplicating (10-plicating) all of them? If this works flawlessly it would be very powerful, but I think it still needs to solve more issues whan just filesystem conflicts. | |||||||||||||||||||||||||||||||||||||||||
| ▲ | avipeltz 12 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||
Great question currently superset manages worktrees + runs setup/teardown scripts you define on project setup. Those scripts can install dependencies, transfer env variables, and spin up branching services. For example: • if you’re using Neon/Supabase, your setup script can create a DB branch per workspace • if you’re using Docker, the script can launch isolated containers for Redis/Postgres/Celery/etc Currently we only orchestrate when they run, and have the user define what they do for each project, because every stack is different. This is a point of friction we are also solving by adding some features to help users automatically generate setup/teardown scripts that work for their projects. We are also building cloud workspaces that will hopefully solve this issue for you and not limit users by their local hardware. | |||||||||||||||||||||||||||||||||||||||||
| ▲ | jitl 6 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
I have my agent run all docker commands in the main worktree. Sometimes this is awkward but mostly docker stuff is slow changing. I never run the stuff I’m developing in docker, I always run on the host directly. For my current project (Postgres proxy like PGBouncer) I had Claude write a benchmark system that’s worktree aware. I have flags like -a-worktree=… -b-worktree =… so I can A/B benchmark between worktrees. Works great. | |||||||||||||||||||||||||||||||||||||||||
| ▲ | jpalomaki 9 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
Just docker compose and spin up 10 stacks? Should not be too much for modern laptop. But it would be great if tool like this could manage the ports (allocate unique set for each worktree, add those to .env) For some cases test-containers [1] is an option as well. I’m using them for integration tests that need Postgres. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| ▲ | reactordev 13 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||
Why aren’t you mocking your dependencies? I should be able to run a microservice without 3rd party and it still work. If it doesn’t, it’s a distributed monolith. For databases, if you can’t see a connection string in env vars, use sqlite://:memory and make a test db like you do for unit testing. For redis, provide a mock impl that gets/sets keys in a hash table or dictionary. Stop bringing your whole house to the camp site. | |||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| ▲ | desireco42 10 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||
You can for PG use that magic copy db they have, where they instantly (close to) copy db and with git-worktrees you can work on this, then tear it down. With sqlite obviously you would just copy it | |||||||||||||||||||||||||||||||||||||||||