Skip to content

parallelize test stages in GitHub CI#768

Merged
dorotat-nv merged 10 commits into
mainfrom
dorotat/run-test-stages-in-parallel-ci
Mar 21, 2025
Merged

parallelize test stages in GitHub CI#768
dorotat-nv merged 10 commits into
mainfrom
dorotat/run-test-stages-in-parallel-ci

Conversation

@dorotat-nv
Copy link
Copy Markdown
Collaborator

@dorotat-nv dorotat-nv commented Mar 19, 2025

Description

Parallelising testing stages in GitHub CI to run in the same time to speedup pipeline
Added verify-tests-status as a final job that checks the tests status and if success or skipped, then success

Checked that everything works

EDIT:
Removed flag INCLUDE_NOTEBOOKS_TESTS since some of the notebooks do not pass CI pipeline, see
failed job logs.

Fix is being merged in #743

Current workflow in CI

  • run-test jobs run sequentially on one runner
  • image squashing need to run before the first (unit tests) job only
    ** duration: 18 min, see log
  • the pipeline duration if not SKIP_CI
    **minimum: image_squashing_time + duration_L0 ~ 50mins,
    **maximum: image_squashing_time + duration_L0, + duration_L1 + duration_docs ~ 2h

image

Proposed parallelization:

  • run-test jobs run in parallel since we have access to multiple runners
  • image squashing needs to run before each of the test job
    duration: 18 min, see log
  • the pipeline duration if not SKIP_CI
    **minimum: image_squashing_time + duration_L0 ~ 50mins,
    **maximum: image_squashing_time + max(duration_L0, duration_L1, duration_docs) ~1h10mins
  • no duration change to the default PR pipeline, other pipelines have smaller duration

image

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactor
  • Documentation update
  • Other (please describe):

CI Pipeline Configuration

Configure CI behavior by applying the relevant labels:

Note

By default, the notebooks validation tests are skipped unless explicitly enabled.

Authorizing CI Runs

We use copy-pr-bot to manage authorization of CI
runs on NVIDIA's compute resources.

  • If a pull request is opened by a trusted user and contains only trusted changes, the pull request's code will
    automatically be copied to a pull-request/ prefixed branch in the source repository (e.g. pull-request/123)
  • If a pull request is opened by an untrusted user or contains untrusted changes, an NVIDIA org member must leave an
    /ok to test comment on the pull request to trigger CI. This will need to be done for each new commit.

Usage

TODO: Add code snippet

Pre-submit Checklist

  • I have tested these changes locally
  • I have updated the documentation accordingly
  • I have added/updated tests as needed
  • All existing tests pass successfully

@dorotat-nv dorotat-nv self-assigned this Mar 19, 2025
@dorotat-nv dorotat-nv force-pushed the dorotat/run-test-stages-in-parallel-ci branch from e812faf to cd24fe2 Compare March 19, 2025 14:14
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Mar 19, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: dorotat <dorotat@nvidia.com>
Signed-off-by: dorotat <dorotat@nvidia.com>
@dorotat-nv dorotat-nv force-pushed the dorotat/run-test-stages-in-parallel-ci branch from d7b6fe4 to 1c71aaa Compare March 19, 2025 14:52
@dorotat-nv
Copy link
Copy Markdown
Collaborator Author

/ok to test

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.58%. Comparing base (72f9c93) to head (54afe3b).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #768   +/-   ##
=======================================
  Coverage   83.58%   83.58%           
=======================================
  Files         129      129           
  Lines        8116     8116           
=======================================
  Hits         6784     6784           
  Misses       1332     1332           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dorotat-nv dorotat-nv changed the title Draft: parallelize test stages in GitHub CI parallelize test stages in GitHub CI Mar 19, 2025
@dorotat-nv
Copy link
Copy Markdown
Collaborator Author

/ok to test

@dorotat-nv dorotat-nv enabled auto-merge March 20, 2025 13:55
Copy link
Copy Markdown
Collaborator

@trvachov trvachov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but @dorotat-nv can you please draw out what kinds of tests we have in CI now (slow/notslow, notebooks), and when each one runs? in NVKS? In Jenkins? etc? Just a single slide.

@dorotat-nv
Copy link
Copy Markdown
Collaborator Author

LGTM but @dorotat-nv can you please draw out what kinds of tests we have in CI now (slow/notslow, notebooks), and when each one runs? in NVKS? In Jenkins? etc? Just a single slide.

@trvachov , added charts with current workflow in CI and a workflow after parallelization

Signed-off-by: dorotat <dorotat@nvidia.com>
@dorotat-nv
Copy link
Copy Markdown
Collaborator Author

/ok to test

@dorotat-nv
Copy link
Copy Markdown
Collaborator Author

/ok to test

@dorotat-nv
Copy link
Copy Markdown
Collaborator Author

/ok to test

Comment thread .github/workflows/unit-tests.yml Outdated
@dorotat-nv dorotat-nv force-pushed the dorotat/run-test-stages-in-parallel-ci branch from e666114 to 0f49c39 Compare March 21, 2025 14:07
@dorotat-nv
Copy link
Copy Markdown
Collaborator Author

/ok to test

@dorotat-nv dorotat-nv added this pull request to the merge queue Mar 21, 2025
Merged via the queue into main with commit 82c4b13 Mar 21, 2025
@dorotat-nv dorotat-nv deleted the dorotat/run-test-stages-in-parallel-ci branch March 21, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants