(chore) The API unit job has no Postgres, so every database-backed test skips in CI
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start with run-api-unit-tests in .github/workflows/12-check-unit-tests.yml and the skip fixture in api/oss/tests/pytest/unit/sessions/conftest.py; review how the job configures services and database URIs. The issue proposes adding Postgres and setting both URIs, or making CI report or fail on skips. Run the API unit job and verify the database-backed tests execute rather than silently skip.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The API unit job in CI has no database, so every database-backed test in the API unit suite skips there. The job reports success with 179 tests skipped, and the check reads the same as it would if they had all passed.
What happens
run-api-unit-tests in .github/workflows/12-check-unit-tests.yml:260-309 has no services: block and sets no POSTGRES_URI_CORE. The suite's own fixture handles that gracefully: api/oss/tests/pytest/unit/sessions/conftest.py probes the database URI once and skips every test marked integration when nothing answers.
@pytest.fixture(autouse=True)
def _skip_when_postgres_unreachable(request):
if request.node.get_closest_marker("integration") and not _postgres_reachable():
pytest.skip("Postgres not reachable — skipping session DAO integration tests")
The skip is the right behaviour on a developer's machine, where load-env leaves the URI commented out. In CI it means the tests never run anywhere, and nothing says so on the pull request.
The effect is concrete. Three new tests for the session dispatch claim, written to prove that the claim and its release behave correctly under real SQL, are part of that skip set: the published CI result for the head that added them reads 5210 passed and 179 skipped, with the skip count up by exactly three against the previous head. The compare-and-set guards can be deleted from the real SQL and CI stays green. Verified by standing up a throwaway Postgres and running both migration chains into it, at which point the same file goes from 41 skipped to 41 passed.
Proposed fix
Add a postgres:17 service to run-api-unit-tests and set POSTGRES_URI_CORE (and POSTGRES_URI_TRACING, which a second set of cases probes the same way) so the database-backed tests actually run. The suite already applies the migration chains it needs, and the fixture keeps skipping on a bare developer machine, which is where the skip was intended.
If a database in that job is not wanted, the alternative is to stop letting the skip pass silently: fail the job when a marked test skips in CI, or publish the skip count as part of the check, so a reader can tell a green check from an empty one.
- Lingua principale
- TypeScript
- Stelle
- 4.8k
- Fork
- 690
- Merge medio
- 21h 53m
- PR unite (30g)
- 451
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Agenta-AI/agenta
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Agenta-AI/agenta#7654 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Agenta-AI/agenta#7468 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
(bug) The Stop button disappears for a moment before an approval card showsForse di nuovo libera @rishu685 l’ha presa 8 giorni fa e non c’è nessuna pull request aperta. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Agenta-AI/agenta#7446 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Agenta-AI/agenta#7441 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
(bug) Settings > Usage opens AI providers when billing is offForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Agenta-AI/agenta#7426 · 2 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Agenta-AI/agenta
Issue simili
-
`cf complete zsh >> .zshrc` fails on vanilla zshForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#340 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Rename Madson cameraAperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 75/100
StoDevX/AAO-React-Native#8785 ·
I maintainer di solito rispondono entro 1 giorno
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitForse già presa @myOmikron l’ha presa oggi. Apertabug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100