fix(ci): repair broken PR lint jobs (mypy/node not found) #6
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/ci-workflows"
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?
Both
on_pr.yamljobs have been failing since at least PR #4 (verified via the actions API:lint-and-check-pythonandlint-and-check-kubernetesbothfailure), so PR checks were red and being ignored.lint-and-check-python—mypy: not foundEach
run:step is a fresh shell, so the venv activation from step 2 never persists. The job ran venv-mypyonce, then relied on anapt install -y black python3-mypytacked onto the end of step 3 to provide systemblack/mypyfor steps 4–5 — which never took effect (mypy: not found). Even if it had, system mypy cannot see the venv-installed dependencies (discord,aiohttp, …), so it would fail with import errors instead. Additionallypython3.11-venvis hardcoded and breaks on any runner image whose default Python is not 3.11.Fix: install
python3-venv(version-agnostic), build the venv in one step, and invoke the tools by explicit path:Removes the duplicate mypy run and the redundant apt tool installs. Behavior otherwise unchanged (
black .still without--check; enforcing that is a separate change sincewaifu/discord_bot.py:119is currently not black-clean on main).lint-and-check-kubernetes—node: not foundThe job overrides the container with
git.pr0.tech/rs/builder-kube:latest, which has kube-linter but no Node.actions/checkout@v6is a JavaScript action and needsnode— it died in ~5 s at checkout. Node is not needed by the job itself (kube-linter is a self-contained Go binary); only the checkout action requires it. The default runner image ships Node, which is why themain-branch jobs are green.Fix: drop the JS checkout and clone with git directly using Forgejo's automatic per-run token:
(Fallback if
builder-kubelacksgittoo: fetch a tarball from the Forgejo API withcurl.)Out of scope / follow-ups
black --check .to make the format gate real (needs the one pre-existing formatting violation fixed)synchronizein the PR trigger so updated branches are re-checkedrelease_on_mainjobs on lint; unique chart versions instead of hardcodedv0.0.1