🐛 Clean tuples dict keys from workers_info in /api/v1/retire_workers.#8996
Conversation
jacobtomlinson
left a comment
There was a problem hiding this comment.
Thanks for catching this
|
It should partly solve this issue: #8370 |
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 27 files ± 0 27 suites ±0 11h 31m 39s ⏱️ - 12m 20s For more details on these failures, see this check. Results for commit 5ffb406. ± Comparison against base commit 0f0adef. ♻️ This comment has been updated with latest results. |
|
I would appreciate @fjetter or @hendrikmakait taking a look at this. |
|
One question would be, are we supposed to retire a worker that still has |
|
Any update by any luck? |
jacobtomlinson
left a comment
There was a problem hiding this comment.
Let's get this merged. I was originally concerned that other consumers of the API may be affected by this, but it may just be dask-kubernetes that uses it at this point.
Given nobody has shouted let's get this in.
Fix JSON serialization error in retire_workers API endpoint
When retiring workers through the HTTP API endpoint
/api/v1/retire_workers, the response includes worker metrics that contain tuple keys (e.g.,digests_total_since_heartbeat). These tuple keys cannot be JSON serialized, causing a 500 error that breaks clients like the Dask Kubernetes Operator.This PR:
clean_dictfunction to delete tuple keys during serializationExample: