Skip to content
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

Rename mqtt_channel::Message -> MqttMessage #2817

Conversation

didier-wenzek
Copy link
Contributor

@didier-wenzek didier-wenzek commented Apr 9, 2024

Proposed changes

Make the distinction between tedge_actors::Message and mqtt_channel::MqttMessage explicit.

It was not really confusing as one is a struct and the other a trait, however the distinction helps to stress that actors such as the c8y converter are currently driven by MQTT messages. What I really want to change is the latter point: the c8y converter should not manipulate raw MQTT messages but parsed c8y + tedge messages. This PR is a first step in that direction.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s)
  • I ran cargo fmt as mentioned in CODING_GUIDELINES
  • I used cargo clippy as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

To make the distinction with tedge_actors::Message explicit

Signed-off-by: Didier Wenzek <[email protected]>
Copy link

codecov bot commented Apr 9, 2024

Codecov Report

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

Project coverage is 76.6%. Comparing base (2ada77d) to head (1b569f8).
Report is 3 commits behind head on main.

Additional details and impacted files
Files Coverage Δ
crates/common/mqtt_channel/src/channel.rs 66.6% <100.0%> (ø)
crates/common/mqtt_channel/src/connection.rs 55.5% <100.0%> (ø)
crates/common/mqtt_channel/src/tests.rs 86.8% <100.0%> (ø)
crates/common/mqtt_channel/src/topics.rs 85.9% <100.0%> (ø)
crates/common/tedge_utils/src/size_threshold.rs 87.5% <100.0%> (ø)
crates/core/c8y_api/src/json_c8y.rs 92.4% <100.0%> (ø)
...tedge_agent/src/tedge_operation_converter/actor.rs 49.8% <100.0%> (ø)
...tedge_agent/src/tedge_to_te_converter/converter.rs 92.6% <100.0%> (+0.3%) ⬆️
crates/core/tedge_api/src/entity_store.rs 93.1% <100.0%> (ø)
crates/core/tedge_api/src/health.rs 92.6% <100.0%> (ø)
... and 29 more

... and 4 files with indirect coverage changes

Copy link
Contributor

github-actions bot commented Apr 9, 2024

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
428 0 3 428 100 0s

Copy link
Contributor

@Bravo555 Bravo555 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming I didn't miss anything that wasn't just the name change, LGTM

@didier-wenzek didier-wenzek added this pull request to the merge queue Apr 9, 2024
Merged via the queue into thin-edge:main with commit 8910ea5 Apr 9, 2024
32 checks passed
@didier-wenzek didier-wenzek deleted the refactor/rename-mqtt-message-type branch April 22, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants