Skip to content

fix: Set tedge-mapper-c8y status to up after bridge reconnects#3794

Merged
jarhodes314 merged 2 commits intothin-edge:mainfrom
jarhodes314:bridge-status-handling
Sep 23, 2025
Merged

fix: Set tedge-mapper-c8y status to up after bridge reconnects#3794
jarhodes314 merged 2 commits intothin-edge:mainfrom
jarhodes314:bridge-status-handling

Conversation

@jarhodes314
Copy link
Copy Markdown
Contributor

Proposed changes

Manually publish the service status of tedge-mapper-c8y to up when the built-in bridge connects to Cumulocity.

To ensure we always mark tedge-mapper-c8y as down when the mapper stops, the bridge's cloud connection sends the mapper service down command to Cumulocity as a last will message. This PR adds a corresponding message that is sent when the bridge connects to Cumulocity, meaning the service status is correctly marked as up after the mapper recovers from a network outage.

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

#3075

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s. You can activate automatic signing by running just prepare-dev once)
  • I ran just format as mentioned in CODING_GUIDELINES
  • I used just check 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

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 19, 2025

Codecov Report

❌ Patch coverage is 83.21168% with 23 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/core/tedge_mapper/src/c8y/mapper.rs 0.00% 20 Missing ⚠️
crates/core/tedge_mapper/src/aws/mapper.rs 0.00% 1 Missing ⚠️
crates/core/tedge_mapper/src/az/mapper.rs 0.00% 1 Missing ⚠️
crates/extensions/tedge_mqtt_bridge/src/lib.rs 99.11% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jarhodes314 jarhodes314 force-pushed the bridge-status-handling branch from 565d5f0 to 278576b Compare September 22, 2025 09:04
@reubenmiller reubenmiller added theme:bridge Built-in (Rust) bridge topics theme:mqtt Theme: mqtt and mosquitto related topics labels Sep 22, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 22, 2025

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
685 0 3 685 100 2h6m12.853422s

Copy link
Copy Markdown
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

Copy link
Copy Markdown
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

@jarhodes314 jarhodes314 added this pull request to the merge queue Sep 23, 2025
Merged via the queue into thin-edge:main with commit fd7779a Sep 23, 2025
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:bridge Built-in (Rust) bridge topics theme:mqtt Theme: mqtt and mosquitto related topics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants