Skip to content

fix: bootstrap mkdocs for TechDocs generation - #122

Merged
johnnyhuy merged 1 commit into
mainfrom
fix/techdocs-mkdocs
Nov 10, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
fix/techdocs-mkdocs

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

Problem

TechDocs builds fail with spawn mkdocs ENOENT. The generator is configured with techdocs.generator.runIn: 'local', which spawns the mkdocs CLI as a subprocess of the backend, but mkdocs is not installed anywhere:

  • the runtime image does not install it, so the deployed container has the same failure
  • scripts/install does not set it up for local development either

Fix

  • Dockerfile: install mkdocs + mkdocs-techdocs-core (which pins its own dependency stack, including mkdocs-material) in the run stage as a user install into /root/.local/bin, which is already first on PATH. A mkdocs --version sanity check fails the build early if the toolchain breaks.
  • scripts/install: for local development, bootstrap mkdocs into ~/.local/share/backstage-techdocs-venv and link it into ~/.local/bin when missing, with a warning if that directory is not on PATH. Skipped in CI.
  • docs/development.md: update the TechDocs section (it referenced a non-existent make dev) and document the spawn mkdocs ENOENT failure mode.

Testing

  • Ran the scripts/install bootstrap block against a sandboxed $HOME with ~/.local/bin removed from PATH (fresh machine simulation, stock Python 3.9): venv creation, plugin install, and the mkdocs symlink all work.
  • bash -n scripts/install passes.
  • The Dockerfile change is exercised by mise run build in CI.

Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>

TechDocs runs with techdocs.generator.runIn: 'local', which spawns the
mkdocs CLI, but neither the runtime image nor the dev setup installed
it, so doc builds failed with 'spawn mkdocs ENOENT'. Install mkdocs with
the techdocs-core plugin in the Docker run stage, and have
scripts/install bootstrap it into ~/.local/bin for local development.

Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
@johnnyhuy
johnnyhuy merged commit 23f9602 into main Nov 10, 2026
5 checks passed
@johnnyhuy
johnnyhuy deleted the fix/techdocs-mkdocs branch November 10, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant