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

NAVAND-547 route refresh for new annotations #7582

Merged
merged 9 commits into from
Oct 27, 2023

Conversation

VysotskiVadim
Copy link
Contributor

Description

Companion PR for mapbox/mapbox-java#1567

@github-actions
Copy link

github-actions bot commented Oct 25, 2023

Changelog

Features

  • Route refresh now refreshes LegAnnotation#freeflowSpeed and LegAnnotation#currentSpeed. [#7582](https://github.com/mapbox/mapbox-navigation-android/pull/7582)

Bug fixes and improvements

  • Optimised memory and network usage. [#7555](https://github.com/mapbox/mapbox-navigation-android/pull/7555)
  • Fixed an issue where route refreshes might not have been paused after invoking RouteRefreshController#pauseRouteRefreshes. [#7579](https://github.com/mapbox/mapbox-navigation-android/pull/7579)
  • Fixed an issue when alertcCodes and trafficCodes were lost during route refresh. [#7568](https://github.com/mapbox/mapbox-navigation-android/pull/7568)

Known issues ⚠️

Other changes

Android Auto Changelog

Features

Bug fixes and improvements

  • The app is now considered as the one in active navigation only when an active route is set to MapboxNavigation. Previously it was always considered active. [#7366](https://github.com/mapbox/mapbox-navigation-android/pull/7366)
  • When Android Auto host tells the app to stop active navigation because another app starts navigating, now SDK will enter FreeDrive mode instead of stopping trip session completely. [#7366](https://github.com/mapbox/mapbox-navigation-android/pull/7366)

@VysotskiVadim VysotskiVadim added the needs backporting Requires cherry-picking to a currently running release branch label Oct 26, 2023
@VysotskiVadim VysotskiVadim marked this pull request as ready for review October 26, 2023 13:28
@VysotskiVadim VysotskiVadim requested a review from a team as a code owner October 26, 2023 13:28
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Merging #7582 (f9d359a) into main (116880d) will increase coverage by 0.00%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #7582   +/-   ##
=========================================
  Coverage     74.15%   74.15%           
- Complexity     6154     6156    +2     
=========================================
  Files           830      830           
  Lines         32936    32952   +16     
  Branches       3933     3935    +2     
=========================================
+ Hits          24423    24437   +14     
  Misses         6978     6978           
- Partials       1535     1537    +2     
Files Coverage Δ
...gation/base/internal/route/AnnotationsRefresher.kt 98.95% <100.00%> (+0.14%) ⬆️
...n/core/routerefresh/DirectionsRouteDiffProvider.kt 78.72% <50.00%> (-2.68%) ⬇️

@@ -48,6 +48,16 @@ internal object AnnotationsRefresher {
newAnnotation,
startingLegGeometryIndex,
) { maxspeed() }
val freeFlowSpeed = mergeAnnotationProperty(
Copy link
Contributor

Choose a reason for hiding this comment

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

Some changes are also required in DirectionsRouteDiffProvider.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}
newAlternatives.forEach {
assertEquals(
"some info was lost during NN -> Nav SDK transition",
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

@VysotskiVadim VysotskiVadim Oct 26, 2023

Choose a reason for hiding this comment

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

it means that info from response doesn't match the info we get from NN

Copy link
Contributor

Choose a reason for hiding this comment

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

What does it have to do with the new annotation?

@@ -219,6 +219,8 @@ class AnnotationsRefresherTest(
.distance(listOf(1.2, 3.4, 5.6, 7.8, 9.0))
.duration(listOf(11.2, 33.4, 55.6, 77.8, 99.0))
.speed(listOf(41.0, 42.5, 43.1, 44.6, 45.9))
.freeflowSpeed(listOf(1, 2, 3, 4, 5))
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you also gonna test it in instrumentation tests? I see a lot of room for error for NN team, they already said something would be wrong after refresh.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which test do you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

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

The same, but with NN involved. :)
We already have some tests that test annotations refresh, we could just extend them.

@VysotskiVadim VysotskiVadim merged commit 06acb7e into main Oct 27, 2023
8 of 10 checks passed
@VysotskiVadim VysotskiVadim deleted the NAVAND-1547-route-refresh branch October 27, 2023 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs backporting Requires cherry-picking to a currently running release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants