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 issues in SiriAzure initialization #5760

Merged

Conversation

habrahamsson-skanetrafiken
Copy link
Contributor

@habrahamsson-skanetrafiken habrahamsson-skanetrafiken commented Mar 20, 2024

Summary

After discussions in the developer meeting this PR changes the OtpHttpClient to treat all 2xx http codes as successful and also adds a executeAndMapOptional() method to the OtpHttpClient.

Other than that there are only changes the SiriAzure sandbox code.

The changes in the SiriAzure code restructure some of the code in order to:

  • Accept 204 status from history service
  • Remove duplicate retry logic
  • Make sure that primed status is set correctly

Unit tests

This kind of high level glue code is unfortunately hard to test without doing a lot of mocking.

Bumping the serialization version id

Nope

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

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

Project coverage is 67.80%. Comparing base (384e1e6) to head (ee00762).
Report is 16 commits behind head on dev-2.x.

Files Patch % Lines
...ner/ext/siri/updater/azure/SiriAzureSXUpdater.java 0.00% 32 Missing ⚠️
...ner/ext/siri/updater/azure/SiriAzureETUpdater.java 0.00% 30 Missing ⚠️
...rg/opentripplanner/framework/io/OtpHttpClient.java 0.00% 17 Missing ⚠️
...t/siri/updater/azure/AbstractAzureSiriUpdater.java 0.00% 13 Missing ⚠️
...pdater/azure/SiriAzureInitializationException.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #5760      +/-   ##
=============================================
+ Coverage      67.79%   67.80%   +0.01%     
- Complexity     16519    16520       +1     
=============================================
  Files           1904     1905       +1     
  Lines          72263    72247      -16     
  Branches        7438     7440       +2     
=============================================
  Hits           48990    48990              
+ Misses         20754    20739      -15     
+ Partials        2519     2518       -1     

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

@habrahamsson-skanetrafiken
Copy link
Contributor Author

Note:
I saw that there was a discussion about the exceptions in the OtpHttpClient in the last developer meeting. I didn't attend the meeting so I missed any design decisions that were reached.

jtorin
jtorin previously approved these changes Mar 21, 2024
…ctAzureSiriUpdater.java

Co-authored-by: Leonard Ehrenfried <[email protected]>
@jtorin jtorin merged commit a26f450 into opentripplanner:dev-2.x Mar 28, 2024
5 checks passed
@jtorin jtorin deleted the fix-azure-siri-updater-history branch March 28, 2024 10:33
@t2gran t2gran added this to the 2.6 (next release) milestone May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants