Skip to content

Improve resiliency of the Transmodel API - #4806

Merged
hannesj merged 1 commit into
opentripplanner:dev-2.xfrom
entur:otp2_imrove_resiliency
Feb 15, 2023
Merged

hannesj merged 1 commit into
opentripplanner:dev-2.xfrom
entur:otp2_imrove_resiliency

Conversation

@hannesj

@hannesj hannesj commented Feb 7, 2023 •

Copy link
Copy Markdown
Contributor

Summary

This PR contains two one improvement:

  • If an error is thrown from the parsing of the request, we generate a TripPlan, which we can show to the user together with the error. In this we include coordinates, which might be null, which will lead to an NPE. Instead pass in null all the way, and serialize it as 0 in the API, as it is a non-nullable type.
  • Validation was made stricter to relaxGeneralizedCostAtDestination recently, which will throw an error if an invalid value is specified. Instead pre-validate the value and only set it if valid. Removed, as all clients are now fixed. However we should improve validation somehow already when parsing the value.

@hannesj hannesj added !Improvement A functional improvement or micro feature Entur On Entur Roadmap labels Feb 7, 2023
@hannesj hannesj added this to the 2.3 milestone Feb 7, 2023
@hannesj
hannesj requested a review from t2gran February 7, 2023 17:38
@hannesj
hannesj requested a review from a team as a code owner February 7, 2023 17:38
@hannesj
hannesj marked this pull request as draft February 9, 2023 15:51
@hannesj
hannesj force-pushed the otp2_imrove_resiliency branch from 8649290 to 14ee947 Compare February 14, 2023 08:53
@hannesj
hannesj marked this pull request as ready for review February 14, 2023 08:55
@codecov

codecov Bot commented Feb 14, 2023

Copy link
Copy Markdown

Codecov Report

Base: 62.14% // Head: 62.13% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (14ee947) compared to base (bfbb282).
Patch coverage: 12.50% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #4806      +/-   ##
=============================================
- Coverage      62.14%   62.13%   -0.01%     
- Complexity     13002    13004       +2     
=============================================
  Files           1650     1650              
  Lines          66064    66076      +12     
  Branches        7184     7188       +4     
=============================================
+ Hits           41057    41058       +1     
- Misses         22667    22679      +12     
+ Partials        2340     2339       -1     
Impacted Files Coverage Δ
...nner/routing/algorithm/mapping/TripPlanMapper.java 30.76% <0.00%> (-13.68%) ⬇️
...er/ext/transmodelapi/model/plan/PlanPlaceType.java 70.93% <20.00%> (-7.28%) ⬇️
...g/opentripplanner/api/parameter/QualifiedMode.java 65.78% <0.00%> (-2.64%) ⬇️
.../java/org/opentripplanner/astar/model/BinHeap.java 81.94% <0.00%> (+1.38%) ⬆️
...ripplanner/model/transfer/ConstrainedTransfer.java 83.33% <0.00%> (+3.33%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@hannesj
hannesj merged commit ae8c4be into opentripplanner:dev-2.x Feb 15, 2023
t2gran pushed a commit that referenced this pull request Feb 15, 2023
@hannesj
hannesj deleted the otp2_imrove_resiliency branch February 15, 2023 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Entur On Entur Roadmap !Improvement A functional improvement or micro feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants