Skip to content

Don't trigger an instance list update in the UI for each PR every minute (OC-1541)

Boros Gábor requested to merge fix-flicker into master

Created by: bradenmacdonald

I noticed on our stage server that whenever the GitHub watcher checks the status of a PR, the "Loading..." indicator appears in the web UI and the instance list is refreshed. This is because after #63, the PR watcher ends up updating instance properties and calling .save() on each time it checks a PR.

With this change, the periodic PR watcher only updates the instance when the PR is new. To update an instance from an existing PR, you have to do it manually by clicking the "Update instance settings from PR" button in the web UI.

This should reduce load on the server slightly and eliminate the "Loading..." flicker, while also making behavior more predictable.

Alternative: The alternative would be to keep the current behavior of automatically updating instance settings from the PR every minute, but only call .save() when the new settings are different. However that is trickier to implement. I also don't like it as much conceptually, because then it's less clear if/when settings get updated from a PR.

Merge request reports