-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Support building arbitrary versions from PRs #2465
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
Comments
A smaller(?) proposal that would still be helpful for reviewing doc changes: Building on demand would obviously be slow & expensive if several people click it (or one clicks around pages...), so the build has to be cached for some time. At later stage, could integrate webhooks, which allows to:
|
+1 for this option
Also exposing the build logs (no generate docs, just logs). |
I was thinking that this feature can be implemented like this:
With that RTD will need to have a section for managing this (manual rebuild, deactivate and so on). When be the PRs deleted? Not sure about that, in case of GitHub we can configure a webhook. Also, when building a oficial version we can check if the repo contains a branch from a PR I think, and then delete those docs. |
In any case, if we serve the PR's built documentation, we should think about how cleanup these ones (e.g. remove the docs after the PR is merged/after a couple of days/etc) otherwise we will end up with Gigabytes of useless documentation. |
We can use this option from git (or gitpython) to check if a branch was merged https://git-scm.com/docs/git-branch#git-branch---mergedltcommitgt I can see a problem when a PR is closed and we don't receive that info from the webhook (some connection error, for example). If we don't want to hit the api to know the PR status, we can have a max lifetime for each PR since the last build. Again, that can be checked on each build from an official version. |
Would any of the code or ideas from Precog be useful in designing this? The hosted service is defunct, but the code is there under an open license. It's a webhook-driven Flask app which supports per-PR static sites by linking to the artifacts from a corresponding CircleCI build. I'm currently looking into options for auto-building doc previews for the assorted pypa projects (setuptools, pip, etc.), in order to expedite reviews of doc changes. It would be great if RTD could handle this, since the repos are already integrated with it and publish the docs there. It seems like there are a few different tickets now for largely the same thing, and each mentions some of the blockers. Should those blockers be prioritized and broken out into separate tickets so we can start making progress on them? Something like:
|
Another thing to consider is probably excluding the PRs from the search engines since we don't want people to arrive to these "in progress" docs. Besides, I think we don't want to build each PR that's generated (otherwise we will end up with many stale docs versions that nobody will read or that will confuse users). We might want to build only those that touches some specific files (under docs/ for example). Also, we don't want to show these versions in the flyout. Maybe a |
We have this feature in beta https://blog.readthedocs.com/building-docs-for-pull-requests/ |
Closing as this feature has been implemented. :) |
We have a number of design decisions to make around how to support building an arbitrary version/repo from a PR status update from GitHub/Bitbucket/Gitlab. We will need to decide the scope of how these versions are hosted, how we track the status updates, and if we need to make temporary version/projects to support arbitrary versions/contributor repos. The integrations will also need to track the attached GitHub PR, as the status update will send us a
pk
to send updates against -- at least in the case of GitHub.The text was updated successfully, but these errors were encountered: