Truncate large coro repr in retry log output by ernestprovo23 · Pull Request #9197 · dask/distributed

@ernestprovo23

When retry() falls back to str(coro) for the log message, truncate
the representation to 200 characters to prevent excessively large
logs. This was observed in P2P shuffles where functools.partial repr
includes serialized binary data.

Closes dask#8529

jacobtomlinson

@ernestprovo23

Replace manual str[:200] + "..." truncation with stdlib reprlib.Repr()
per reviewer feedback. reprlib handles truncation consistently and is
a well-known stdlib pattern for this use case.

jacobtomlinson