Skip to content

Conversation

optionsome
Copy link
Member

@optionsome optionsome commented Oct 14, 2025

Summary

This continues the work from #6704

Temporary vertex creation is moved to routing worker so we don't do it separately for access/egress and direct searches. TemporaryVerticesContainer is now used for coordinate visit via locations as well.

Functional changes:

  • Names for unlabeled visit via location coordinate vertices have now translatable default name
  • visit via location coordinate locations are now validated similarly as origin and destination and if they cannot be connected to street network, a routing error will be returned

Issue

Relates to #6501

Unit tests

The testing situation should be refactored.

Documentation

Not needed

Changelog

Skipped

optionsome and others added 30 commits June 17, 2025 23:29
@optionsome optionsome added this to the 2.9 (next release) milestone Oct 14, 2025
@optionsome optionsome requested a review from a team as a code owner October 14, 2025 17:41
@optionsome optionsome added !Technical Debt Improve code quality, no functional changes. +Bump Serialization Id Add this label if you want the serialization id automatically bumped after merging the PR +Skip Changelog This is not a relevant change for a product owner since last release. labels Oct 14, 2025
@optionsome optionsome marked this pull request as draft October 14, 2025 17:42
@optionsome
Copy link
Member Author

We need to figure out what to do with the tests. I feel like there are currently too many of them in too many places and a lot of them are not really that well implemented.

Copy link

codecov bot commented Oct 14, 2025

Codecov Report

❌ Patch coverage is 82.44444% with 79 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.26%. Comparing base (3f925aa) to head (69505ad).
⚠️ Report is 106 commits behind head on dev-2.x.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...planner/routing/linking/LinkingContextFactory.java 87.44% 12 Missing and 15 partials ⚠️
...a/service/DefaultViaCoordinateTransferFactory.java 0.00% 12 Missing ⚠️
...entripplanner/routing/algorithm/RoutingWorker.java 52.38% 9 Missing and 1 partial ⚠️
...oradapter/transit/mappers/RaptorRequestMapper.java 62.50% 4 Missing and 2 partials ⚠️
...planner/routing/linking/LinkingContextRequest.java 91.11% 1 Missing and 3 partials ⚠️
...outing/linking/configure/LinkingServiceModule.java 0.00% 4 Missing ⚠️
...rg/opentripplanner/visualizer/GraphVisualizer.java 0.00% 4 Missing ⚠️
...lanner/standalone/api/OtpServerRequestContext.java 0.00% 3 Missing ⚠️
...va/org/opentripplanner/apis/gtfs/GraphQLUtils.java 0.00% 2 Missing ⚠️
...entripplanner/routing/graphfinder/GraphFinder.java 0.00% 1 Missing and 1 partial ⚠️
... and 4 more
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6972      +/-   ##
=============================================
+ Coverage      72.11%   72.26%   +0.14%     
- Complexity     19764    19912     +148     
=============================================
  Files           2151     2160       +9     
  Lines          80008    80231     +223     
  Branches        8072     8093      +21     
=============================================
+ Hits           57698    57976     +278     
+ Misses         19455    19398      -57     
- Partials        2855     2857       +2     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


private LinkingContext createLinkingContext(TemporaryVerticesContainer container) {
var linkingRequest = LinkingContextRequestMapper.map(request);
return serverContext.linkingContextFactory().create(container, linkingRequest);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put this factory in the server context. I'm a bit on the edge if it actually made sense or not.

* are no longer needed, this class removes the temporary vertices and edges. It implements
* AutoCloseable and the cleanup is automatically done with a try-with-resources statement.
*/
public class TemporaryVerticesContainer implements AutoCloseable {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this includes edges, not vertices and it disposes both. Not sure if we should rename it.

@optionsome optionsome force-pushed the temporary-vertex-refactor branch from 9bc41a7 to 172389b Compare October 20, 2025 07:52
@optionsome optionsome marked this pull request as ready for review October 20, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Bump Serialization Id Add this label if you want the serialization id automatically bumped after merging the PR +Skip Changelog This is not a relevant change for a product owner since last release. !Technical Debt Improve code quality, no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants