Closed jayvdb closed 6 months ago
Hmm, I wonder if a more complete fix would be to place the socket in the system tempdir (or a short path under that). block_id
buys a few bytes but doesn't ultimately change the nature of the problem
If we;re going to use "temp" dir, we should have CI for platform specific locations. Hence https://github.com/Electron100/butane/pull/193
Also if we're not needing block-id, I recommend we replace uuid with ulid for these tmp directories (c.f. https://github.com/Electron100/butane/issues/133) , so that their names are ordered chronologically, which makes it a bit easier to reap old ones.
I went with using tempfile only for the socket dir, and still using block-id for the tmp_pg subdirs,, as keeping the pgdata can be useful when debugging test failures.
create_tmp_server fails with:
Simple solution is to replace uuid in the path with https://docs.rs/block-id/latest/block_id/ , which is sufficiently unique for the purpose.
I've got a fix that I'll test a bit more before submitting.