Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many redundant tests executed on dev to master release for pipelines #3400

Open
jfy133 opened this issue Jan 15, 2025 · 4 comments
Open
Labels
bug Something isn't working enhancement pipeline-testing template nf-core pipeline/component template
Milestone

Comments

@jfy133
Copy link
Member

jfy133 commented Jan 15, 2025

Description of the bug

When doing a release procedure, and a PR from dev is opened against master, when changes are made to dev during review, we see all CI tests running duplicated.

This is because tests are triggered for both pull-request and pushes. There was an assumption previously that the pull-request trigger only happened on opening, but actually it seems to trigger on any change to the PR (in addition to the push).

This can be very wasteful for pipelines with many tests, e.g. a release PR for taxprofiler as 11 tests x 2 nextflow versions x 3 container engines = 66, which when we have all of those being triggered for both PR change and push to the PR, results in >120 tests.

@jfy133 jfy133 added the bug Something isn't working label Jan 15, 2025
@jfy133
Copy link
Member Author

jfy133 commented Jan 15, 2025

A similar case is for the download test too: #3399

@jfy133
Copy link
Member Author

jfy133 commented Jan 15, 2025

Example PR when we had many duplicate tests: nf-core/taxprofiler#563

@MatthiasZepper
Copy link
Member

I am happy to add changes to the currently open PR #3399, but I think we should discuss first which changes we want?

For example, nf_core/pipeline-template/.github/workflows/ci.yml currently looks like this:

name: nf-core CI
#This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
on:
  push:
    branches:
      - dev
  pull_request:
  release:
    types: [published]
  workflow_dispatch:

The triggers for nf_core/pipeline-template/.github/workflows/linting.yml are similar.

There was an assumption previously that the pull-request trigger only happened on opening, but actually it seems to trigger on any change to the PR (in addition to the push).

To achieve this behavior, one could either restrict the trigger to newly/re- opened PRs

  pull_request:
    types:
      - opened
      - reopened

or add a synchronized type as well and remove the on push entirely.

In that case, no CI would run, if there is not yet an open release PR from dev to main. But is there any scenario, where changes are directly pushed to dev without a PR in nf-core? It might, however, be relevant for third parties using the pipeline template as well.

@ewels ewels added this to the 3.2 milestone Jan 16, 2025
@mirpedrol mirpedrol added template nf-core pipeline/component template pipeline-testing enhancement labels Jan 16, 2025
@jfy133
Copy link
Member Author

jfy133 commented Jan 16, 2025

I would need to check the exact behaviour myself, but I think on open/reopen would be ok to me for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement pipeline-testing template nf-core pipeline/component template
Projects
None yet
Development

No branches or pull requests

4 participants