Files
temporal/.github/workflows/flaky-tests-report.yml
Alex Stanfield 85635674d7 New Docker Build GH Actions (#8825)
## What changed?
* updates goreleaser to v2
* add GHA for build admin-tools and server images within this repo.
`docker-builds` will only be used for building pre 1.30 images
* added GHA to promote docker builds from temporaliotest to temproalio
docker image repos
* trivy security scanning gates for image promotion (pulled rom
docker-builds repo). The gate can be overridden

## Why?
* we decided to move away from building images in `docker-builds`. The
complexity is not needed
* updates goreleaser to v2 because the v1 definitions might be no longer
supported at some point and this is a good time to do it
* I used go scripts for the more complex flows instead of js or bash so
we don't introduce another language contributors need to be familiar
with. IMO the js or bash I did use it simple enough to understand.

## How did you test it?
It passes in CI. 

## Potential risks
* these build pipelines are only compatible with the new docker images. 
* merging this PR may break our nightly tests. Will double check before
merging
* flows that are not triggered by opening a PR are untested and
therefore not completely validated
2025-12-18 20:30:58 +00:00

108 lines
3.2 KiB
YAML

name: Flaky Tests Report
on:
schedule:
# Run on Wednesdays at noon Eastern time (5 PM UTC)
- cron: '0 17 * * 3'
workflow_dispatch:
inputs:
days:
description: 'Number of days to look back for flaky tests'
required: false
default: '7'
type: string
max_links:
description: 'Maximum number of failure links to show per test'
required: false
default: '3'
type: string
permissions:
contents: read
actions: read
jobs:
flaky-tests-report:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: ">=0.8.0"
- name: Install Python dependencies
run: |
cd tools/flakes
uv sync
- name: Install tringa
run: |
uv tool install git+https://github.com/dandavison/tringa@main --force
- name: Run tringa
id: generate-output-file
env:
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
DAYS_PARAM: ${{ github.event.inputs.days || '7' }}
run: |
set -euo pipefail
# Create output directory
mkdir -p tools/flakes/out
tringa --json --since-days "$DAYS_PARAM" repo sql \
'select classname, name, artifact from test where passed = false and skipped = false order by classname, name, artifact desc' \
--branch main \
--workflow-id 80591745 \
https://github.com/temporalio/temporal > tools/flakes/out/out.json
echo "✅ Tringa command completed"
echo "📊 Output file size: $(wc -c < tools/flakes/out/out.json) bytes"
echo "📄 Full output file:"
cat tools/flakes/out/out.json
- name: Run Python script to process flaky tests
id: process-flaky-tests
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
RUN_ID: ${{ github.run_id }}
REF_NAME: ${{ github.ref_name }}
SHA: ${{ github.sha }}
MAX_LINKS_PARAM: ${{ github.event.inputs.max_links || '3' }}
run: |
set -x
cd tools/flakes && uv run main.py \
--file out/out.json \
--github-summary \
--slack-webhook "$SLACK_WEBHOOK" \
--run-id "$RUN_ID" \
--ref-name "$REF_NAME" \
--sha "$SHA" \
--max-links "$MAX_LINKS_PARAM"
- name: Upload generated reports
uses: actions/upload-artifact@v4
if: steps.process-flaky-tests.outcome == 'success'
with:
name: flaky-tests-reports-${{ github.run_number }}
path: tools/flakes/out/*
retention-days: 30