-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix up empty namespaces JSON unmarshalling error #46
Conversation
At present, if the namespaces endpoint returns 0 bytes, there is still an attempt to unmarshal it, resulting in an unexected end of JSON input error being passed down. Signed-off-by: Paul Mundt <paul.mundt@adaptant.io>
Hi thank you for your interest.
Please give before and after and versions being used so we can reproduce the error. Thank you. |
I hit this while developing a new connector (using the MQTT connector as a base of reference), but the same issue occurs with the in-tree tester, as well (the build of which is currently broken for me, for other reasons). Before the fix:
After the fix:
It took a while to figure out exactly where this JSON response was coming from, but I ultimately tracked it down to the namespace unmarshalling in the types package. A curl request on the endpoint confirmed that this was returning 0 bytes, so we've made that check explicit prior to any unmarshalling attempts, which has resolved the matter. As far as the FaaS Gateway - I've used the latest version from git (as of yesterday) and simply ran the the |
So are you using swarm? @Waterdrips can you check faas-swarm is updated correctly to return an empty set and that the stack is up to date? Cc @LucasRoesler |
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.
Approved
What's your connector for btw? |
Yes, this was on Docker Swarm. |
We have developed a connected car services platform and a number of companion apps (https://knowgo.io), which we are gradually preparing to launch, and are now simply trying to get some of the interfacing components out of the way (OpenFaaS being one of them). Our current pub/sub interface exposes adaptation events for both our risk and compliance monitoring, as well as for service providers using the platform that need to trigger run-time reconfiguration of either the application or the service deployment. We are likely to expose driver-specific events in this way as well but are more likely to route these through something like beehive or IFTTT (both of which are being tested at the moment). We are ultimately planning on using OpenFaaS for triggering Edge-based functions within the vehicle, federating this together with fleet and cloud-level OpenFaaS instances, and then begin looking at cross-instance orchestration and deployment (this is largely a byproduct of work we are doing in the SODALITE H2020 project). I'll send you a better write-up of this for the ADOPTERS document when I have some time. |
@alexellis ^ PR for the fix in faas-swarm here |
Thank you both |
At present, if the namespaces endpoint returns 0 bytes, there is still
an attempt to unmarshal it, resulting in an unexpected end of JSON input
error being passed down.
Signed-off-by: Paul Mundt paul.mundt@adaptant.io
Description
Motivation and Context
design/approved
labelHow Has This Been Tested?
Types of changes
Checklist:
git commit -s