CI: make the pipeline green (lint/format/mypy debt, respx dev dep, cwd-dependent test, Alembic drift, ESLint) #41
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED#41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Split from #40. CI has failed on all 52 runs; every cause was reproduced locally and is a real code issue. Fixing this unblocks #5, #10, and the 5 open Renovate PRs (#35–#39).
Tasks
ruff checkclean: 159 violations (60 auto-fixable viaruff check --fix)ruff format: 56 of 83 files need reformattingmypy app/: 75 errors in 17 files (callableused as a type inservices/recurrence.py:133, missing generic args, untyped defs,app/main.pyattr-defined errors)respxto thedevdependency group inbackend/pyproject.toml(tests import it directly;pytest-httpxis listed but unused by those tests) — without it pytest fails at collectiontests/test_import_export.py::test_builtin_yaml_covers_bundled_events: opensconfig/events.yamlrelative to cwd; CI runs frombackend/. Resolve the path from the repo root (e.g. anchor on__file__)ix_sessions_expires_at,ix_sessions_subject,ix_webhook_configs_enabledbut no migration drops them — add migration 0008 (or restore the indexes) soalembic checkpasses@typescript-eslint/no-empty-object-typeinfrontend/src/components/ui/input.tsx:4backend/uv.lock(already generated, untracked) for reproducible CIdatetime.utcnow()is deprecated everywhere (13k+ warnings) — mechanical swap todatetime.now(UTC)Acceptance
Picking this up as the keystone of the v1.0.0 milestone — it blocks #5, #10, #56, #58, #64 and the Renovate PRs. Working it first, in isolation, so the rest of the milestone rebases on a green pipeline. Will report the fixes per task on completion.
Merged via #66 (commit
06fcf7e). All CI jobs green on main.The enumerated debt was only the start — the pipeline had a stack of latent failures that only surfaced once each layer was fixed. What landed:
Backend (the issue's original scope): ruff check (auto+hand), ruff format (55 files), mypy (73 errors incl. the
app.modelsshadowingapp = FastAPI()root cause, fixed viafrom app import models as _models),respxadded to dev deps, cwd-independent path intest_builtin_yaml_covers_bundled_events, Alembic migration0008dropping the 3 orphaned indexes,uv.lockcommitted, anddatetime.utcnow()replaced by a naive-UTCapp/timeutil.py::utcnow()(no tz-aware/naive comparison risk). 204 tests pass.Frontend lint (the real all-52-runs blocker): 4 pre-existing
react-refresh/only-export-componentswarnings tripping--max-warnings 0— theinput.tsxfix in the issue was only one of them.E2E + a11y: the docker-e2e Playwright suite had 2 brittle specs; fixed by adding
aria-labels to icon-only controls (year prev/next, settings, user menu — a genuine a11y improvement) and de-ambiguating a heading selector. 5/5 pass.Dependency audit:
npm auditreported 6 advisories (gating, since Forgejo doesn't honor job-levelcontinue-on-error);npm audit fixcleared all 6 via lockfile only → 0 vulns.docker-e2e CI-harness fixes (Forgejo runner ≠ GitHub runner): host-published ports unreachable from containerized steps → reach the app by container name over a user-defined network;
-v $PWDbind mount empty under DinD →docker cp; reused runner host left a stale network → idempotent pre-cleanup.Every fix was verified locally in Docker before pushing. Follow-up CI hardening (not blocking) tracked in #5.