wikipathways / wikipathways-development

Roadmap planning, developer documentation, contribution guidelines
2 stars 0 forks source link

Concurrency for on_gpml_change #67

Closed AlexanderPico closed 2 years ago

AlexanderPico commented 2 years ago

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency

We currently specify:

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
  cancel-in-progress: true

which means that if a subsequent action is trigger, then the current one will be canceled.

I don't think we want this behavior, however. For example, if WP1 is changed, then the action starts. But if WP2 is changed within the ~5min that it takes to complete, then the WP1 job is canceled and the WP2 job is started, only updating WP2 files. Even worse, the WP1 job might be partially complete, so we could have updated tsv and info files, but not svgs and no sync with the jekyll repo.

I'm going to change this setting to cancel-in-progress: false and see if that creates the behavior we want.

AlexanderPico commented 2 years ago

By contrast, the other workflows (including GH Page builds) should cancel when overlapping, since the latest trigger will encompass all prior changes as well.

AlexanderPico commented 2 years ago

Tested fix with two consecutive pushes on two different GPMLS and the first instance of the workflow completed while the second was pending. Nice!

Screen Shot 2022-05-17 at 7 17 49 PM