Fix bug in OBS obs_stop for cmd_evt maneuver and improve default_stop handling #319
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.
Description
OBS obs_stop
This fixes a bug where an
OBS
statement coming from command events (during anomaly recovery) could have the wrongobs_stop
value.When an
OBS
statement is created it uses the time of the next maneuver or schedule stop to setobs_stop
. In normal processing those are always available, but for a maneuver in anomaly recovery neither are available and it uses a default 7 days in the future.Normally commands which change in any way by subsequent events or loads are detecting by the diff algorithm and replace. However the
obs_stop
update is just part of the commandparams
and this is not checked in the diffing. Doing so introduces false diffs due to small floating point precision issues. So this PR special-casesOBS
so that theparams
are included in the match key.KADI_COMMANDS_DEFAULT_STOP
An unrelated issue surfaced during testing that the
KADI_COMMANDS_DEFAULT_STOP
environment variable was not being applied as a filter to events the command events sheet. This was unexpected to me and would make it very difficult to do detailed "scenario testing" of stepping through the timeline of past events. In this case having the full history of command events meant that the code always had subsequent maneuvers so seeing the OBS problem was difficult.Interface impacts
None
Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
Detailed functional testing in
validate/pr319
. This demonstrates that the patch fixes the problem. This functional validation should work on HEAD.