Skip to content

Break out events #1533

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

Merged
merged 42 commits into from
Aug 3, 2018
Merged

Break out events #1533

merged 42 commits into from
Aug 3, 2018

Conversation

frederoni
Copy link
Contributor

@frederoni frederoni commented Jul 2, 2018

Working towards #1500

  • Fix coding failures with routeLegProgress, applicationState, and startTimestamp
  • Refactor RouteController for testability and reusability (Vague, but I think we made good progress)
  • Move all event-related code out of RouteController, and test-drive it into a new private component resembling a RouteControllerEventsDelegate, who receives RouteControllerDelegate messages from the RouteController, generates telemetry events and other notifications, and passes RouteControllerDelegate messages onward

--

Jerrad's Tasks

@frederoni frederoni force-pushed the events-1500 branch 2 times, most recently from 9872c38 to 4d855c2 Compare July 2, 2018 17:59
@JThramer JThramer added ⚠️ DO NOT MERGE PR should not be merged! op-ex Refactoring, Tech Debt or any other operational excellence work. status: in progress topic: location topic: telemetry labels Jul 10, 2018
…ving `locationManager` dependency from RouteController entirely.
…represented in a way the JSON serializer could understand
@bsudekum
Copy link
Contributor

@JThramer Saw an issue with a few drives yesterday where the reroute status view was shown constantly although it never actually needed to reroute nor did it actually end up rerouting.

Copy link
Contributor

@JThramer JThramer left a comment

Choose a reason for hiding this comment

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

A regression has occurred where the puck never moves on a real navigation session -- I suspect this has something to do with the routeController not emitting progress updates.

JThramer
JThramer previously approved these changes Jul 31, 2018
@JThramer
Copy link
Contributor

Issue with rerouting regression has been fixed. Still need to do one more regression test and make sure events are sending okay.

@JThramer
Copy link
Contributor

Didn't mean to approve, just blow away the "Changes Requested." No biggie, we'll just have another approval before merge.

NotificationCenter.default.addObserver(self, selector: #selector(progressDidChange(notification:)), name: .routeControllerProgressDidChange, object: self)
NotificationCenter.default.addObserver(self, selector: #selector(willReroute(notification:)), name: .routeControllerWillReroute, object: self)
NotificationCenter.default.addObserver(self, selector: #selector(didReroute(notification:)), name: .routeControllerDidReroute, object: self)
NotificationCenter.default.addObserver(self, selector: #selector(didRecieveTerminationWarning), name: .UIApplicationWillTerminate, object: nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Recieve -> Receive

Ends the current navigation session.
*/
@objc public func endNavigation(feedback: EndOfRouteFeedback? = nil) {
if !didSendCancelEvent {
Copy link
Contributor

Choose a reason for hiding this comment

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

This change would result in under-logging events if RouteControllers are reused. Or is that already well known not to be valid?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm asking partly because this is a public method which may imply a certain semantic.

Copy link
Contributor

Choose a reason for hiding this comment

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

AFAIK, RouteController is not designed to be reused at this time.

Copy link
Contributor

Choose a reason for hiding this comment

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

@akitchen hmm, so yeah in talking with @bsudekum , it sounds like it might be possible (although out of design scope) to reuse the RouteController, possibly by changing RouteController.routeProgress (as you’re replacing the thing that the Routecontroller is iterating over)… I could reset that flag on routeProgressdidSet as a defensive measure, how's that sound?

@JThramer
Copy link
Contributor

JThramer commented Aug 1, 2018

🎵 Scooter Gang, Scooter Gang, Scooter Gang... 🎵

Scooter Gang.

🎉 After extensive drivescoot-testing today, I have confirmed that the following events are received by the telemetry system:

  • navigation_cancel
  • navigation_reroute
  • navigation_feedback
  • navigation_arrive
  • navigation_depart

I'm going to call this ✅ for purposes of regression-testing telemetry events.

@frederoni frederoni force-pushed the events-1500 branch 3 times, most recently from fba5542 to ac774ff Compare August 2, 2018 12:10
@akitchen akitchen dismissed JThramer’s stale review August 2, 2018 16:48

Done in error

@JThramer JThramer merged commit b7918a9 into master Aug 3, 2018
@JThramer JThramer deleted the events-1500 branch August 3, 2018 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
op-ex Refactoring, Tech Debt or any other operational excellence work. topic: location topic: telemetry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants