-
Notifications
You must be signed in to change notification settings - Fork 51
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
libflux: add flux_event_encode_raw(), flux_event_decode_raw() #1486
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1486 +/- ##
==========================================
+ Coverage 78.69% 78.76% +0.06%
==========================================
Files 164 164
Lines 30405 30468 +63
==========================================
+ Hits 23928 23998 +70
+ Misses 6477 6470 -7
|
Ugh, just realized I guess I should change this to |
Problem: make clean leaves some man(3) stub files in the working directory. A commented MAN3_FILES_SECONDARY entry with a line continuation effectively commented out all the entries after it. Drop the commented out entry and note elsewhere why it is commented out.
Problem: although event messages support raw (non-JSON) payloads, no API functions exist for encoding/decoding them. Such functions do exist for requests and responses. Add flux_event_encode_raw() and flux_event_decode_raw().
Add man page entries for flux_event_encode_raw() and flux_event_decode_raw().
143b029
to
44e4325
Compare
Nice! From the coverage, it appears that only the |
I'll see if I can fix that. I noted that I needed to add tests for publishing raw events and then promptly forgot! |
Oh, ugh, my fault for not reading to the end of the PR description. I totally missed that! |
I added some cleanup to the Note that the bindings may need some work to support raw event payloads (or raw payloads for other message types for that matter). I did note that lua In that particular instance, it seems like a lua binding for a new |
Restarted one builder that hit #1077 |
Don't merge this - I am having second thoughts on the interface for |
I'm not sure what kind of support raw payloads could get from higher level bindings in general. Any service that encodes messages or events with raw payloads would probably need to be specifically wrapped for the bindings in order to have a hope of accessing the payload. In the case of That being said the bindings do need to all be regenerated anyway, so at that time we could revisit the need for interfaces to the raw msg types. |
Oh right, the subscription filter would prevent that. Sorry! |
I think what I want to is pare this PR back to the new encode/decode functions only, and rework the I can probably split out the |
@garlick, sorry it is difficult to tell -- has this PR been pared down as much as you wanted and is ready to merge? |
Yeah, it could go in. Sorry I should have commented. |
Ok, we'll merge this and then your other event PR, then rebase #1481 again. |
Thank you! |
This PR fills in some gaps noted in #1474, adding:
Functions for encoding/decoding events with raw payloads:
Functions for encoding and sending events in one go:
Man pages and unit tests are updated accordingly.
Some users are converted.
It does not address the need for API function(s) for the
cmb.pub
RPC, so it does not finish #1474. I thought that was appropriate for another PR.I still need to add some tests for publishing raw events.