Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kraken] change the way journey's status is computed #4086

Merged
merged 4 commits into from
Aug 28, 2023
Merged

Conversation

pbougue
Copy link
Contributor

@pbougue pbougue commented Aug 9, 2023

🔍 please review by commit with comment.

Stop taking into consideration the effect of disruptions associated, just consider the actual effect on pick-ups and drop-offs used by the journey.

Also:

  • Bug fix: really use RT validity-pattern to get the VJ available in RT (first commit)
  • Update doc accordingly
  • Update the conditions to add "bypass_disruptions" link
  • Just update tests impacted by the change (that covers almost all the new feature)
  • Add tests on SIGNIFICANT_DELAYS status (with bypass_disruptions link)
  • Minor changes (4th commit)

Doc: https://navitia.atlassian.net/wiki/spaces/NAV/pages/7024845232/Interfaces+v1+temps+r+el#Status-global-d%E2%80%99un-journey
JIRA: https://navitia.atlassian.net/browse/NAV-2129

Pierre-Etienne Bougue added 3 commits August 7, 2023 12:54
Sometimes none is available because the whole VJ is removed.
So getting the freshest returns a VJ unusable in RT.

Fixes almost "invisible" bug in
#3995: case of a trip being
canceled by a disruption without NO_SERVICE effect (see fixed test).
Not taking into consideration the effect of disruptions associated, just
the actual effect on pick-ups and drop-offs used by the journey.

Also:
* Update doc accordingly
* Update the conditions to add "bypass_disruptions" link
* Just update tests impacted by the change

TODO (next commit):
* Add tests on SIGNIFICANT_DELAYS status (with bypass_disruptions link)

https://navitia.atlassian.net/wiki/spaces/NAV/pages/7024845232/Interfaces+v1+temps+r+el#Status-global-d%E2%80%99un-journey
JIRA: https://navitia.atlassian.net/browse/NAV-2129


For the record, already existing tests (after fix):
* Status empty with no disruption at all: routing_api_test.cpp:896 + kirin_realtime_tests.py:3750 + 4037 + 4193
* Status empty with disruption on line and stop (no actual effect): routing_api_test.cpp:1987
* Status empty with disruption on network and stop (no actual effect): routing_api_test.cpp:2037
* bypass_disruptions link with NO_SERVICE status (disruption blocking stop): chaos_disruptions_tests.py:555
* NO_SERVICE with blocking disruption on line: chaos_disruptions_tests.py:949
* MODIFIED_SERVICE after stop-add: kirin_realtime_tests.py:977
* MODIFIED_SERVICE after DETOUR (using added stop): kirin_realtime_tests.py:1734
* MODIFIED_SERVICE after trip-add: kirin_realtime_tests.py:1906 + 2720 + 2855
* NO_SERVICE after rail-section DETOUR (using blocked stop): kirin_realtime_tests.py:3544
* NO_SERVICE after disruption REDUCED_SERVICE (using deleted stop): kirin_realtime_tests.py:3673
* Status empty with REDUCED_SERVICE on other stops: kirin_realtime_tests.py:3682
* NO_SERVICE after NO_SERVICE disruption on stop_area: kirin_realtime_tests.py:3723
* NO_SERVICE (adapted journey) after REDUCED_SERVICE disruption (using deleted stop): kirin_realtime_tests.py:3889
* Status empty after NO_SERVICE disruption on passing stop_area: kirin_realtime_tests.py:3731
* Status empty after NO_SERVICE rail_section disruption and a kirin REDUCED_SERVICE that "unlock" the end of the trip: kirin_realtime_tests.py:3964
* NO_SERVICE after NO_SERVICE rail_section disruption: kirin_realtime_tests.py:4115 + 4122
Also add a test on a journey having both deleted and delayed stops
* handle C++ warning
* typo
@sonarcloud
Copy link

sonarcloud bot commented Aug 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

79.7% 79.7% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.14.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@pbougue pbougue merged commit 653723c into dev Aug 28, 2023
9 checks passed
@pbougue pbougue deleted the journey_status branch August 28, 2023 08:06
@pbougue pbougue changed the title Kraken: change the way journey's status is computed [Kraken] change the way journey's status is computed Aug 28, 2023
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.

2 participants