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.
Hi!
I don't know how you normally develop in PgCat, but I found it a bit cumbersome when I had to debug a ruby test that was failing. Running the entire test suite using the
tests/docker
docker-compose file is simple, but when you encounter an issue, fixing it is not as easy as it could be, mainly because:docker-compose
because postgres dbs need to use themain
network, so if you want to leave postgres containers running and rerun main to test changes, it won't work most of the times.I understand that those heavily developing in this project have all these things set up in their own boxes, but I did want to have a development environment close enough to the test one so I can debug issues easier.
This PR adds a simple dev environment that works by running:
This leads you to a container similar with what is used in CI, but ENV vars configured to save build artifacts and ruby gems into
dev/cache
directory, so removing this container and running it again won't delete those files, making it faster to do test driven development. As the cache directory is insidedev
it does not interfere with what you have outside.A run example would be like:

In the end, this change is just a new docker-compose file and some bash configuration so the user running inside the container shared UID:GID from that running in the host, also, the container has
strace
,ngrep
,psql
and some networking tools to make it easier debugging.Using it, I actually spotted the bug I was hitting in like minutes, instead of the 3 hours wasted before.