fix: CoreData apply default retention policy to none autoEvent#5189
fix: CoreData apply default retention policy to none autoEvent#5189judehung merged 1 commit intoedgexfoundry:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5189 +/- ##
==========================================
+ Coverage 26.69% 26.74% +0.05%
==========================================
Files 278 278
Lines 19954 19993 +39
==========================================
+ Hits 5326 5347 +21
- Misses 13370 13387 +17
- Partials 1258 1259 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
08c2b66 to
7dbef6c
Compare
| break | ||
| } | ||
| continue |
There was a problem hiding this comment.
Any reason to make these change? looks no difference to me.
| } | ||
| var sources []string | ||
| for _, r := range profile.Profile.DeviceResources { | ||
| if contained := slices.ContainsFunc(device.AutoEvents, func(event models.AutoEvent) bool { |
There was a problem hiding this comment.
| if contained := slices.ContainsFunc(device.AutoEvents, func(event models.AutoEvent) bool { | |
| // skip the device resource that is associated with any AutoEvent definitions. | |
| if contained := slices.ContainsFunc(device.AutoEvents, func(event models.AutoEvent) bool { |
| }); contained { | ||
| continue | ||
| } | ||
| if r.Properties.ReadWrite == common.ReadWrite_W { |
There was a problem hiding this comment.
Please add comment to explain why skip resources with ReadWrite_W
| }); contained { | ||
| continue | ||
| } | ||
| if c.ReadWrite == common.ReadWrite_W { |
There was a problem hiding this comment.
Please add comment to explain why skip device command with ReadWrite_W
| sources = append(sources, r.Name) | ||
| } | ||
| for _, c := range profile.Profile.DeviceCommands { | ||
| if contained := slices.ContainsFunc(device.AutoEvents, func(event models.AutoEvent) bool { |
There was a problem hiding this comment.
| if contained := slices.ContainsFunc(device.AutoEvents, func(event models.AutoEvent) bool { | |
| // // skip the device command that is associated with any AutoEvent definitions. | |
| if contained := slices.ContainsFunc(device.AutoEvents, func(event models.AutoEvent) bool { |
CoreData apply default retention policy to events not coming from auto events Close edgexfoundry#5188 Signed-off-by: bruce <weichou1229@gmail.com>
|
…foundry#5189) CoreData apply default retention policy to events not coming from auto events Close edgexfoundry#5188 Signed-off-by: bruce <weichou1229@gmail.com>
…foundry#5189) CoreData apply default retention policy to events not coming from auto events Close edgexfoundry#5188 Signed-off-by: Bruce Huang <weichou1229@gmail.com>
…foundry#5189) CoreData apply default retention policy to events not coming from auto events Close edgexfoundry#5188 Signed-off-by: Bruce Huang <weichou1229@gmail.com>



CoreData apply default retention policy to events not coming from auto events
Close #5188
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:
BREAKING CHANGE:describing the break)Testing Instructions
Deploy core service and device-virtual to test the event purge.
New Dependency Instructions (If applicable)