-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat(capabilities): Add capabilites message type #1049
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1049 +/- ##
==========================================
+ Coverage 69.23% 69.99% +0.76%
==========================================
Files 275 253 -22
Lines 7193 5599 -1594
==========================================
- Hits 4980 3919 -1061
+ Misses 2213 1680 -533 ☔ View full report in Codecov by Sentry. |
72bd511
to
92cf9b8
Compare
41e59ce
to
944f37b
Compare
Depends on astarte-platform/astarte_core#115, if merged b0d71bd needs to be updated to just bump up to the latest version of |
944f37b
to
9517676
Compare
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.
The general approach is good! There are however some minor details to iterate on
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/impl.ex
Outdated
Show resolved
Hide resolved
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/impl.ex
Outdated
Show resolved
Hide resolved
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/impl.ex
Outdated
Show resolved
Hide resolved
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/impl.ex
Outdated
Show resolved
Hide resolved
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/queries.ex
Outdated
Show resolved
Hide resolved
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/queries.ex
Outdated
Show resolved
Hide resolved
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/impl.ex
Outdated
Show resolved
Hide resolved
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/impl.ex
Outdated
Show resolved
Hide resolved
b57f1c9
to
cd7ff67
Compare
5d6ed5d
to
790a9f7
Compare
790a9f7
to
9956f35
Compare
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.
Almost there!
apps/astarte_data_updater_plant/lib/astarte_data_updater_plant/data_updater/impl.ex
Outdated
Show resolved
Hide resolved
9956f35
to
fca5b8b
Compare
- Devices can publish on `capabilities` endpoint - Adds the `purge_properties_compression_format` capability, setting whether the device should recive the purge properties compressed with zlib or in plain text Signed-off-by: Luca Zaninotto <[email protected]>
Update astarte core to support `Astarte.Core.Capabilities` Signed-off-by: Luca Zaninotto <[email protected]>
fca5b8b
to
b0d71bd
Compare
Devices can declare to astarte how they will handle future communications by publishing their capabilities on
/<realm>/<device_id>/capabilities
endpoint. This PR adds both a basic structure for capabilities handling and one capability:purge_properties_compression_format
.Capabilities structure
capabilities
topic astarte_vmq_plugin#98 devices can publish on/<realm>/<device_id>/capabilities
messages concerning capabilities. Such messages are handled in DUP as a new "capabilities" message type.devices
table in the database, hence a new migration in astarte house keeping has been added (see0006_devices_add_purge_properties_compression_format
).Purge properties compression format
Together with the capabilities structure the
purge_properties_compression_format
capability have been introduced (see astarte-platform/astarte_core#115). The capability states how astarte should send the purge properties message: if compressed withzlib
or in plaintext. The default value for the capability iszlib
, which has been chosen for backward compatibility.