thin-edge / thin-edge.io

The open edge framework for lightweight IoT devices
https://thin-edge.io
Apache License 2.0
211 stars 55 forks source link

fix(mqtt): Publish mosquitto bridge status to c8y when enabled #2901

Closed albinsuresh closed 1 month ago

albinsuresh commented 1 month ago

Proposed changes

If the mosquitto bridge is used for C8y connectivity, then the bridge service status must also be published to C8y.

Types of changes

Paste Link to the issue

https://github.com/thin-edge/thin-edge.io/issues/2898

Checklist

Further comments

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 78.0%. Comparing base (c53e14a) to head (8a91efb). Report is 1 commits behind head on main.

:exclamation: Current head 8a91efb differs from pull request most recent head 48fe6a9

Please upload reports for the commit 48fe6a9 to get more accurate results.

Additional details and impacted files | [Files](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2901?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge) | Coverage Δ | | |---|---|---| | [crates/extensions/c8y\_mapper\_ext/src/converter.rs](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2901?src=pr&el=tree&filepath=crates%2Fextensions%2Fc8y_mapper_ext%2Fsrc%2Fconverter.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge#diff-Y3JhdGVzL2V4dGVuc2lvbnMvYzh5X21hcHBlcl9leHQvc3JjL2NvbnZlcnRlci5ycw==) | `83.6% <0.0%> (-0.1%)` | :arrow_down: | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/thin-edge/thin-edge.io/pull/2901/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thin-edge)
github-actions[bot] commented 1 month ago

Robot Results

:white_check_mark: Passed :x: Failed :next_track_button: Skipped Total Pass % :stopwatch: Duration
427 14 3 441 96.83 1h31m40.235889s

Failed Tests

Name Message :stopwatch: Duration Suite
Set Configuration when file does not exist Several failures occurred: 1) Expected operation (id=10406589) to be SUCCESSFUL, but got: PENDING (failureReason: ) 2) Expected operation (id=10406733) to be SUCCESSFUL, but got: PENDING (failureReason: ) 3) DeviceNotFound 4) DeviceNotFound 307.759 s Configuration Operation
Set Configuration when file exists Several failures occurred: 1) Expected operation (id=10408214) to be SUCCESSFUL, but got: PENDING (failureReason: ) 2) Expected operation (id=10408502) to be SUCCESSFUL, but got: PENDING (failureReason: ) 3) DeviceNotFound 4) DeviceNotFound 310.866 s Configuration Operation
Set configuration with broken url Several failures occurred: 1) Expected operation (id=10408658) to be FAILED, but got: PENDING 2) DeviceNotFound 158.886 s Configuration Operation
Get Configuration from Main Device Several failures occurred: 1) Expected operation (id=10408667) to be SUCCESSFUL, but got: PENDING (failureReason: ) 2) Expected operation (id=10408669) to be SUCCESSFUL, but got: PENDING (failureReason: ) 242.539 s Configuration Operation
Get Configuration from Child Device Several failures occurred: 1) DeviceNotFound 2) DeviceNotFound 61.523 s Configuration Operation
Get Unknown Configuration Type From Device Several failures occurred: 1) Expected operation (id=10408671) to be FAILED, but got: PENDING 2) DeviceNotFound 63.132 s Configuration Operation
Get non existent configuration file From Device Several failures occurred: 1) Expected operation (id=10408673) to be FAILED, but got: PENDING 2) DeviceNotFound 63.415 s Configuration Operation
Update configuration plugin config via cloud Several failures occurred: 1) Supported Configuration fragment (c8y_SupportedConfigurations) does not match. wanted: ['/etc/tedge/tedge.toml', 'CONFIG1', 'CONFIG1_BINARY', 'system.toml', 'tedge-configuration-plugin'] got: ['/etc/tedge/tedge.toml', 'system.toml', 'tedge-configuration-plugin'] 2) DeviceNotFound 64.225 s Configuration Operation
Modify configuration plugin config via local filesystem modify inplace Several failures occurred: 1) Supported Configuration fragment (c8y_SupportedConfigurations) does not match. wanted: ['/etc/tedge/tedge.toml', 'CONFIG1', 'CONFIG1_BINARY', 'system.toml', 'tedge-configuration-plugin'] got: ['/etc/tedge/tedge.toml', 'system.toml', 'tedge-configuration-plugin'] 2) DeviceNotFound 61.934 s Configuration Operation
Modify configuration plugin config via local filesystem overwrite Several failures occurred: 1) Supported Configuration fragment (c8y_SupportedConfigurations) does not match. wanted: ['/etc/tedge/tedge.toml', 'CONFIG1', 'CONFIG1_BINARY', 'system.toml', 'tedge-configuration-plugin'] got: ['/etc/tedge/tedge.toml', 'system.toml', 'tedge-configuration-plugin'] 2) DeviceNotFound 63.370 s Configuration Operation
Update configuration plugin config via local filesystem copy Several failures occurred: 1) Supported Configuration fragment (c8y_SupportedConfigurations) does not match. wanted: ['/etc/tedge/tedge.toml', 'CONFIG1', 'CONFIG1_BINARY', 'system.toml', 'tedge-configuration-plugin'] got: ['/etc/tedge/tedge.toml', 'system.toml', 'tedge-configuration-plugin'] 2) DeviceNotFound 63.802 s Configuration Operation
Update configuration plugin config via local filesystem move (different directory) Several failures occurred: 1) Supported Configuration fragment (c8y_SupportedConfigurations) does not match. wanted: ['/etc/tedge/tedge.toml', 'CONFIG1', 'CONFIG1_BINARY', 'system.toml', 'tedge-configuration-plugin'] got: ['/etc/tedge/tedge.toml', 'system.toml', 'tedge-configuration-plugin'] 2) DeviceNotFound 62.557 s Configuration Operation
Update configuration plugin config via local filesystem move (same directory) Several failures occurred: 1) Supported Configuration fragment (c8y_SupportedConfigurations) does not match. wanted: ['/etc/tedge/tedge.toml', 'CONFIG1', 'CONFIG1_BINARY', 'system.toml', 'tedge-configuration-plugin'] got: ['/etc/tedge/tedge.toml', 'system.toml', 'tedge-configuration-plugin'] 2) DeviceNotFound 64.728 s Configuration Operation
Default plugin configuration Matching messages is less than minimum. wanted: 1 got: 0 messages: [] 31.172 s Configuration Operation