Skip to content

Fix Edit links on stable versions #3238

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

Closed
wants to merge 5 commits into from

Conversation

techtonik
Copy link
Contributor

@techtonik techtonik commented Nov 10, 2017

This should fix at least #1637, #1820 and other duplicates.

The root cause is that RTD incorrectly converts version tag into git commit hash.

It was hard to figure out what's the cause, because:

  1. There are no sufficient details given in architecture section to locate where the conversion steps taking place.
  2. Build logs doesn't expose version info (STABLE?), tag (6.2.1) and commit hash (d423a9043d08150ad3eba83a0f4bc79788c64819 - which is wrong)
  • find tag to hash conversion code

@techtonik
Copy link
Contributor Author

techtonik commented Nov 10, 2017

Found tag to hash conversion code in vcs_support/backends/git.py. Now making changes.

This bug is a result of historic Git design, which treats annotated tags and non-annotated tags differently - see
https://public-inbox.org/git/CAPkN8x+MELCnttE+xptKzYXsYPWqbiE59LABrwNBhFroayc+wQ@mail.gmail.com/T/#u for details.

@techtonik techtonik changed the title (WIP) Fix Edit links on stable versions Fix Edit links on stable versions Nov 10, 2017
@RichardLitt
Copy link
Member

Thanks @techtonik. Let us know when this is ready to review! Also, if there were any steps that would have been clearer in the documentation to help you and future people touching this part of the code out, perhaps you could add a note in the docs along with this PR. For instance, a section on conversion steps would be good.

@techtonik
Copy link
Contributor Author

@RichardLitt it is now ready to review.

About documentation. #3240 is the proposal how to make docs more logical, which make architecture page the main entrypoint. Because I could not discover any other entrypints.

Even though I send the patch, I still haven't got the big picture how RTD works.

The surprising thing was to learn that build process is handled by Django application. From architecture page I expected to learn how the build process is started, who starts it, how to test the build step without Django. Who reads the repo metadata - GitHub plugin for Sphinx or somebody else? Where does this metadata passed? Is there an intermediary step where all metadata between steps can be statically explored, maybe in Travis logs.

For me, a good example of architecture docs is here - it describes simple yaml converter in sufficient detail to start working on the code right away without much experiments and preliminary test.

And to make matters worse - the showstopper why I haven't fixed this 6 months ago is here #1820 (comment) - run into some Django magic, but I don't use Django, so I didn't know where to go next.

This should return dereferenced hash that points to commit
@techtonik
Copy link
Contributor Author

Closing in favour of #3302.

@techtonik techtonik closed this Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants