Skip to content

feat: lay foundations for engine drivers - #6288

Merged
jedevc merged 1 commit into
dagger:mainfrom
jedevc:drivers-prototype
Feb 7, 2024
Merged

jedevc merged 1 commit into
dagger:mainfrom
jedevc:drivers-prototype

Conversation

@jedevc

@jedevc jedevc commented Dec 18, 2023

Copy link
Copy Markdown
Contributor

This patch starts to simplify the connhelpers and docker-image helper into specific engine drivers (see #5583) - adding new drivers now becomes easier.

Each driver registers itself under a name, and is called when connecting to a URL with that scheme. Additionally, during connection, we provide a set of additional parameters.

This is mostly just a refactor around the connhelpers, which we can't use directly out of the box, since we want to support a set of additional parameters as well. Since each driver just returns a net.Conn, then we can build the buildkit connection on top of it, which allow us to potentially change the connection mechanism in the future.

@jedevc
jedevc marked this pull request as ready for review December 19, 2023 10:49
@jedevc
jedevc requested review from shykes and sipsma December 19, 2023 11:21
@github-actions

github-actions Bot commented Jan 3, 2024

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@jedevc jedevc removed the kind/stale label Jan 3, 2024
@jedevc
jedevc requested a review from grouville January 3, 2024 11:35

@TomChv TomChv left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we have any tests on our CI that tests these different drivers?

I like the new interface style registration tho, look pretty cool!

@gerhard

gerhard commented Jan 31, 2024

Copy link
Copy Markdown
Contributor

Do we want to continue this?

@jedevc jedevc mentioned this pull request Feb 6, 2024
@jedevc
jedevc force-pushed the drivers-prototype branch from 29b566f to 78a48f6 Compare February 6, 2024 15:14
@jedevc

jedevc commented Feb 6, 2024

Copy link
Copy Markdown
Contributor Author

Rebased 🎉

Did a self-review, I'm pretty happy with this, and to take this as-is.

Do we have any tests on our CI that tests these different drivers?

Nope, we should though. We don't have anything here today, so I'm not too worried about adding anything additional right now, especially now that I can confirm that this works without too many issues at the moment.

I like the new interface style registration tho, look pretty cool!

Part of the idea is that because each driver only needs to return a net.Conn, we could easily plug in an external plugin, see #5583.

@jedevc

jedevc commented Feb 6, 2024 •

Copy link
Copy Markdown
Contributor Author

TestModuleLotsOfFunctions is timing-out, looks potentially legitimate 😢

@jedevc

jedevc commented Feb 6, 2024

Copy link
Copy Markdown
Contributor Author

The test failure is happening on main, so not relevant to these changes likely. They first occurred after merging #6597.

This patch starts to simplify the connhelpers and docker-image helper
into specific engine drivers.

Each driver registers itself under a name, and is called when connecting
to a URL with that scheme. Additionally, during connection, we provide a
set of additional parameters.

This is mostly just a refactor around the connhelpers, which we can't
use directly out of the box, since we want to support a set of
additional parameters as well. Since each driver just returns a
net.Conn, then we can build the buildkit connection on top of it, which
allow us to potentially change the connection mechanism in the future.

Signed-off-by: Justin Chadwell <[email protected]>
@jedevc
jedevc force-pushed the drivers-prototype branch from 78a48f6 to 7e69226 Compare February 6, 2024 19:35
@jedevc
jedevc merged commit 1861908 into dagger:main Feb 7, 2024
@jedevc
jedevc deleted the drivers-prototype branch February 7, 2024 11:48
@jedevc

jedevc commented Feb 7, 2024

Copy link
Copy Markdown
Contributor Author

Let's take this now - if it breaks things, would rather do it now, instead of waiting for the big zenith release 😄

Also, this has become a lot more relevant as we've been discussing #5583

@jedevc

jedevc commented Feb 7, 2024

Copy link
Copy Markdown
Contributor Author

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.

3 participants