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

Fix issue with cancellations on trip patterns that run after midnight #5719

Merged

Conversation

optionsome
Copy link
Member

@optionsome optionsome commented Mar 1, 2024

Summary

This fixes an issue that trips that belong to a trip pattern that has only trips which run after midnight on a specific date are used in routing despite being cancelled.

Issue

Closes #5718

Unit tests

Added

Documentation

Added javadoc.

Changelog

From title

@optionsome optionsome added Bug Real-Time Update The issue/PR is related to RealTime updates Digitransit Test Feature is under testing in Digitransit environment(s) labels Mar 1, 2024
@optionsome optionsome requested a review from a team as a code owner March 1, 2024 10:57
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 76.19048% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 67.80%. Comparing base (b833b37) to head (a3d0e67).
Report is 186 commits behind head on dev-2.x.

Files Patch % Lines
...ithm/raptoradapter/transit/TripPatternForDate.java 75.00% 2 Missing ⚠️
...r/transit/frequency/TripFrequencyAlightSearch.java 0.00% 1 Missing ⚠️
...er/transit/frequency/TripFrequencyBoardSearch.java 0.00% 1 Missing ⚠️
...oradapter/transit/mappers/TransitLayerUpdater.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5719      +/-   ##
=============================================
+ Coverage      67.71%   67.80%   +0.08%     
- Complexity     16390    16524     +134     
=============================================
  Files           1895     1904       +9     
  Lines          71937    72265     +328     
  Branches        7415     7438      +23     
=============================================
+ Hits           48711    48996     +285     
- Misses         20717    20752      +35     
- Partials        2509     2517       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@optionsome optionsome added this to the 2.5 (next release) milestone Mar 4, 2024
@vpaturet vpaturet self-requested a review March 5, 2024 10:23
@leonardehrenfried leonardehrenfried self-requested a review March 5, 2024 10:26
@leonardehrenfried
Copy link
Member

HSL and Entur will test this in their production systems.

@t2gran t2gran modified the milestones: 2.5, 2.6 (next release) Mar 13, 2024
@vpaturet
Copy link
Contributor

I've deployed the change in Entur staging environment and could not see any regression. I did not test specifically the cancellation scenario the change aims to fix.

vpaturet
vpaturet previously approved these changes Mar 20, 2024
@leonardehrenfried
Copy link
Member

If you write some documentation and tests, I'm happy to approve as well.

@optionsome
Copy link
Member Author

I have now added tests, renamed some things and added javadoc.

@leonardehrenfried
Copy link
Member

leonardehrenfried commented Mar 28, 2024

I'm happy to approve if @t2gran says that the rename to "serviceDate" is ok.

@t2gran
Copy link
Member

t2gran commented Apr 2, 2024

The date in TripPatternForDate is indeed serviceDate - sorry for doubt. Hopefully everyone now has an understanding of what running- and service-dates are.

@optionsome optionsome merged commit 978424c into opentripplanner:dev-2.x Apr 3, 2024
5 checks passed
@optionsome optionsome deleted the fix-late-cancellations branch April 3, 2024 18:59
t2gran pushed a commit that referenced this pull request Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Digitransit Test Feature is under testing in Digitransit environment(s) Real-Time Update The issue/PR is related to RealTime updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cancelled trips are used in routing if they belong to a trip pattern that only runs after midnight
4 participants