Skip to content

ci: build all engine variants before publishing#8269

Merged
jedevc merged 3 commits into
dagger:mainfrom
jedevc:daggerize-engine-publish
Aug 30, 2024
Merged

ci: build all engine variants before publishing#8269
jedevc merged 3 commits into
dagger:mainfrom
jedevc:daggerize-engine-publish

Conversation

@jedevc
Copy link
Copy Markdown
Contributor

@jedevc jedevc commented Aug 29, 2024

As discussed during the v0.12.6 release process:

imo, we can take this opportunity to update this process and daggerize more - ideally we should build all the images, and then push all the images

This consolidates a ton of the publishing logic together into a loop over a table (familiar to anyone familiar with go table tests). Because all of the logic in go, it's now super easy to force evaluation of all the containers before we start pushing them.

Finally, I removed the TestPublish function, and replaced it with a dryRun parameter in Publish (to avoid duplicating a ton of logic) which matches with how we already do this for the SDKs.

Here's an example dry-run: https://dagger.cloud/jedevc/traces/7c283e20d59719ff45c1038d7e74174d

image

jedevc added 3 commits August 29, 2024 16:58
Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
We move all of the publishing of the engine image into dagger - this
allows us to very easily implement functionality that first builds all
the variants, and only once this has succeeded, then can publish all the
variants. This helps prevent the case where some variants may not build,
and we end up in an invalid engine publishing state.

To do this reorganization, we need to re-organize some of the dev
module's engine api. Specifically, we need to lift the base image and
gpu-support parameters into *just* the `Container` method, instead of
parameterizing it across the entire engine object. This is so that we
can then easily use a go table of targets, and use this to parameterize
the calls to `Engine.Container`.

Signed-off-by: Justin Chadwell <me@jedevc.com>
@jedevc jedevc requested a review from gerhard August 29, 2024 16:06
Copy link
Copy Markdown
Contributor

@gerhard gerhard left a comment

Choose a reason for hiding this comment

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

This is a great refactoring!

LGTM 👍 🚀

@jedevc jedevc merged commit c3ab515 into dagger:main Aug 30, 2024
@jedevc jedevc deleted the daggerize-engine-publish branch August 30, 2024 09:12
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