Skip to content

fix: clear entity twin data in entity store with empty retained message#3699

Merged
albinsuresh merged 1 commit intothin-edge:mainfrom
albinsuresh:fix/clear-entity-twin-data-with-empty-message
Jun 23, 2025
Merged

fix: clear entity twin data in entity store with empty retained message#3699
albinsuresh merged 1 commit intothin-edge:mainfrom
albinsuresh:fix/clear-entity-twin-data-with-empty-message

Conversation

@albinsuresh
Copy link
Copy Markdown
Contributor

@albinsuresh albinsuresh commented Jun 23, 2025

Proposed changes

Clear entity twin data in the tedge-agent entity store with empty retained message. Empty MQTT payload was being rejected as invalid input, leaving the previous value intact in the entity store. This has been fixed. No updates were required in the mapper as it was already handling this properly by clearing the corresponding inventory fragment from the managed object.

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

Fix `tedge-agent` rejecting empty MQTT payload as invalid input,
leaving the previous value intact in the entity store.
Empty payload is a valid input used for clearing the entity twin data.
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 23, 2025

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ates/core/tedge_agent/src/entity_manager/server.rs 75.00% 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.

@github-actions
Copy link
Copy Markdown
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
651 0 3 651 100 1h52m11.403101999s

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

@albinsuresh albinsuresh added this pull request to the merge queue Jun 23, 2025
Merged via the queue into thin-edge:main with commit 3f5b888 Jun 23, 2025
34 checks passed
@albinsuresh albinsuresh deleted the fix/clear-entity-twin-data-with-empty-message branch July 21, 2025 06:11
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.

3 participants