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

Improve error handing in case of invalid route responses #4618

Merged
merged 5 commits into from
Mar 27, 2024

Conversation

azarovalex
Copy link
Contributor

Description

Our SDK allows developers to override RoutingProvider to implement their own logic for route calculation.
We can assume that our own implementation always returns a valid route response, however that's not a case for a custom implementation. Currently, in case the response is invalid, in some branches we silently ignore errors without reporting back to the application that the route was invalid.

Implementation

This PR fixes cases where RouteController didn't report errors about invalid route to its delegate.

@azarovalex azarovalex self-assigned this Mar 27, 2024
@azarovalex azarovalex requested a review from a team as a code owner March 27, 2024 13:34
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.54%. Comparing base (38b45ba) to head (a494332).

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4618   +/-   ##
=======================================
  Coverage   60.54%   60.54%           
=======================================
  Files         189      189           
  Lines       21297    21297           
=======================================
  Hits        12894    12894           
  Misses       8403     8403           

Copy link
Contributor

@Udumft Udumft left a comment

Choose a reason for hiding this comment

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

LGTM with 1 correction. Also, please mention this fix in the CHANGELOG

Sources/MapboxCoreNavigation/RouteController.swift Outdated Show resolved Hide resolved
@azarovalex azarovalex force-pushed the azarovalex/fix-reroute-callbacks branch from 9bcf48f to 9fc81fe Compare March 27, 2024 14:38
@azarovalex azarovalex merged commit 42d6a2d into main Mar 27, 2024
21 checks passed
@azarovalex azarovalex deleted the azarovalex/fix-reroute-callbacks branch March 27, 2024 15:14
@azarovalex azarovalex restored the azarovalex/fix-reroute-callbacks branch March 27, 2024 15:23
@azarovalex azarovalex deleted the azarovalex/fix-reroute-callbacks branch March 27, 2024 15:23
azarovalex added a commit that referenced this pull request Apr 15, 2024
* Use camera options to calculate zoom for overview camera (#4593)

* Use camera options to calculate zoom for overview camera

* Create dependabot.yml

Enable Dependabot version updates

* Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github/codeql-action from 2 to 3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fixed the possible situation when the upcoming route leg is rendered above the active route leg (#4589)

* Add the ability to set locale for top and bottom banner views (#4595)

* Implement configurable waypoints in CarPlayDelegate

* Update Tests/MapboxNavigationTests/CarPlayUtils.swift

Co-authored-by: Nastassia Makaranka <nastassia.makaranka@mapbox.com>

* Update CHANGELOG.md

Co-authored-by: Nastassia Makaranka <nastassia.makaranka@mapbox.com>

* Update dependencies (#4614)

* vk/dependencies-update: bumped Directions to 2.12.0, Maps to 10.16.5. Now compatible with Turf 2.7.0.

* vk/dependencies-update: CHANGELOG updated

* vk/dependencies-update: bumped NN to v202; update cocoapods in gemfile to 1.14

* vk/dependencies-update: unit tests fix

* Sync Package.resolved with last resolved dependencies

* Update CHANGELOG.md

* Sync CocoaPodsTest

---------

Co-authored-by: Udumft <viktor.kononov@mapbox.com>

* Fix SystemSpeechSynthesizer related main thread hang on NavigationViewController creation (#4617)

* Don't check if AVSpeechSynthesizer.isSpeaking when unmuting it

* add changelog entry

* Improve error handing in case of invalid route responses (#4618)

* Improve error handing in case of invalid route responses

* Fix the order in which delegate is notified about failed reroute attempt

* Fix for old Swift compiler versions

* Fixed project structure in Carthage integration

* Added changelog entry

* Fix Examples signing when building on a real device (#4619)

* Fix Examples signing when building on a real device

* Replace build phases with the new script in 3 test targets

* Grant exec permissions to the script

* Fix carplay background maneuver card

* Fix method annotation and desctiption

* Update changelog

* Fix compile errors

* Update breaking changes list

* Update changelog

* Update spelling

* Fix spelling

* Update CHANGELOG.md

* Update NN and Maps (#4628)

* Update NN and Maps

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Nastassia Makaranka <nastassia.makaranka@mapbox.com>
Co-authored-by: Thibaud Lopez Schneider <ThibaudLopez@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max <max.chizhavko@mapbox.com>
Co-authored-by: Max <70526783+chizhavko@users.noreply.github.com>
Co-authored-by: Udumft <viktor.kononov@mapbox.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants