xarray icon indicating copy to clipboard operation
xarray copied to clipboard

Make parallel documentation builds threadsafe

Open jacobtomlinson opened this issue 2 months ago • 1 comments

Follow on to #11003

This PR attempts to make multiple concurrent docs builds threadsafe. The main problem is that some jupyter-execute sections create, read and delete files. When run concurrently there can be collisions.

To resolve this I added some hidden cells which ensure files are created in unique tempdirs. This also has the added benefit of not littering your workdir with these files in the case of a docs build failure.

I also enabled parallel builds in sphinx-llm again because there should be no more collisions.

I've run the build multiple times locally and have not observed a collision so hopefully I got them all.

jacobtomlinson avatar Dec 12 '25 16:12 jacobtomlinson

Hmm collision happened in CI, must've missed one. Will pick this up next week.

jacobtomlinson avatar Dec 12 '25 17:12 jacobtomlinson

Ok, I think that's all of them. I've run the pixi run doc-clean job in a loop on my laptop for a few hours again today and haven't seen a collision there. CI seems happy now.

This is ready for review @max-sixty @dcherian

jacobtomlinson avatar Dec 16 '25 17:12 jacobtomlinson