Skip to content

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

Merged
optionsome merged 3 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:fix-late-cancellations
Apr 3, 2024
Merged

optionsome merged 3 commits into
opentripplanner:dev-2.xfrom
HSLdevcom:fix-late-cancellations

Conversation

@optionsome

@optionsome optionsome commented Mar 1, 2024 •

Copy link
Copy Markdown
Member

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 Apply to issues describing a bug and PRs witch fixes it. +Real-Time 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
@codecov

codecov Bot commented Mar 1, 2024 •

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

@optionsome

Copy link
Copy Markdown
Member Author

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

@leonardehrenfried

leonardehrenfried commented Mar 28, 2024 •

Copy link
Copy Markdown
Member

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

@t2gran

t2gran commented Apr 2, 2024

Copy link
Copy Markdown
Member

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
@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 Apply to issues describing a bug and PRs witch fixes it. Digitransit Test Feature is under testing in Digitransit environment(s) +Real-Time 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