Skip to content

Further improvements to how pull request documentation gets cleaned up. #1103

@moe-ad

Description

@moe-ad

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-pr workflow. At this moment, the deployment contains documentation for both PR-1 and PR-2 (i.e. pull/1 and pull/2 directories exist on the gh-pages branch).
  • At time x, PR-2 is merged, which triggers the doc-deploy-dev workflow.
  • 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions