Skip to content
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

Need an option to delay rebuilding #2593

Closed
iapyeh opened this issue Jan 16, 2017 · 5 comments
Closed

Need an option to delay rebuilding #2593

iapyeh opened this issue Jan 16, 2017 · 5 comments
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required

Comments

@iapyeh
Copy link

iapyeh commented Jan 16, 2017

Details

I think it is a good feature when a Github repository has new head, the project in the RTD got updated immediately. The problem is that if I commit several times in a short interval, the RTD would lock this project for 5 minutes.

This is a situation encountered by the GGeditor. GGeditor is a Google Docs add-on. It converts Google Docs document into reStructuredText and commits it to a Github repository. Due to the limitation of the API which is utilized for committing , if a document contains 10 images, the head of repository would be updated for 11 times in a short interval.

Expected Result

My suggestion is to have an option in the conf.py which would postpone the trigger of rebuilding for a while when a new head of repository is detected. For example, 60 seconds, and the timer would be reset if there is another new head been detected within 60 seconds. It would make sure rebuilding is been triggered only once after the last image-uploading has completed.

With this option, the RTD would also save resources of rebuilding.

References

@humitos humitos added Improvement Minor improvement to code Needed: design decision A core team decision is required labels Feb 23, 2017
@stsewd
Copy link
Member

stsewd commented May 17, 2018

Maybe #871 is a better solution?

@humitos
Copy link
Member

humitos commented Nov 15, 2018

More than a user option I think this should be an automatic protection from Read the Docs to avoid people triggering multiple (more than X) builds in the same minute.

We should something similar than skip=True at

https://github.com/rtfd/readthedocs.org/blob/4fa2746040aee0aafcdb09e0e5674dcb42ea9809/readthedocs/core/utils/__init__.py#L96-L101

We need to consider:

  • just skipping the trigger of the build could be confusing for the user
  • we could check the queue to see if there is already a build queued, remove it from the queue, and add the new one with the new commit (kind of complicated)
  • create a Build object but do not trigger it and mark it as FAILED with the correct error message (it will produce to the first build triggered to build and the last --which I think it's the most important-- to not build)

@humitos humitos added this to the New build features milestone Nov 15, 2018
@stsewd
Copy link
Member

stsewd commented Nov 15, 2018

What travis does when receiving multiple webhooks from the same PR is block the others and just build the last one.

@humitos
Copy link
Member

humitos commented Oct 28, 2020

I think this is solved in some way by the DEDUPLICATE_BUILDS feature flag that we recently added.

@stsewd
Copy link
Member

stsewd commented Dec 10, 2020

I think we can close this in favor of #7660 and #871 and the already implemented feature of deduplicate builds.

@stsewd stsewd closed this as completed Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

3 participants