-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Dont link to dashboard from footer #6353
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
Dont link to dashboard from footer #6353
Conversation
Closes readthedocs#6137 We use the `get_absolute_url` in other parts of the code where it makes sense to link to the dashboard. So I'm adding an additional parameter.
@@ -235,11 +240,12 @@ class TestFooterPerformance(APITestCase): | |||
|
|||
# The expected number of queries for generating the footer | |||
# This shouldn't increase unless we modify the footer API | |||
EXPECTED_QUERIES = 9 | |||
EXPECTED_QUERIES = 13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this is less than ideal. Is this some number of additional queries for each version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The explanation is the commit
We were testing with non-build versions.
But in production is more common to hit this with build versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That number is the "normal" number of queries, we were testing for a no common case where the version wasn't built
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, it's in the version_compare data. I wonder if we should be caching this, seems simple enough to cache if it's a lot of our footer queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will never look at commit messages in PR's, so it's probably better to put it in the PR description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
This is a better approach for readthedocs#6353
We use the
get_absolute_url
in other parts of the codewhere it makes sense to link to the dashboard.
So I'm adding an additional parameter.
Closes #6137