-
Notifications
You must be signed in to change notification settings - Fork 15
rfc19: specify json encoding rules for FLUIDs #493
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
base: master
Are you sure you want to change the base?
Conversation
|
|
|
Using F58 is a good idea IMO since this saves space in the encoding and is what users are used to seeing in tools. Note that requiring an encoding here is the easy part, but doesn't solve the issue of updating or transitioning every use in existing RPCs, eventlogs, and APIs (IOW, the code will immediately be violating this RFC and there's no plan to bring it into compliance). Hopefully specifying the requirement here doesn't limit the design space of a transition plan. It is too bad we can't exend the JSON pack/unpack syntax to allow new format types... |
|
OK,
I think the point of putting it in the spec is to raise the urgency and hopefully curtail the practice in new development. If we just said "SHALL NOT use JSON numbers" then we might end up with multiple new representations so IMHO we ought to just pick one now. Either BTW your idea of adding new fields to existing payloads and phasing out the non-compliant ones sounds right to me. |
Problem: it is not safe to encode FLUIDs as JSON numbers, yet we currently do that routinely in Flux. Require a string encoding going forward.
|
Were you thinking we should add something about transitioning to the RFC like
|
|
|
This was not my intention when starting flux-framework/flux-core#7378. While I might prefer F58, I am happy with any string encoding.
|
|
That makes sense. I was just slightly uncomfortable with specifying an encoding in the RFC without determining the transition plan. However, that was just fear of the unknown and your point is compelling. |
|
How about this then?
|
Problem: it is not safe to encode FLUIDs as JSON numbers, yet we currently do that routinely in Flux.
Require a string encoding going forward.
Note: the proposed language allows any valid FLUID string encoding since they are unambiguous and the public API functions
flux_jobid_encode(3)andflux_jobid_parse(3)are available. However, @dirkschubert-linaro requested that a single encoding be used for human readability. Thoughts on whether that should be required? It doesn't cost anything to narrow the requirement to one encoding AFAICS such asf58plainReferences