From bc3ab5793006f49e51b1436e1c271b274d31bfff Mon Sep 17 00:00:00 2001 From: Erik Sipsma Date: Thu, 22 Feb 2024 22:26:34 -0600 Subject: [PATCH] core: speed up loading of builtin SDKs (#6714) * core: speed up loading of builtin SDKs Signed-off-by: Erik Sipsma * regen docs/sdks Signed-off-by: Erik Sipsma * dedupe sdk->content dir impl code Signed-off-by: Erik Sipsma --------- Signed-off-by: Erik Sipsma --- dag/dag.gen.go | 6 ++++++ dagger.gen.go | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/dag/dag.gen.go b/dag/dag.gen.go index 6eade4472..94ca27bd0 100644 --- a/dag/dag.gen.go +++ b/dag/dag.gen.go @@ -46,6 +46,12 @@ func Blob(digest string, size int, mediaType string, uncompressed string) *dagge return client.Blob(digest, size, mediaType, uncompressed) } +// Retrieves a container builtin to the engine. +func BuiltinContainer(digest string) *dagger.Container { + client := initClient() + return client.BuiltinContainer(digest) +} + // Constructs a cache volume for a given cache key. func CacheVolume(key string) *dagger.CacheVolume { client := initClient() diff --git a/dagger.gen.go b/dagger.gen.go index db22b9c3e..d600a31cb 100644 --- a/dagger.gen.go +++ b/dagger.gen.go @@ -5074,6 +5074,17 @@ func (r *Client) Blob(digest string, size int, mediaType string, uncompressed st } } +// Retrieves a container builtin to the engine. +func (r *Client) BuiltinContainer(digest string) *Container { + q := r.Query.Select("builtinContainer") + q = q.Arg("digest", digest) + + return &Container{ + Query: q, + Client: r.Client, + } +} + // Constructs a cache volume for a given cache key. func (r *Client) CacheVolume(key string) *CacheVolume { q := r.Query.Select("cacheVolume")