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

Use mqtt v1 topic to publish thin-edge.io errors to, e.g. te/errors #2386

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

PradeepKiruvale
Copy link
Contributor

Proposed changes

use <topic_root>/errors instead of tedge/errors to publish the errors.
topic_root is derived from the tedge-config. One can set it as below
tedge config set mqtt.topic_root te

the default value is te

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

#2377

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

@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request October 30, 2023 13:29 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2023

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
346 0 3 346 100 58m19.819s

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.

The root MQTT prefix is encapsulated into struct MqttSchema. Only this struct must be used to hold the error topic.

crates/core/tedge_agent/src/agent.rs Outdated Show resolved Hide resolved
crates/core/tedge_mapper/src/core/mapper.rs Outdated Show resolved Hide resolved
crates/extensions/aws_mapper_ext/src/converter.rs Outdated Show resolved Hide resolved
crates/extensions/c8y_mapper_ext/src/converter.rs Outdated Show resolved Hide resolved
crates/extensions/tedge_health_ext/src/lib.rs Outdated Show resolved Hide resolved
plugins/c8y_firmware_plugin/src/lib.rs Outdated Show resolved Hide resolved
plugins/tedge_configuration_plugin/src/lib.rs Outdated Show resolved Hide resolved
plugins/tedge_log_plugin/src/lib.rs Outdated Show resolved Hide resolved
crates/core/tedge_api/src/health.rs Outdated Show resolved Hide resolved
crates/core/tedge_api/src/health.rs Outdated Show resolved Hide resolved
@didier-wenzek didier-wenzek mentioned this pull request Oct 30, 2023
11 tasks
@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request October 31, 2023 02:55 — with GitHub Actions Inactive
Copy link
Contributor

@albinsuresh albinsuresh left a comment

Choose a reason for hiding this comment

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

The main changes look fine. Have just highlighted some odd things that I've spotted.

crates/core/tedge_api/src/mqtt_topics.rs Outdated Show resolved Hide resolved
crates/core/tedge_api/src/health.rs Outdated Show resolved Hide resolved
crates/extensions/aws_mapper_ext/src/converter.rs Outdated Show resolved Hide resolved
crates/extensions/az_mapper_ext/src/converter.rs Outdated Show resolved Hide resolved
crates/extensions/c8y_mapper_ext/src/config.rs Outdated Show resolved Hide resolved
@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request October 31, 2023 09:16 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #2386 (0f0870e) into main (420901e) will increase coverage by 0.0%.
Report is 4 commits behind head on main.
The diff coverage is 80.2%.

Additional details and impacted files
Files Coverage Δ
crates/core/tedge_api/src/mqtt_topics.rs 87.9% <100.0%> (+0.3%) ⬆️
crates/extensions/aws_mapper_ext/src/converter.rs 98.2% <100.0%> (ø)
crates/extensions/az_mapper_ext/src/converter.rs 97.0% <100.0%> (ø)
crates/extensions/c8y_mapper_ext/src/converter.rs 80.4% <100.0%> (-0.2%) ⬇️
crates/extensions/c8y_mapper_ext/src/inventory.rs 82.3% <100.0%> (ø)
crates/extensions/c8y_mapper_ext/src/tests.rs 91.8% <100.0%> (-0.1%) ⬇️
crates/core/tedge_watchdog/src/systemd_watchdog.rs 20.5% <0.0%> (ø)
crates/extensions/c8y_mapper_ext/src/config.rs 46.2% <50.0%> (+0.4%) ⬆️
crates/core/tedge_mapper/src/aws/mapper.rs 0.0% <0.0%> (ø)
crates/core/tedge_api/src/health.rs 88.7% <73.6%> (+1.2%) ⬆️
... and 1 more

... and 5 files with indirect coverage changes

@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request October 31, 2023 09:57 — with GitHub Actions Inactive
@PradeepKiruvale PradeepKiruvale temporarily deployed to Test Pull Request October 31, 2023 10:46 — with GitHub Actions Inactive
Copy link
Contributor

@albinsuresh albinsuresh left a comment

Choose a reason for hiding this comment

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

LGTM

@didier-wenzek didier-wenzek temporarily deployed to Test Pull Request October 31, 2023 17:27 — with GitHub Actions Inactive
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.

I added a commit deb7e20

PradeepKiruvale and others added 4 commits October 31, 2023 19:43
Signed-off-by: Pradeep Kumar K J <[email protected]>
Publishing an error message over MQTT adds too much fuss for errors that
will in practice never arrive (formatting current date using Rfc3339).

Signed-off-by: Didier Wenzek <[email protected]>
@didier-wenzek didier-wenzek temporarily deployed to Test Pull Request October 31, 2023 19:36 — with GitHub Actions Inactive
@reubenmiller reubenmiller merged commit e11b64f into thin-edge:main Oct 31, 2023
@reubenmiller reubenmiller added this to the 0.13.0 milestone Oct 31, 2023
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.

4 participants