Skip to content

docker: copy fixtures/server so the wheel can build - #176

Open
abu-tahir-0 wants to merge 1 commit into
patsypppe:mainfrom
abu-tahir-0:fix/docker-build-fixtures
Open

abu-tahir-0 wants to merge 1 commit into
patsypppe:mainfrom
abu-tahir-0:fix/docker-build-fixtures

Conversation

@abu-tahir-0

Copy link
Copy Markdown

Problem

The image could not be built from main. harness/pyproject.toml force-includes ../fixtures/server in the wheel, but the build stage only copied harness/, and Dockerfile.dockerignore excluded fixtures/ from the build context entirely:

FileNotFoundError: Forced include not found: /src/fixtures/server
ERROR: failed to build: ... did not complete successfully

The release workflow's docker/build-push-action would hit the same failure. Found while working on #150.

Solution

  • Build stage copies fixtures/server/ to /src/fixtures/server/.
  • Dockerfile.dockerignore excludes fixtures/* but lets fixtures/server/ and its contents back in, so no other test fixture enters the context.
  • tests/harness/test_distribution.py asserts both, so the copy and the ignore exception cannot drift.

Testing

  • docker build -t toolgauge-build-fix . — succeeds.
  • docker run --rm toolgauge-build-fix version — toolgauge 0.4.0 (grades MCP 2026-07-28).
  • pytest tests/harness/test_distribution.py — 12 passed.

Impact

The release image jobs can build again, and the image still runs as the non-root user with only the fixture package the wheel declares.

harness/pyproject.toml force-includes ../fixtures/server, but the build
stage copied only harness/ and the ignore file excluded fixtures/
entirely, so `python -m build` failed with "Forced include not found"
and the image could not be built. Copy that one fixture package and let
the ignore file through it. Verified with a local build and `version`.

This branch has not been deployed

No deployments
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