Open GeorgeMac opened 8 months ago
Interesting, thanks for the report + trace. Will have to think about this more, but I'm inclined to fix this in Progrock since this seems like the kind of thing that could be tricky to synchronize externally.
Interesting that I haven't run into this myself but it seems likely to be unique to the plain console writer, rather than the usual TUI. If that's the case maybe that's where the fix needs to go.
Just for posterity and debugging purposes, it happened again here https://github.com/flipt-io/flipt/actions/runs/7690639515/job/20954745617?pr=2687
I noticed this in an application of ours using Dagger. My gut says this seems to be the right level to fix this issue, however, if calling these two methods concurrently is deemed unreasonable in the first place, then I am happy to move the issue up to Dagger itself.
When closing and writing statuses concurrently, it seems that the trace can be sorting some contents during WriteStatus, while it is being iterated on in the Close call.