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

"Edit on Github" points to non-existing commit #3530

danielmitterdorfer opened this Issue Jan 18, 2018 · 2 comments


None yet
2 participants

danielmitterdorfer commented Jan 18, 2018


Expected Result

Each page of the Rally docs contains an "Edit on Github" link. Clicking on that link will open a Github page that shows the respective file's content.

Actual Result

Each page of the Rally docs contains an "Edit on Github" link. Clicking on that link opens a Github 404 page (except for "latest" which correctly points to master).

More detailed analysis

An example that demonstrates the problem is e.g. the current stable version. At the moment this link on the index page points to However, the problem is that 467b22ebaacde0366846696747c419e42bbc971b is not a valid commit in the Github repo

In the build output in the Readthedocs build id 6575685 we see a build step cat docs/ which shows (shortened):

#Add project information to the template context.
context = {
    'using_theme': using_rtd_theme,
    'html_theme': html_theme,
    'current_version': "stable",
    'version_slug': "stable",
    'MEDIA_URL': "",
    'versions': [
    ("latest", "/en/latest/"),
    ("stable", "/en/stable/"),
    ("0.9.0", "/en/0.9.0/"),
    ("0.8.1", "/en/0.8.1/"),
    ("0.8.0", "/en/0.8.0/"),
    'downloads': [ 
    ("pdf", "//"),
    ("htmlzip", "//"),
    ("epub", "//"),
    'subprojects': [ 
    'slug': 'esrally',
    'name': u'esrally',
    'rtd_language': u'en',
    'programming_language': u'py',
    'canonical_url': '',
    'analytics_code': 'None',
    'single_version': False,
    'conf_py_path': '/docs/',
    'api_host': '',
    'github_user': 'elastic',
    'github_repo': 'rally',
    'github_version': '467b22ebaacde0366846696747c419e42bbc971b',
    'display_github': True,
    'bitbucket_user': 'None',
    'bitbucket_repo': 'None',
    'bitbucket_version': '467b22ebaacde0366846696747c419e42bbc971b',
    'display_bitbucket': False,
    'gitlab_user': 'None',
    'gitlab_repo': 'None',
    'gitlab_version': '467b22ebaacde0366846696747c419e42bbc971b',
    'display_gitlab': False,
    'READTHEDOCS': True,
    'using_theme': (html_theme == "default"),
    'new_theme': (html_theme == "sphinx_rtd_theme"),
    'source_suffix': SUFFIX,
    'user_analytics_code': '',
    'global_analytics_code': 'UA-17997319-1',
    'commit': 'bd851fdc',

The commit key at the end actually points the correct commit whereas the github_version doesn't (that commit does not exist in the repo).

I also tried to define these keys explicitly as described in the VCS integration docs:

html_context = {
    "display_github": True,
    "github_user": "elastic",
    "github_repo": "rally",
    "github_version": "master",
    "conf_py_path": "/docs/"

However, I've seen in the build output of cat docs/ that the user configuration is explicitly overridden with the contents of context shown above.

Is there any possibility to either manually inject a commit hash or use the same commit hash in github_version and commit?


This comment has been minimized.


stsewd commented Jan 18, 2018

Hi, thanks for reporting, I think this is a duplicate of #1820, it's because there are two hashes, one for the commit and other for the tag, GitHub doesn't recognize one of those.


This comment has been minimized.

danielmitterdorfer commented Jan 19, 2018

Thanks for your quick answer. This really sounds like the exact same problem as #1820 to which you pointed to. I'll just close this issue then as it is a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment