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

Figure out a way to prevent pipelines from triggering multiple times on a PR #1619

Open
staylorTT opened this issue Dec 17, 2024 · 1 comment
Assignees

Comments

@staylorTT
Copy link
Contributor

Currently this can be done manually via Github -> Actions -> On PR -> click … on your pipeline -> cancel run. This will help prevent backlog pipeline runs for everyone.

Look to see if there is a way to automate this to avoid clogging up the pipeline.

@vmilosevic
Copy link
Contributor

There is no way to prevent pipelines from triggering multiple times. What we can do is to set a policy to cancel previously triggered runs, or to switch to manual triggering workflows.

Concurrency

GitHub Actions has a concurrency feature that can automatically cancel previous runs of the same workflow for a PR.
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs
We can add concurrency to our PR workflow to implement the policy where new PR runs cancel all previously triggered runs with the same key.
We can use name to cancel all previous runs for the same branch

jobs:
  build:
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
      cancel-in-progress: true

Manual trigger

We can remove automatic triggering of workflows on PR, and have developers manually trigger them when they are ready to test. This can be triggered from Web UI ar using GH CLI tool

https://github.com/tenstorrent/tt-forge-internal/wiki/CI-CD-Guide#manually-trigger-workflow-runs

Skip CI

Also, there is an option for us to keep the automatic trigger, but control the workflow runs using the commit message. If you include [skip ci] string in the commit message workflows wont trigger automatically. Once developer is ready to ready to test, removing the commit message will enable the workflows

https://github.com/tenstorrent/tt-forge-internal/wiki/CI-CD-Guide#skip-workflow-runs

vmilosevic added a commit that referenced this issue Dec 19, 2024
Add concurrency check, new workflows triggered on the same branch should
cancel old ones in progress.
#1619
vmilosevic added a commit to tenstorrent/tt-xla that referenced this issue Dec 19, 2024
Add concurrency check, new workflows triggered on the same branch should
cancel old ones in progress.
tenstorrent/tt-mlir#1619
vmilosevic added a commit to tenstorrent/tt-forge-fe that referenced this issue Dec 19, 2024
Add concurrency check, new workflows triggered on the same branch should
cancel old ones in progress.
tenstorrent/tt-mlir#1619
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants