Skip to content

nightly builds: avoid triggered-by-schedule and triggered-by-merge builds cancelling each other? #278

@jameslamb

Description

@jameslamb

Description

See this idea from cuopt: NVIDIA/cuopt#1211

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 870244bbc..3ac171263 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -39,7 +39,7 @@ on:
         default: false
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}
+  group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.build_type || 'branch' }}

Doing this would the nightly-triggered build and builds merged from a PR cancelling each other.

I think we should do this across all of RAPIDS, what do you all think?

Benefits of this work

The most important guarantee is "ensure nightly builds actually run".

In the RAPIDS nightly pipeline (https://github.com/rapidsai/workflows/actions/workflows/nightly-pipeline.yaml), we use a workflow that polls for a specific workflow run to complete.

  cudf-build:
    steps:
      - uses: rapidsai/trigger-workflow-and-wait@1cd9c92f066afd29d5a9169f45dbf8d42e2a3e99 # v1
        with:
          owner: rapidsai
          repo: cudf
          workflow_file_name: build.yaml
          ref: ${{ fromJSON(needs.get-run-info.outputs.obj).branch }}
  ...
  cudf-tests:
    needs: [get-run-info, cudf-build]
    if: ${{ needs.cudf-build.result == 'success' && !cancelled() && inputs.run_tests }}
    steps:
      - uses: rapidsai/trigger-workflow-and-wait@1cd9c92f066afd29d5a9169f45dbf8d42e2a3e99 # v1

(rapidsai/workflows code)

main() {
    for run_id in $run_ids
    do
      wait_for_workflow_to_finish "$run_id"
    done
}

(rapidsai/trigger-workflow-and-wait code link

So a merged PR or other push cancelling the nightly build will have the effect of causing the nightly tests to be skipped.

Approach

Apply that patch from the cuopt PR to build.yaml files on main across RAPIDS.

Notes

Thanks to @rgsl888prabhu for the idea!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions