Skip to content

Prebuild worker images #655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 30, 2025
Merged

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Jun 4, 2025

Adds pre-built worker images to ghcr repo.
These get pushed on tag, but also create a GHA cache on merge.

Builders can either use --cache-from with the image ref for the versioned worker to use it as a cache for building the worker image OR use --build-context <worker-name>=<worker image ref> just use the worker image outright.

@cpuguy83 cpuguy83 requested a review from a team as a code owner June 4, 2025 23:25
@cpuguy83 cpuguy83 force-pushed the prebuild_worker_images branch 4 times, most recently from 655566b to 704813d Compare June 4, 2025 23:34
@cpuguy83 cpuguy83 marked this pull request as draft June 4, 2025 23:37
@cpuguy83 cpuguy83 force-pushed the prebuild_worker_images branch 7 times, most recently from f48b0ea to 230fcef Compare June 6, 2025 22:06
@cpuguy83 cpuguy83 marked this pull request as ready for review June 6, 2025 22:47
@pmengelbert
Copy link
Contributor

What does the following mean, from the 2nd commit message?

This makes usse of the containerd plugin system to add support for
loading routes via plugin.
This can be expanded to more than just build routes, but this is useful
for now.

What does it mean to "load routes"? What do you mean by "build routes". I don't understand what the 2nd commit is doing

@cpuguy83
Copy link
Member Author

"routes" => build targts (docker build --target).

@pmengelbert
Copy link
Contributor

Can you explain how the containerd plugin system is being used here, and what it does generally? What does it mean to "load" a route/build target via a plugin?

import (
"context"

"github.com/moby/buildkit/frontend/gateway/client"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would alias this to gwclient since we do that almost everywhere else. Makes it clearer faster which client is being used

Copy link
Contributor

@pmengelbert pmengelbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This makes usse of the containerd plugin system to add support for
loading routes via plugin.
This can be expanded to more than just build routes, but this is useful
for now.

I plan to use this more in a follow-up commit.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83 cpuguy83 force-pushed the prebuild_worker_images branch from 230fcef to 68e5d58 Compare June 30, 2025 18:20
This will be triggered on merge to populate the worker cache which can
be used by CI jobs.
It will also be triggered on tag pushes which will ensure each release
of dalec will give us a set of worker images that can be used as base
images for other projects.

workflow_dispatch is also included for rebuilding images manually.

Signed-off-by: Brian Goff <[email protected]>
@cpuguy83 cpuguy83 force-pushed the prebuild_worker_images branch from 68e5d58 to b2beabb Compare June 30, 2025 18:22
@cpuguy83 cpuguy83 merged commit be79188 into Azure:main Jun 30, 2025
35 of 36 checks passed
@cpuguy83 cpuguy83 deleted the prebuild_worker_images branch June 30, 2025 19:40
@cpuguy83 cpuguy83 added this to the v0.16 milestone Jun 30, 2025
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.

2 participants