-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I think this is best explained with an example.
Suppose PR-1 and PR-2 both have deployed documentation in some repo (usually an high activity repo or one where doc generation takes a long time). Consider four points in time: u < x < y < z.
- At time u, PR-1 triggers the
doc-deploy-prworkflow. At this moment, the deployment contains documentation for both PR-1 and PR-2 (i.e.pull/1andpull/2directories exist on the gh-pages branch). - At time x, PR-2 is merged, which triggers the
doc-deploy-devworkflow. - That workflow finishes at time y, removing the deployed documentation for PR-2 (the pull/2 directory is removed).
- Later, at time z, the workflow that started at time u finishes.
The problem is that the workflow started at u still “thinks” PR-2 exists, because it captured the state before PR-2 was merged (i.e. had information about pull/2). When it finishes at z, it redeploys documentation for PR-2, effectively undoing the removal that happened at time y.
Is there a way we can avoid this?
This is leading to problems like this or this (repeated removal since subsequent runs of doc-deploy-dev will still remove documentation for a closed pull request even if it made its way back into deployment via the situation described above).