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

fix: align tedge-log-plugin settings #2212

Merged

Conversation

reubenmiller
Copy link
Contributor

Proposed changes

Fix some inconsistencies with the tedge-log-plugin

  • Use the mqtt client settings instead of the bind settings when creating the mqtt client
  • Use DEBUG log level when starting the plugin with --debug (to align with other plugins)
  • Build the mqtt client's session name using the plugin name, root and identifier topics to avoid conflicts between multiple tedge-log-plugin instances running as different child devices all on the same broker

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

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
…on name

The session name should use the root and topic identifiers to avoid client/session clashes when using the log plugin for the main device and multiple child devices causing the client to be disconnected

Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
Signed-off-by: Reuben Miller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller added the theme:troubleshooting Theme: Troubleshooting and remote control label Sep 3, 2023
@reubenmiller reubenmiller temporarily deployed to Test Pull Request September 3, 2023 12:51 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Sep 3, 2023

Codecov Report

Merging #2212 (d8e5443) into main (24b421f) will increase coverage by 0.0%.
The diff coverage is 0.0%.

Additional details and impacted files
Files Changed Coverage Δ
.../tedge_config/src/tedge_config_cli/tedge_config.rs 89.2% <ø> (+1.2%) ⬆️
plugins/tedge_log_plugin/src/main.rs 0.0% <0.0%> (ø)

... and 4 files with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented Sep 3, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
261 0 5 261 100 46m11.925999999s

Copy link
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved.

Build the mqtt client's session name using the plugin name, root and identifier topics to avoid conflicts between multiple tedge-log-plugin instances running as different child devices all on the same broker

Indeed necessary

@reubenmiller reubenmiller merged commit 7436693 into thin-edge:main Sep 3, 2023
@reubenmiller reubenmiller deleted the fix-tedge-log-plugin-inconsistencies branch September 3, 2023 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme:troubleshooting Theme: Troubleshooting and remote control
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants