Skip sensor runs from same tick that use same run key #27990
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
Sensors are supposed to skip subsequent
RunRequests
that have the same run key as a previous run. This works across ticks but not forRunRequests
within the same tick-- currently two runs will be launched with the same key from within the same tick.This PR amends the sensor daemon logic to ensure that sensor
RunRequests
with the same run key are handled the same as they are across runs.User @Gw1p submitted an initial attempt here at fixing this but an alternative approach was required to ensure identical handling of cross-tick and same-tick duplicates.
How I Tested These Changes
New unit test.
Changelog
Fixed a bug where a sensor emitting multiple
RunRequests
with the same run key within a single tick would cause two runs with the same key to be executed. Now only the first run will be executed.Co-authored by: Anton [email protected]