test(ci): stop e2e seeds from being due for a sync

Aperta
#408 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
70/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
nextjs, playwright, typescript
Ambito
testing-qa

Direzione di ricerca

Start from e2e/fixtures/db.ts and the existing month-out pattern in public-pages.ts:24, share.ts:70 and stale.ts:58; add one shared helper there and point realtime.spec.ts's notDueForAMonth at it. Grep the listed spec and fixture files for active-connection seeds lacking next_sync_at, leaving simulated-providers and simulated-sentry due on purpose. Run each changed spec through the guarded runner with npm run jobs:tick -- --watch live; done is no "sync failed" events in the test workspaces.

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

Descrizione

area: ci bug priority: P2 size: S

Context

A connection seeded with status: "active" and no next_sync_at is due for a sync. Locally, any job tick run against the same database syncs it mid-test: npm run jobs:tick, its watcher, or a spec in the instance-wide project. The tick writes "sync failed" events and failure counters into the test's workspace. That broke a run of the provider chip test on PR #405: it counted 3 Example provider events where it expected 2, and the page showed "Example provider sync failed for Fake live connection". Found in the round 1 review of #405 (comment 4562387871). #405 fixes its own seeds and seedConnection in e2e/realtime.spec.ts (notDueForAMonth()). The other specs still seed due connections.

playwright.config.ts already keeps tick-running specs in the instance-wide project, so CI is not affected. Local runs are, because they share the database with a running watcher or cron.

Plan

Give every e2e seed of an active connection a next_sync_at a month out, as e2e/fixtures/public-pages.ts:24, e2e/fixtures/share.ts:70, and e2e/fixtures/stale.ts:58 already do. Ideally do it through one shared helper in e2e/fixtures/db.ts, and switch realtime.spec.ts's notDueForAMonth to it.

Files with seeds and no next_sync_at (from grep -c at 60d01fc, plus realtime.spec.ts, which the count missed because other seeds in it set the field): realtime (the connections test of the header live indicator, which inserts four connections, two of them active, with no next_sync_at), account, alert-rules, anomaly-detection, command-palette, connections, dashboard, digitalocean, headline, projection, real-connection-while-simulating, sample-data, timeline, and trends. A seed that a spec syncs on purpose (simulated-providers, simulated-sentry) keeps its due time.

Acceptance criteria

  • No e2e seed of an active connection is due for a sync, unless the spec runs a tick on purpose.
  • One helper holds the "not due" time.
  • Playwright: every changed spec passes through the guarded runner.

Files and areas

e2e/ only. Non-goals: application code, and the instance-wide project split.

Verification

Run every changed spec through the guarded runner while npm run jobs:tick -- --watch is running against the same stack. Expected: no "sync failed" events in the test workspaces.


Branch: <issue-number>-e2e-seeds-not-due
Closes with a Closes #<issue-number> footer on the pull request.

Model: anthropic/claude-opus-5-5 | Reasoning effort: not exposed by harness

Lingua principale
TypeScript
Stelle
1
Fork
1
Merge medio
6h 56m
PR unite (30g)
136

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 eddiejaoude/StackDash

Tutte le issue di eddiejaoude/StackDash

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.