Fix SIRI update travel back in time - #5867
Merged
vpaturet merged 4 commits intoJun 7, 2024
Merged
Conversation
vpaturet
force-pushed
the
fix_siri_update_travel_back_in_time
branch
2 times, most recently
from
May 24, 2024 14:28
2dc2265 to
a71c690
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #5867 +/- ##
=============================================
- Coverage 68.54% 68.47% -0.07%
+ Complexity 16732 16699 -33
=============================================
Files 1918 1914 -4
Lines 72734 72676 -58
Branches 7456 7454 -2
=============================================
- Hits 49854 49768 -86
- Misses 20310 20338 +28
Partials 2570 2570 ☔ View full report in Codecov by Sentry. |
Contributor
Author
Contributor
|
I do not see any reason why we/OTP should accept invalid data, so in my opinion, this is acceptable. |
vpaturet
force-pushed
the
fix_siri_update_travel_back_in_time
branch
from
May 29, 2024 09:35
a71c690 to
f3c38ed
Compare
vpaturet
force-pushed
the
fix_siri_update_travel_back_in_time
branch
from
May 29, 2024 09:51
f3c38ed to
e7e38e4
Compare
vpaturet
marked this pull request as ready for review
May 29, 2024 10:00
leonardehrenfried
previously approved these changes
May 30, 2024
t2gran
reviewed
Jun 3, 2024
t2gran
left a comment
Member
There was a problem hiding this comment.
The code looks ok, just a few questions.
leonardehrenfried
approved these changes
Jun 4, 2024
t2gran
approved these changes
Jun 7, 2024
t2gran
pushed a commit
that referenced
this pull request
Jun 7, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
As detailed in #5866, some combinations of SIRI messages lead to the creation of invalid trips where passing times do not increase along the journey.
This PR aims to fix one such scenario where:
The canceled trip can then be queried thanks to the API parameter
includeRealtimeCancellations=trueThe proposed fix is to validate the scheduled data in step 2 and rejects messages that contain invalid scheduled data.
Issue
Closes #5866
Unit tests
Added unit test