Skip to content

Run unit, integration tests and builds in a container#521

Open
acardace wants to merge 4 commits intollm-d:mainfrom
acardace:containerized-unit-tests
Open

Run unit, integration tests and builds in a container#521
acardace wants to merge 4 commits intollm-d:mainfrom
acardace:containerized-unit-tests

Conversation

@acardace
Copy link
Contributor

@acardace acardace commented Dec 23, 2025

Run unit, integration tests and build in a container

Add Dockerfile.builder with required dependencies and update Makefile
targets to run tests and builds inside a container, eliminating host
dependency requirements.

Notable changes:

  • latest stable Fedora as base image

  • add builder image (Dockerfile.builder)

  • if pinned python modules deps cannot be found then the latest ones will be used

  • containerized test-unit, test-integration, and build targets

  • simplified Makefile by removing host-based Python/tokenizer setup

  • integrate linting and typos in the llm-d-builder image

    Fixes Installation of build dependencies via Makefile is broken #470

@acardace
Copy link
Contributor Author

@elevran as a follow up I can also do the same thing for building other than just testing, so we can have a fixed image for building as well.

@evacchi
Copy link
Contributor

evacchi commented Dec 23, 2025

FWIW the venv+Makefile flow makes it easy to attach a local debugger even on macOS (although it should be feasible to spin that flow off to its own Makefile/script if necessary)

@acardace
Copy link
Contributor Author

FWIW the venv+Makefile flow makes it easy to attach a local debugger even on macOS (although it should be feasible to spin that flow off to its own Makefile/script if necessary)

That's fair but I think we should converge on containerized workflows for ease of use and reproducibility.

@acardace acardace force-pushed the containerized-unit-tests branch from f1e29ca to 1377ed5 Compare January 13, 2026 10:07
@acardace acardace changed the title Run unit and integration tests in a container Run unit, integration tests and builds in a container Jan 13, 2026
@acardace
Copy link
Contributor Author

I've completely reworked this to use the container image for building, linting and running the typos tool as well, this let me get rid of a lot of the Makefile.

@elevran
Copy link
Collaborator

elevran commented Jan 13, 2026

Container build fails:

docker build --quiet \
	-f Dockerfile.builder \
	-t ghcr.io/llm-d/llm-d-builder:dev
ERROR: docker: 'docker buildx build' requires 1 argument

Usage:  docker buildx build [OPTIONS] PATH | URL | -

Run 'docker buildx build --help' for more information
make: *** [Makefile:135: image-build-builder] Error 1
Error: Process completed with exit code 2.```

@acardace
Copy link
Contributor Author

Container build fails:

docker build --quiet \
	-f Dockerfile.builder \
	-t ghcr.io/llm-d/llm-d-builder:dev
ERROR: docker: 'docker buildx build' requires 1 argument

Usage:  docker buildx build [OPTIONS] PATH | URL | -

Run 'docker buildx build --help' for more information
make: *** [Makefile:135: image-build-builder] Error 1
Error: Process completed with exit code 2.```

I'll take a look, the issue is I only use podman locally.

@elevran
Copy link
Collaborator

elevran commented Jan 13, 2026

CICD runs Ubuntu with docker by default so that would be needed

@acardace acardace force-pushed the containerized-unit-tests branch 3 times, most recently from 7095e06 to 4301a69 Compare January 13, 2026 14:05
Add Dockerfile.builder with required dependencies and update Makefile
targets to run tests and builds inside a container, eliminating host
dependency requirements.

Notable changes:
    - latest stable Fedora as base image
    - add builder image (Dockerfile.builder)
    - if pinned python modules deps cannot be found then the latest ones
      will be used
    - containerized test-unit, test-integration, and build targets
    - simplified Makefile by removing host-based Python/tokenizer setup

Fixes llm-d#470

Signed-off-by: Antonio Cardace <acardace@redhat.com>
@acardace acardace force-pushed the containerized-unit-tests branch from 4301a69 to 5d97f47 Compare January 15, 2026 16:21
Add golangci-lint to the builder image and update Makefile lint target
to run inside the container, further reducing host dependencies.

Changes:
    - Add golangci-lint installation to Dockerfile.builder
    - Update lint target to run golangci-lint in container
    - Simplify CI workflow to use containerized make targets
    - Remove check-golangci-lint from host tool requirements

Signed-off-by: Antonio Cardace <acardace@redhat.com>
Signed-off-by: Antonio Cardace <acardace@redhat.com>
concatenate string using strings.Builder

Signed-off-by: Antonio Cardace <acardace@redhat.com>
@acardace acardace force-pushed the containerized-unit-tests branch from 5d97f47 to ddd5e59 Compare January 16, 2026 09:58
@elevran elevran added this to the v0.6 milestone Jan 22, 2026
@github-actions
Copy link

This PR is marked as stale after 21d of inactivity. After an additional 14d of inactivity (7d to become rotten, then 7d more), it will be closed. To prevent this PR from being closed, add a comment or remove the lifecycle/stale label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Installation of build dependencies via Makefile is broken

3 participants