[Bug] update-test-durations never runs: its only path filter points at the pre-monorepo tests/ directory

Aperta
#9,212 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@badrbel ci sta già lavorando.

Dal 7/11/2026.

  • #9219 di @badrbel — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
github-actions, python, yaml
Ambito
ci-cd

Direzione di ricerca

Read .github/workflows/update-test-durations.yml and inspect its on.push.paths filter against the package test paths listed in the issue. Confirm the workflow runs for changes under those paths; the issue proposes lib/**/tests/**/*.py. Done means pushes that change package tests can trigger the workflow. An open linked pull request already covers this issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

update-test-durations never runs: its only path filter points at the pre-monorepo tests/ directory

What

.github/workflows/update-test-durations.yml is triggered by pushes to main, gated on a single path filter:

on:
  push:
    branches:
      - main
    paths:
      - 'tests/**/*.py'
  workflow_dispatch:

The repository has no root tests/ directory any more — git ls-files tests returns 0 files. The tests moved into the monorepo packages:

lib/cli/tests            62 files
lib/crewai/tests        953 files
lib/crewai-core/tests    11 files
lib/crewai-files/tests   21 files
lib/crewai-tools/tests   86 files
lib/devtools/tests        6 files

So the filter can never match, the workflow only ever fires by manual workflow_dispatch, and the .test_durations_py* artifacts it writes are only refreshed when someone remembers to run it by hand.

Why it matters

The workflow's whole job is to keep the duration data fresh so the sharded test runs stay balanced:

      - name: Run all tests and store durations
        run: uv run pytest --store-durations --durations-path=.test_durations_py${PYTHON_VERSION_SAFE} -n auto
      - name: Save durations to cache
        uses: actions/cache/save@...
        with:
          path: .test_durations_py*
          key: test-durations-py${{ matrix.python-version }}

With the filter dead, durations drift as tests are added or slowed down, and the split silently gets worse — nothing fails, it just costs CI minutes.

Fix

Replace the stale path with the location tests actually live in (two-line diff, on.push.paths only):

--- a/.github/workflows/update-test-durations.yml
+++ b/.github/workflows/update-test-durations.yml
@@ -5,7 +5,7 @@ on:
     branches:
       - main
     paths:
-      - 'tests/**/*.py'
+      - 'lib/**/tests/**/*.py'
   workflow_dispatch:

If you would rather it fire on any package change (tests and sources both affect durations), 'lib/**' is the alternative — say which and I will send exactly that.

How this was found

A small check that resolves every on.pull_request.paths / on.push.paths glob against the repository's file list and reports globs with zero matches; this was the only dead filter in the repo (1 of 19 workflows). Verified by hand with git ls-files above.


Per CONTRIBUTING.md, this issue is AI-authored and needs the llm-generated label; I cannot apply labels myself, so please add it. The fix is a one-line change and I will open the PR against this issue once it is accepted.

Lingua principale
Python
Stelle
60.6k
Fork
9.1k
Merge medio
1g 4h
PR unite (30g)
214

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di crewAIInc/crewAI

Tutte le issue di crewAIInc/crewAI

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.