Skip to content

fix: skip bridge status messages in aws/az mappers#3505

Merged
Ruadhri17 merged 2 commits intothin-edge:mainfrom
Ruadhri17:aws-az-mappers-health-status-warn
Mar 31, 2025
Merged

fix: skip bridge status messages in aws/az mappers#3505
Ruadhri17 merged 2 commits intothin-edge:mainfrom
Ruadhri17:aws-az-mappers-health-status-warn

Conversation

@Ruadhri17
Copy link
Copy Markdown
Contributor

@Ruadhri17 Ruadhri17 commented Mar 26, 2025

Proposed changes

Currently, we skip the conversion message when it comes on the aws or az bridge status topics. However, this is not sufficient, as the mapper reacts to all bridge status topics. Moreover, it always fails if the payload cannot be parsed into the Map<String, Value> format.

This PR changes the logic: instead of checking the topic, we now attempt to parse the payload as a u8 and check if value is 0 or 1. If so, we skip the conversion. For other payload formats, a more descriptive error message will be logged.

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. 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

Signed-off-by: Krzysztof Piotrowski <krzysztof.piotrowski@inetum.com>
@Ruadhri17 Ruadhri17 force-pushed the aws-az-mappers-health-status-warn branch from e046354 to 59295e3 Compare March 26, 2025 10:54
@Ruadhri17 Ruadhri17 temporarily deployed to Test Pull Request March 26, 2025 10:54 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2025

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
599 0 3 599 100 1h41m15.168627999s

…s mappers

Signed-off-by: Krzysztof Piotrowski <krzysztof.piotrowski@inetum.com>
@Ruadhri17 Ruadhri17 force-pushed the aws-az-mappers-health-status-warn branch from 59295e3 to cbe8217 Compare March 26, 2025 11:27
@Ruadhri17 Ruadhri17 temporarily deployed to Test Pull Request March 26, 2025 11:27 — with GitHub Actions Inactive
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/extensions/aws_mapper_ext/src/converter.rs 82.35% 3 Missing and 3 partials ⚠️
crates/extensions/az_mapper_ext/src/converter.rs 89.65% 1 Missing and 2 partials ⚠️

📢 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.

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

@reubenmiller reubenmiller added theme:aws Theme: AWS cloud related topics theme:az Theme: Azure IoT related topics labels Mar 31, 2025
@Ruadhri17 Ruadhri17 added this pull request to the merge queue Mar 31, 2025
Merged via the queue into thin-edge:main with commit b9c514a Mar 31, 2025
50 of 51 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:aws Theme: AWS cloud related topics theme:az Theme: Azure IoT related topics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants