Skip to content

Conversation

@cpuguy83
Copy link
Collaborator

This breaks some assumptions for clients and breaks "docker buildx dap build", which we are relying on for debugging work.

Before the change this is also technically solving multiple times, even though the subsequent solves are cached.
The main culprit of unlazying the build is the test runner, which needs to run commands and inspect filesystem state to return errors.

With this change the test runner is now executed as part of the normal LLB graph.
All checks occur inside a buildkit container.
The frontend now has an extra set of subcommands for executing certain checks. The frontend binary gets mounted into the test container and it executes those subcommands to perform the various checks.

In order to preserve source mapping each test check is run in separate exec ops.:

@cpuguy83 cpuguy83 force-pushed the be_lazy branch 2 times, most recently from b3b9d7f to 68c2f6b Compare December 12, 2025 01:01
@cpuguy83 cpuguy83 self-assigned this Dec 12, 2025
@cpuguy83 cpuguy83 force-pushed the be_lazy branch 5 times, most recently from 56ab05e to 39eec3e Compare December 17, 2025 00:44
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the be_lazy branch 21 times, most recently from 53a51da to ce19276 Compare December 17, 2025 18:35
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the be_lazy branch 6 times, most recently from 06cefd0 to 24b1808 Compare December 19, 2025 19:58
This prevents memory corruption due to spec mutation in the withSpec
test helper.
This is needed in case of multiple calls to `withSpec` with the same
spec pointer in parallel tests.
The race detector also throws an error here.

This fixes a potential easy to stuble upon gotcha within the test suite.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the be_lazy branch 14 times, most recently from d58df92 to b8c1015 Compare December 20, 2025 23:41
This breaks some assumptions for clients and breaks "docker buildx dap
build", which we are relying on for debugging work.

Before the change this is also technically solving multiple times, even
though the subsequent solves are cached.
The main culprit of unlazying the build is the test runner, which needs
to run commands and inspect filesystem state to return errors.

With this change the test runner is now executed as part of the normal
LLB graph.
All checks occur inside a buildkit container.
The frontend now has an extra set of subcommands for executing certain
checks. The frontend binary gets mounted into the test container and it
executes those subcommands to perform the various checks.

In order to preserve source mapping each test check is run in separate
exec ops.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Before this change `RunTest` may return before all messages are
processed.

This also moves a lot of the logic around to better separate
responsibilities and provide a more flexible interface that is,
hopefully, easier to reason about.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 force-pushed the be_lazy branch 3 times, most recently from 60114f8 to 1316da1 Compare December 22, 2025 00:50
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