Skip to content

Comments

feat: Allow purging events#5059

Merged
cloudxxx8 merged 1 commit intoedgexfoundry:mainfrom
weichou1229:purge-events
Jan 20, 2025
Merged

feat: Allow purging events#5059
cloudxxx8 merged 1 commit intoedgexfoundry:mainfrom
weichou1229:purge-events

Conversation

@weichou1229
Copy link
Member

@weichou1229 weichou1229 commented Jan 20, 2025

To purge the redundant events and readings, remove the related events and readings once received the device deletion system event.

fix #5061

Signed-off-by: bruce weichou1229@gmail.com
(cherry picked from commit 481bac23ae2783e5fdad02be5b4ce3f7b675fd66)

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?) not impact
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

  • enable the EventPurge
  • add a device with auto event
  • remove the device and check the events and readings should be removed

New Dependency Instructions (If applicable)

To purge the redundant events and readings, remove the related events and readings once received the device deletion system event.

Signed-off-by: bruce <weichou1229@gmail.com>
(cherry picked from commit 481bac23ae2783e5fdad02be5b4ce3f7b675fd66)
@weichou1229 weichou1229 requested a review from cloudxxx8 January 20, 2025 01:34
@sonarqubecloud
Copy link

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 59 lines in your changes missing coverage. Please review.

Project coverage is 28.06%. Comparing base (fdc408d) to head (464389f).

Files with missing lines Patch % Lines
...nal/core/data/controller/messaging/system_event.go 0.00% 55 Missing ⚠️
internal/core/data/init.go 0.00% 4 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5059      +/-   ##
==========================================
- Coverage   28.15%   28.06%   -0.09%     
==========================================
  Files         256      257       +1     
  Lines       18536    18595      +59     
==========================================
  Hits         5218     5218              
- Misses      12097    12156      +59     
  Partials     1221     1221              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

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

LGTM

@cloudxxx8 cloudxxx8 merged commit 74c8cdb into edgexfoundry:main Jan 20, 2025
7 checks passed
@weichou1229 weichou1229 deleted the purge-events branch January 20, 2025 06:35
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.

Remove events and readings when device deleted

3 participants