Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support dumping cluster state to URL #5863
Support dumping cluster state to URL #5863
Changes from 4 commits
0172c55
2848f26
ffa5bb9
743b3bd
9c67358
9c54a11
643b8d1
5e2d3c6
1c94d52
88bc145
ca1fa75
e6537fb
8f4e212
0739776
f204e07
879f847
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want this to be duplicated? We already have a drift in the two versions (just a comment). Can't this function be refactored to be reused by local and remote?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't like the duplication either. There are a couple subtle differences right now:
tuple_to_list
for both msgpack and yaml because of serialization;dump_cluster_state_to_url
only runs it for yaml. I'd guess doing it for msgpack isn't necessary anywhere, so this shouldn't matter.dump_cluster_state_to_url
uses fsspec to open the file; client uses plainopen
. This gives you a way to get a cluster dump if you don't want to install fsspec.Neither of those seem like huge deals to me, so I'll make it a shared function. Just not sure where to put it besides the dreaded
utils.py
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about a new module? The stuff in #5873 needs to live somewhere as well
symmetry. Having everything identical regardless of the output format is nice since every code you write works on both files. One thing I actually do often is to convert a received msgpack file to yaml which allows me to grep stuff 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting tuples to lists in the input to msgpack doesn't matter though, since the msgpack itself effectively turns tuples into lists in the dumping process (since tuples are represented as lists). And for large cluster dumps, I think saving a full traversal and copy of the state is worthwhile.
I do this too. When you read in the msgpack though, it'll be all lists anyway, so the format is symmetrical when you then dump to yaml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaik, you'll need to toggle this specifically. IIRC, msgpack load will reconstruct lists (which is horribly slow)