Skip to content

Commit

Permalink
[skip ci]: Only produce cicd data on workflow runs that are success/f…
Browse files Browse the repository at this point in the history
…ailure/cancelled (ignore skipped runs) (#17371)

### Ticket


### Problem description
PR Gate has a lot of skipped runs that are causing _produce_data.yaml to
fetch and push empty cicd data for superset (PR gate skips old runs that
haven't started when a new commit is added to a developer's branch).
This has the unintended side effect of causing rate limiting on GH api
side.

### What's changed
Only trigger _produce_data.yaml jobs on
- workflow_run when `github.event.workflow_run.conclusion` is
success/failure/cancelled (ignore skipped)
- workflow_call
- workflow_dispatch

### Checklist
- [ ] Post commit CI passes
- [ ] Blackhole Post commit (if applicable)
- [ ] Model regression CI testing passes (if applicable)
- [ ] Device performance regression CI testing passes (if applicable)
- [ ] **(For models and ops writers)** Full [new
models](https://github.com/tenstorrent/tt-metal/actions/workflows/full-new-models-suite.yaml)
tests passes
- [ ] New/Existing tests provide coverage for changes
  • Loading branch information
williamlyTT authored Jan 30, 2025
1 parent 99302c5 commit 290d99a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/_produce-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ on:

jobs:
produce-cicd-data:
if: |
# Check if triggered by `workflow_run` with specific conclusion states,
# or if it's triggered by `workflow_call` or `workflow_dispatch`
${{ github.event_name == 'workflow_run' && (github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'cancelled') }} ||
${{ github.event_name == 'workflow_call' }} ||
${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -145,6 +151,12 @@ jobs:
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
owner: U014XCQ9CF8 # tt-rkim
test-produce-complete-benchmark-with-environment:
if: |
# Check if triggered by `workflow_run` with specific conclusion states,
# or if it's triggered by `workflow_call` or `workflow_dispatch`
${{ github.event_name == 'workflow_run' && (github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'cancelled') }} ||
${{ github.event_name == 'workflow_call' }} ||
${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 290d99a

Please sign in to comment.