golioth / golioth-zephyr-sdk

Golioth SDK For Zephyr
https://www.golioth.io
Apache License 2.0
68 stars 19 forks source link

Add golioth_rpc feature #230

Closed ncmiller closed 2 years ago

ncmiller commented 2 years ago

The RPC feature is not yet deployed on the backend (I tested with local golioth instance on branch feature/device-rpc). Therefore, the RPC feature is disabled by default in Kconfig.

github-actions[bot] commented 2 years ago

Visit the preview URL for this PR (updated for commit 0424fc0):

https://golioth-zephyr-sdk-doxygen-dev--pr230-nick-rpc-b8n0jolw.web.app

(expires Fri, 29 Jul 2022 15:29:08 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

ncmiller commented 2 years ago

Note: We are failing checkpatch in CI right now due to CamelCase warnings related to usage of QCBOR, for example:

2a7e49ebff6c2a6e83543e2dc746944fda25f7a7:298: CHECK:CAMELCASE: Avoid CamelCase: <UsefulBufC>
#298: FILE: net/golioth/rpc.c:100:
+   UsefulBufC payload_buf = { payload, payload_len };

There's not much we can do about this since QCBOR is an external project, and checkpatch.pl is not smart enough to allow exceptions for that.

Therefore, we will ignore the checkpatch failure in this PR and invoke "GitHub superpowers" to force-merge after the review phase is complete.

mniestroj commented 2 years ago

There are build failures, which got unnoticed by CI: https://github.com/golioth/golioth-zephyr-sdk/runs/7396608549?check_suite_focus=true

I've observed this problem before and I think this was related to twister problem in Zephyr 3.1.0, which always returns 0 exit code even in case of errors. Zephyr from tip of main already fixed this issue, if I remember correctly.

ncmiller commented 2 years ago

There are build failures, which got unnoticed by CI: https://github.com/golioth/golioth-zephyr-sdk/runs/7396608549?check_suite_focus=true

Build error should be fixed now. I added #if defined(CONFIG_GOLIOTH_RPC) guards:

https://github.com/golioth/golioth-zephyr-sdk/pull/230/files#diff-47293fdec0466d8bad2826094caeca848de80536d9e1f918bc365c63d84e80c3R94-R97