Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use gitpython to find a commit reference #3843
I think these changes are great, cleaner and nice to read.
Although, I want to mention some things that we need to consider if we want to migrate these simple git commands to a lib based code:
- how we will execute this inside Docker once we have the VCS code migrated to Docker?
- how we will present these commands to the user in the build log?
- if these commands are not needed to be presented to the user, we can just use
record_as_success=Trueand avoid these kind of problems
- since we are taking decisions on the
exit_codewe will need to check all the other VCS backends to see if this is not affecting them also
I think this PR really solves this particular bug and allows RTD to continue building the docs without problems but we need to consider those points and talk about a migration plan to gitpython/mercurial/bzr
Here are some others parts of code that depends on the original
I don't think the problem is necessarily that we're using exit_code. I don't think we can remove dependency on that for some of these cases. I'd rather see if we can move these calls to using a library though, as relying on our own parsing and interpretation of exit code for everything is where these bugs come from.
To @humitos questions:
Not sure yet. Monkey patching command execution to use our docker build command is a possibility. Not running in docker is another. Third would be application code that gets executed from the docker container
Many of these commands aren't important, there are better ways we can show some of this data. If we can monkey patch, commands will execute as normal