Skip to content

cli: debug commands to deserialize descriptors and job payloads #52063

@ajwerner

Description

@ajwerner

Is your feature request related to a problem? Please describe.

We currently export the descriptors and job payloads in debug zips with hex encoding. It is often very valuable to decode these protos into JSON or another human readable format for inspection.

Describe the solution you'd like

I'd like to see a debug commands which take descriptors on stdin in hex or base64 (with some input encoding flag or auto-detected if we feel fancy). Something like cockroach debug decode-descriptor. I could see it being generalized to just decode-proto and have a flag for the proto type. I suspect the more general command would be only marginally more work and would be better.

Describe alternatives you've considered
One thing we've discussed is to just put a deserialized descriptor into the debug zip. This won't help with older versions and it doesn't help as much with getting descriptors out of running clusters.

For what it's worth, there's been discussion about adding deserialization of protos to sql in #protocolb

Metadata

Metadata

Assignees

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions