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

[chrome/nav/lastUrl] do not track redirect routes #13432

Merged
merged 4 commits into from
Aug 22, 2017

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Aug 9, 2017

Fixes #12933

Summary:
When you navigate to a URL that Kibana doesn't recognize it tries to be helpful and send you to discover. At the same time it tries to remember the URL you were last using in each app and bring back where you left off when you come back. Unfortunately, these two features recently collided. If you somehow ended up at an unknown URL that looked like the URL for an app other than discover Kibana would get confused and remember the bad URL and immediately redirect you to discover. If you didn't give up right away you would probably try to go back to the app, but since it Kibana is trying to be helpful it would send you right back to the bad URL and then back to discover... Stupid right?! Well, it won't happen anymore!

The chrome currently updates the lastUrl of each app whenever there is a navigation, even if the matched route is just redirecting users elsewhere. I can't think if a time that tracking the url of a redirect as the lastUrl of an app would be desired, so this just filters out such navigation events.

@tylersmalley
Copy link
Contributor

fail: "dashboard app dashboard clone clone warns on duplicate name"

Is this failure un-related?

@spalger
Copy link
Contributor Author

spalger commented Aug 10, 2017

Yeah, jenkins test this again please

@stacey-gammon
Copy link
Contributor

Sounds unrelated. If it passes this time, file an issue and I'll take a look to see what can be done.

@tylersmalley
Copy link
Contributor

Appears to have failed with a different error now.

Here are the previous failures:

https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-selenium/6605
https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-selenium/6628

Jenkins, test it

@tylersmalley
Copy link
Contributor

@stacey-gammon created issue #13455

Copy link
Contributor

@tylersmalley tylersmalley left a comment

Choose a reason for hiding this comment

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

LGTM once the tests pass

@stacey-gammon
Copy link
Contributor

Failed this time on:

09:14:31.822    └- ✖ fail: "status page should show the kibana plugin as ready"
09:14:31.822    │        tryForTime timeout: Error: tryForTime timeout: Error: tryForTime timeout: NoSuchElement: An element could not be located on the page using the given search parameters.
09:14:31.822    │           at /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/node_modules/leadfoot/lib/findDisplayed.js:37:21
09:14:31.822    │           at /var/lib/jenkins/workspace/elastic+kibana+pull-request+multijob-selenium/node_modules/dojo/Promise.js:156:41

@spalger
Copy link
Contributor Author

spalger commented Aug 21, 2017

@stacey-gammon @tylersmalley looks like there was an actual bug; the kbnChrome directive was assuming that the ngRoute module was included, which is an opt-in feature for apps and not enabled in apps like the status page.

Copy link
Contributor

@stacey-gammon stacey-gammon left a comment

Choose a reason for hiding this comment

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

lgtm, works nicely, thanks!

@spalger spalger merged commit 9a34992 into elastic:master Aug 22, 2017
spalger added a commit that referenced this pull request Aug 22, 2017
* [chrome/nav/lastUrl] do not track redirect routes

* [chrome/subUrl] always track subUrl when no router

(cherry picked from commit 9a34992)
spalger added a commit that referenced this pull request Aug 22, 2017
* [chrome/nav/lastUrl] do not track redirect routes

* [chrome/subUrl] always track subUrl when no router

(cherry picked from commit 9a34992)
spalger added a commit that referenced this pull request Aug 22, 2017
* [chrome/nav/lastUrl] do not track redirect routes

* [chrome/subUrl] always track subUrl when no router

(cherry picked from commit 9a34992)
@spalger
Copy link
Contributor Author

spalger commented Aug 22, 2017

5.6: 4151edf
6.0: 4e56808
6.x/6.1: dc59532

@spalger spalger deleted the fix/redirects-as-last-url branch August 22, 2017 05:35
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Nov 20, 2017
* [chrome/nav/lastUrl] do not track redirect routes

* [chrome/subUrl] always track subUrl when no router
chrisronline pushed a commit to chrisronline/kibana that referenced this pull request Dec 1, 2017
* [chrome/nav/lastUrl] do not track redirect routes

* [chrome/subUrl] always track subUrl when no router
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants