From 0e0bf440701815c1a76276e5e6eb2b54fa552c18 Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Tue, 17 Dec 2024 23:19:13 -0500 Subject: [PATCH 1/6] add env and build secrets to execs --- pkg/abstractions/image/build.go | 2 + pkg/abstractions/image/image.proto | 2 + pkg/gateway/gateway.go | 1 + pkg/repository/backend_postgres.go | 34 ++++++ pkg/repository/base.go | 2 + pkg/types/scheduler.go | 9 +- pkg/worker/runc_server.go | 2 + proto/image.pb.go | 137 ++++++++++++++---------- sdk/src/beta9/abstractions/image.py | 16 +++ sdk/src/beta9/clients/image/__init__.py | 2 + 10 files changed, 144 insertions(+), 63 deletions(-) diff --git a/pkg/abstractions/image/build.go b/pkg/abstractions/image/build.go index 751b88fc3..f9390915c 100644 --- a/pkg/abstractions/image/build.go +++ b/pkg/abstractions/image/build.go @@ -65,6 +65,7 @@ type BuildOpts struct { BuildSteps []BuildStep ForceRebuild bool EnvVars []string + BuildSecrets []string } func (o *BuildOpts) String() string { @@ -259,6 +260,7 @@ func (b *Builder) Build(ctx context.Context, opts *BuildOpts, outputChan chan co SourceImageCreds: opts.BaseImageCreds, Dockerfile: dockerfile, BuildCtxObject: &opts.BuildCtxObject, + BuildSecrets: opts.BuildSecrets, }, ContainerId: containerId, Env: opts.EnvVars, diff --git a/pkg/abstractions/image/image.proto b/pkg/abstractions/image/image.proto index 38ee52096..d2f26091c 100644 --- a/pkg/abstractions/image/image.proto +++ b/pkg/abstractions/image/image.proto @@ -25,6 +25,7 @@ message VerifyImageBuildRequest { repeated string env_vars = 7; string dockerfile = 8; string build_ctx_object = 9; + repeated string secrets = 10; } message VerifyImageBuildResponse { @@ -48,6 +49,7 @@ message BuildImageRequest { repeated string env_vars = 7; string dockerfile = 8; string build_ctx_object = 9; + repeated string secrets = 10; } message BuildImageResponse { diff --git a/pkg/gateway/gateway.go b/pkg/gateway/gateway.go index 26369fd04..1a2ff75bf 100644 --- a/pkg/gateway/gateway.go +++ b/pkg/gateway/gateway.go @@ -249,6 +249,7 @@ func (g *Gateway) registerServices() error { ContainerRepo: g.ContainerRepo, Scheduler: g.Scheduler, Tailscale: g.Tailscale, + BackendRepo: g.BackendRepo, }) if err != nil { return err diff --git a/pkg/repository/backend_postgres.go b/pkg/repository/backend_postgres.go index e03a647e0..408e934d1 100644 --- a/pkg/repository/backend_postgres.go +++ b/pkg/repository/backend_postgres.go @@ -1416,6 +1416,18 @@ func (r *PostgresBackendRepository) GetSecretByName(ctx context.Context, workspa return &secret, nil } +func (r *PostgresBackendRepository) GetSecretsByName(ctx context.Context, workspace *types.Workspace, names []string) ([]types.Secret, error) { + query := `SELECT id, external_id, name, value, workspace_id, last_updated_by, created_at, updated_at FROM workspace_secret WHERE name = ANY($1) AND workspace_id = $2;` + + var secrets []types.Secret + err := r.client.SelectContext(ctx, &secrets, query, pq.Array(names), workspace.Id) + if err != nil { + return nil, err + } + + return secrets, nil +} + func (r *PostgresBackendRepository) GetSecretByNameDecrypted(ctx context.Context, workspace *types.Workspace, name string) (*types.Secret, error) { secret, err := r.GetSecretByName(ctx, workspace, name) if err != nil { @@ -1437,6 +1449,28 @@ func (r *PostgresBackendRepository) GetSecretByNameDecrypted(ctx context.Context return secret, nil } +func (r *PostgresBackendRepository) GetSecretsByNameDecrypted(ctx context.Context, workspace *types.Workspace, names []string) ([]types.Secret, error) { + secrets, err := r.GetSecretsByName(ctx, workspace, names) + if err != nil { + return nil, err + } + + signingKey, err := pkgCommon.ParseSigningKey(*workspace.SigningKey) + if err != nil { + return nil, err + } + + for i, secret := range secrets { + decryptedSecret, err := pkgCommon.Decrypt(signingKey, secret.Value) + if err != nil { + return nil, err + } + secrets[i].Value = string(decryptedSecret) + } + + return secrets, nil +} + func (r *PostgresBackendRepository) ListSecrets(ctx context.Context, workspace *types.Workspace) ([]types.Secret, error) { query := `SELECT id, external_id, name, workspace_id, last_updated_by, created_at, updated_at FROM workspace_secret WHERE workspace_id = $1;` diff --git a/pkg/repository/base.go b/pkg/repository/base.go index 9ce4471a8..e817a7e9d 100755 --- a/pkg/repository/base.go +++ b/pkg/repository/base.go @@ -124,7 +124,9 @@ type BackendRepository interface { UpdateConcurrencyLimit(ctx context.Context, concurrencyLimitId uint, gpuLimit uint32, cpuMillicoreLimit uint32) (*types.ConcurrencyLimit, error) CreateSecret(ctx context.Context, workspace *types.Workspace, tokenId uint, name string, value string) (*types.Secret, error) GetSecretByName(ctx context.Context, workspace *types.Workspace, name string) (*types.Secret, error) + GetSecretsByName(ctx context.Context, workspace *types.Workspace, names []string) ([]types.Secret, error) GetSecretByNameDecrypted(ctx context.Context, workspace *types.Workspace, name string) (*types.Secret, error) + GetSecretsByNameDecrypted(ctx context.Context, workspace *types.Workspace, names []string) ([]types.Secret, error) ListSecrets(ctx context.Context, workspace *types.Workspace) ([]types.Secret, error) UpdateSecret(ctx context.Context, workspace *types.Workspace, tokenId uint, secretId string, value string) (*types.Secret, error) DeleteSecret(ctx context.Context, workspace *types.Workspace, secretName string) error diff --git a/pkg/types/scheduler.go b/pkg/types/scheduler.go index 1e365daf2..aa37a35e1 100644 --- a/pkg/types/scheduler.go +++ b/pkg/types/scheduler.go @@ -80,10 +80,11 @@ type ContainerState struct { } type BuildOptions struct { - SourceImage *string `json:"source_image"` - Dockerfile *string `json:"dockerfile"` - BuildCtxObject *string `json:"build_context"` - SourceImageCreds string `json:"source_image_creds"` + SourceImage *string `json:"source_image"` + Dockerfile *string `json:"dockerfile"` + BuildCtxObject *string `json:"build_context"` + SourceImageCreds string `json:"source_image_creds"` + BuildSecrets []string `json:"build_secrets"` } type ContainerRequest struct { diff --git a/pkg/worker/runc_server.go b/pkg/worker/runc_server.go index f4d0e081f..bf6c4c5a4 100644 --- a/pkg/worker/runc_server.go +++ b/pkg/worker/runc_server.go @@ -111,6 +111,8 @@ func (s *RunCServer) RunCExec(ctx context.Context, in *pb.RunCExecRequest) (*pb. if !exists { return &pb.RunCExecResponse{Ok: false}, nil } + process.Env = append(process.Env, instance.Spec.Process.Env...) + process.Env = append(process.Env, instance.Request.BuildOptions.BuildSecrets...) err = s.runcHandle.Exec(ctx, in.ContainerId, *process, &runc.ExecOpts{ OutputWriter: instance.OutputWriter, diff --git a/proto/image.pb.go b/proto/image.pb.go index 9329f0811..770cdfdd8 100644 --- a/proto/image.pb.go +++ b/proto/image.pb.go @@ -89,6 +89,7 @@ type VerifyImageBuildRequest struct { EnvVars []string `protobuf:"bytes,7,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty"` Dockerfile string `protobuf:"bytes,8,opt,name=dockerfile,proto3" json:"dockerfile,omitempty"` BuildCtxObject string `protobuf:"bytes,9,opt,name=build_ctx_object,json=buildCtxObject,proto3" json:"build_ctx_object,omitempty"` + Secrets []string `protobuf:"bytes,10,rep,name=secrets,proto3" json:"secrets,omitempty"` } func (x *VerifyImageBuildRequest) Reset() { @@ -186,6 +187,13 @@ func (x *VerifyImageBuildRequest) GetBuildCtxObject() string { return "" } +func (x *VerifyImageBuildRequest) GetSecrets() []string { + if x != nil { + return x.Secrets + } + return nil +} + type VerifyImageBuildResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -265,6 +273,7 @@ type BuildImageRequest struct { EnvVars []string `protobuf:"bytes,7,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty"` Dockerfile string `protobuf:"bytes,8,opt,name=dockerfile,proto3" json:"dockerfile,omitempty"` BuildCtxObject string `protobuf:"bytes,9,opt,name=build_ctx_object,json=buildCtxObject,proto3" json:"build_ctx_object,omitempty"` + Secrets []string `protobuf:"bytes,10,rep,name=secrets,proto3" json:"secrets,omitempty"` } func (x *BuildImageRequest) Reset() { @@ -362,6 +371,13 @@ func (x *BuildImageRequest) GetBuildCtxObject() string { return "" } +func (x *BuildImageRequest) GetSecrets() []string { + if x != nil { + return x.Secrets + } + return nil +} + type BuildImageResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -441,7 +457,7 @@ var file_image_proto_rawDesc = []byte{ 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x22, - 0xf0, 0x02, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, + 0x8a, 0x03, 0x0a, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, @@ -464,65 +480,68 @@ var file_image_proto_rawDesc = []byte{ 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x74, 0x78, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x74, 0x78, 0x4f, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x22, 0x63, 0x0a, 0x18, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0xf0, 0x03, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, - 0x0e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x5f, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x70, - 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1a, 0x0a, - 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x69, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x69, 0x12, 0x62, 0x0a, 0x14, 0x65, 0x78, 0x69, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, - 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, - 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x72, 0x65, - 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x72, 0x65, 0x64, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, - 0x65, 0x70, 0x52, 0x0a, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x65, 0x70, 0x73, 0x12, 0x19, - 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x63, - 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, - 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x5f, 0x63, 0x74, 0x78, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x74, 0x78, 0x4f, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x1a, 0x45, 0x0a, 0x17, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x43, 0x72, 0x65, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6f, 0x0a, 0x12, 0x42, 0x75, - 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, - 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a, - 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x64, 0x6f, 0x6e, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, 0xac, 0x01, 0x0a, 0x0c, - 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x10, + 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x0a, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0x63, 0x0a, 0x18, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x12, 0x1e, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, - 0x65, 0x12, 0x18, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, - 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, 0x6d, 0x2d, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x73, 0x22, 0x8a, 0x04, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x79, 0x74, 0x68, 0x6f, + 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, + 0x0a, 0x0f, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, + 0x6e, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x10, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, + 0x69, 0x12, 0x62, 0x0a, 0x14, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6d, + 0x61, 0x67, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x30, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x72, 0x65, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x12, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, + 0x43, 0x72, 0x65, 0x64, 0x73, 0x12, 0x31, 0x0a, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, + 0x74, 0x65, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x65, 0x70, 0x52, 0x0a, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x53, 0x74, 0x65, 0x70, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x5f, + 0x76, 0x61, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, + 0x61, 0x72, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, 0x69, 0x6c, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x74, 0x78, + 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x43, 0x74, 0x78, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x1a, 0x45, 0x0a, 0x17, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x72, 0x65, 0x64, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6f, + 0x0a, 0x12, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, + 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, + 0x67, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x04, 0x64, 0x6f, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x32, + 0xac, 0x01, 0x0a, 0x0c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x55, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, + 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1e, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, + 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, + 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x23, + 0x5a, 0x21, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x65, 0x61, + 0x6d, 0x2d, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62, 0x65, 0x74, 0x61, 0x39, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/sdk/src/beta9/abstractions/image.py b/sdk/src/beta9/abstractions/image.py index 2d535ce3e..7f7c40b73 100644 --- a/sdk/src/beta9/abstractions/image.py +++ b/sdk/src/beta9/abstractions/image.py @@ -259,6 +259,7 @@ def handler(): self.base_image = base_image or "" self.base_image_creds = base_image_creds or {} self.env_vars = [] + self.secrets = [] self._stub: Optional[ImageServiceStub] = None self.dockerfile = "" self.build_ctx_object = "" @@ -363,6 +364,7 @@ def exists(self) -> Tuple[bool, ImageBuildResult]: env_vars=self.env_vars, dockerfile=self.dockerfile, build_ctx_object=self.build_ctx_object, + secrets=self.secrets, ) ) @@ -392,6 +394,7 @@ def build(self) -> ImageBuildResult: env_vars=self.env_vars, dockerfile=self.dockerfile, build_ctx_object=self.build_ctx_object, + secrets=self.secrets, ) ): if r.msg != "": @@ -550,3 +553,16 @@ def validate_env_vars(self, env_vars: List[str]) -> None: raise ValueError( f"Environment variable cannot contain multiple '=' characters: {env_var}" ) + + def with_secrets(self, secrets: List[str]) -> "Image": + """ + Adds beta9 secrets to the build environment. + + Parameters: + secrets: The beta9 secrets to add. + + Returns: + Image: The Image object. + """ + self.secrets.extend(secrets) + return self diff --git a/sdk/src/beta9/clients/image/__init__.py b/sdk/src/beta9/clients/image/__init__.py index 3f95223cc..38acd39db 100644 --- a/sdk/src/beta9/clients/image/__init__.py +++ b/sdk/src/beta9/clients/image/__init__.py @@ -42,6 +42,7 @@ class VerifyImageBuildRequest(betterproto.Message): env_vars: List[str] = betterproto.string_field(7) dockerfile: str = betterproto.string_field(8) build_ctx_object: str = betterproto.string_field(9) + secrets: List[str] = betterproto.string_field(10) @dataclass(eq=False, repr=False) @@ -68,6 +69,7 @@ class BuildImageRequest(betterproto.Message): env_vars: List[str] = betterproto.string_field(7) dockerfile: str = betterproto.string_field(8) build_ctx_object: str = betterproto.string_field(9) + secrets: List[str] = betterproto.string_field(10) @dataclass(eq=False, repr=False) From 5fab66aa51c16785b87a4546088cbe4de4fa81ed Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Tue, 17 Dec 2024 23:23:13 -0500 Subject: [PATCH 2/6] working build secrets --- pkg/abstractions/image/image.go | 43 ++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/pkg/abstractions/image/image.go b/pkg/abstractions/image/image.go index 0a0b8e894..667b69fb9 100644 --- a/pkg/abstractions/image/image.go +++ b/pkg/abstractions/image/image.go @@ -2,7 +2,9 @@ package image import ( "context" + "fmt" + "github.com/beam-cloud/beta9/pkg/auth" "github.com/beam-cloud/beta9/pkg/common" "github.com/beam-cloud/beta9/pkg/network" "github.com/beam-cloud/beta9/pkg/repository" @@ -21,13 +23,15 @@ type ImageService interface { type RuncImageService struct { pb.UnimplementedImageServiceServer - builder *Builder - config types.AppConfig + builder *Builder + config types.AppConfig + backendRepo repository.BackendRepository } type ImageServiceOpts struct { Config types.AppConfig ContainerRepo repository.ContainerRepository + BackendRepo repository.BackendRepository Scheduler *scheduler.Scheduler Tailscale *network.Tailscale } @@ -47,8 +51,9 @@ func NewRuncImageService( } return &RuncImageService{ - builder: builder, - config: opts.Config, + builder: builder, + config: opts.Config, + backendRepo: opts.BackendRepo, }, nil } @@ -60,6 +65,12 @@ func (is *RuncImageService) VerifyImageBuild(ctx context.Context, in *pb.VerifyI return nil, errors.Errorf("Python version not supportted: %s", in.PythonVersion) } + authInfo, _ := auth.AuthInfoFromContext(ctx) + buildSecrets, err := is.parseBuildSecrets(ctx, in.Secrets, authInfo) + if err != nil { + return nil, err + } + opts := &BuildOpts{ BaseImageTag: baseImageTag, BaseImageName: is.config.ImageService.Runner.BaseImageName, @@ -72,6 +83,7 @@ func (is *RuncImageService) VerifyImageBuild(ctx context.Context, in *pb.VerifyI EnvVars: in.EnvVars, Dockerfile: in.Dockerfile, BuildCtxObject: in.BuildCtxObject, + BuildSecrets: buildSecrets, } if in.ExistingImageUri != "" { @@ -97,6 +109,13 @@ func (is *RuncImageService) VerifyImageBuild(ctx context.Context, in *pb.VerifyI func (is *RuncImageService) BuildImage(in *pb.BuildImageRequest, stream pb.ImageService_BuildImageServer) error { log.Info().Interface("request", in).Msg("incoming image build request") + authInfo, _ := auth.AuthInfoFromContext(stream.Context()) + + buildSecrets, err := is.parseBuildSecrets(stream.Context(), in.Secrets, authInfo) + if err != nil { + return err + } + buildOptions := &BuildOpts{ BaseImageTag: is.config.ImageService.Runner.Tags[in.PythonVersion], BaseImageName: is.config.ImageService.Runner.BaseImageName, @@ -110,6 +129,7 @@ func (is *RuncImageService) BuildImage(in *pb.BuildImageRequest, stream pb.Image EnvVars: in.EnvVars, Dockerfile: in.Dockerfile, BuildCtxObject: in.BuildCtxObject, + BuildSecrets: buildSecrets, } ctx := stream.Context() @@ -149,6 +169,21 @@ func (is *RuncImageService) BuildImage(in *pb.BuildImageRequest, stream pb.Image return nil } +func (is *RuncImageService) parseBuildSecrets(ctx context.Context, secrets []string, authInfo *auth.AuthInfo) ([]string, error) { + var buildSecrets []string + if secrets != nil { + secrets, err := is.backendRepo.GetSecretsByNameDecrypted(ctx, authInfo.Workspace, secrets) + if err != nil { + return nil, err + } + + for _, secret := range secrets { + buildSecrets = append(buildSecrets, fmt.Sprintf("%s=%s", secret.Name, secret.Value)) + } + } + return buildSecrets, nil +} + func convertBuildSteps(buildSteps []*pb.BuildStep) []BuildStep { steps := make([]BuildStep, len(buildSteps)) for i, s := range buildSteps { From 93374d41b230076e4e1a5f1143e422aee4251c51 Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Wed, 18 Dec 2024 12:22:40 -0500 Subject: [PATCH 3/6] rename --- pkg/abstractions/image/image.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/abstractions/image/image.go b/pkg/abstractions/image/image.go index 667b69fb9..6bd587ac0 100644 --- a/pkg/abstractions/image/image.go +++ b/pkg/abstractions/image/image.go @@ -66,7 +66,7 @@ func (is *RuncImageService) VerifyImageBuild(ctx context.Context, in *pb.VerifyI } authInfo, _ := auth.AuthInfoFromContext(ctx) - buildSecrets, err := is.parseBuildSecrets(ctx, in.Secrets, authInfo) + buildSecrets, err := is.retrieveBuildSecrets(ctx, in.Secrets, authInfo) if err != nil { return nil, err } @@ -111,7 +111,7 @@ func (is *RuncImageService) BuildImage(in *pb.BuildImageRequest, stream pb.Image authInfo, _ := auth.AuthInfoFromContext(stream.Context()) - buildSecrets, err := is.parseBuildSecrets(stream.Context(), in.Secrets, authInfo) + buildSecrets, err := is.retrieveBuildSecrets(stream.Context(), in.Secrets, authInfo) if err != nil { return err } @@ -169,7 +169,7 @@ func (is *RuncImageService) BuildImage(in *pb.BuildImageRequest, stream pb.Image return nil } -func (is *RuncImageService) parseBuildSecrets(ctx context.Context, secrets []string, authInfo *auth.AuthInfo) ([]string, error) { +func (is *RuncImageService) retrieveBuildSecrets(ctx context.Context, secrets []string, authInfo *auth.AuthInfo) ([]string, error) { var buildSecrets []string if secrets != nil { secrets, err := is.backendRepo.GetSecretsByNameDecrypted(ctx, authInfo.Workspace, secrets) From a08dbb688bd69e16b328c0e078c954fdc92d1c64 Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Wed, 18 Dec 2024 13:37:57 -0500 Subject: [PATCH 4/6] only use if its a build request --- pkg/types/scheduler.go | 5 +++++ pkg/worker/lifecycle.go | 9 ++------- pkg/worker/runc_server.go | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pkg/types/scheduler.go b/pkg/types/scheduler.go index aa37a35e1..09b6ac17c 100644 --- a/pkg/types/scheduler.go +++ b/pkg/types/scheduler.go @@ -114,6 +114,11 @@ func (c *ContainerRequest) RequiresGPU() bool { return len(c.GpuRequest) > 0 || c.Gpu != "" } +// IsBuildRequest checks if the sourceImage or Dockerfile field is not-nil, which means the container request is for a build container +func (c *ContainerRequest) IsBuildRequest() bool { + return c.BuildOptions.SourceImage != nil || c.BuildOptions.Dockerfile != nil +} + const ContainerExitCodeTtlS int = 300 const ( diff --git a/pkg/worker/lifecycle.go b/pkg/worker/lifecycle.go index b73fc1243..4099212eb 100644 --- a/pkg/worker/lifecycle.go +++ b/pkg/worker/lifecycle.go @@ -176,7 +176,7 @@ func (s *Worker) RunContainer(request *types.ContainerRequest) error { // Attempt to pull image log.Info().Str("container_id", containerId).Msgf("lazy-pulling image: %s", request.ImageId) if err := s.imageClient.PullLazy(request); err != nil { - if !isBuildRequest(request) { + if !request.IsBuildRequest() { return err } @@ -629,7 +629,7 @@ func (s *Worker) createOverlay(request *types.ContainerRequest, bundlePath strin } overlayPath := baseConfigPath - if isBuildRequest(request) { + if request.IsBuildRequest() { overlayPath = "/dev/shm" } @@ -708,8 +708,3 @@ func (s *Worker) getBuildContext(request *types.ContainerRequest) (string, error } return buildCtxPath, nil } - -// isBuildRequest checks if the sourceImage or Dockerfile field is not-nil, which means the container request is for a build container -func isBuildRequest(request *types.ContainerRequest) bool { - return request.BuildOptions.SourceImage != nil || request.BuildOptions.Dockerfile != nil -} diff --git a/pkg/worker/runc_server.go b/pkg/worker/runc_server.go index bf6c4c5a4..24a77548e 100644 --- a/pkg/worker/runc_server.go +++ b/pkg/worker/runc_server.go @@ -112,7 +112,9 @@ func (s *RunCServer) RunCExec(ctx context.Context, in *pb.RunCExecRequest) (*pb. return &pb.RunCExecResponse{Ok: false}, nil } process.Env = append(process.Env, instance.Spec.Process.Env...) - process.Env = append(process.Env, instance.Request.BuildOptions.BuildSecrets...) + if instance.Request.IsBuildRequest() { + process.Env = append(process.Env, instance.Request.BuildOptions.BuildSecrets...) + } err = s.runcHandle.Exec(ctx, in.ContainerId, *process, &runc.ExecOpts{ OutputWriter: instance.OutputWriter, From ea8fc55e320b14dabe5873d1e25b3dbe76364208 Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Wed, 18 Dec 2024 13:41:00 -0500 Subject: [PATCH 5/6] update comment --- sdk/src/beta9/abstractions/image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/src/beta9/abstractions/image.py b/sdk/src/beta9/abstractions/image.py index 7f7c40b73..a8935a267 100644 --- a/sdk/src/beta9/abstractions/image.py +++ b/sdk/src/beta9/abstractions/image.py @@ -556,10 +556,10 @@ def validate_env_vars(self, env_vars: List[str]) -> None: def with_secrets(self, secrets: List[str]) -> "Image": """ - Adds beta9 secrets to the build environment. + Adds secrets stored in the platform to the build environment. Parameters: - secrets: The beta9 secrets to add. + secrets: The secrets to add. Returns: Image: The Image object. From 123e9ca0f052007cea13ce966dedacd588c0a40d Mon Sep 17 00:00:00 2001 From: Daniel Levi-Minzi Date: Wed, 18 Dec 2024 13:42:48 -0500 Subject: [PATCH 6/6] update version --- sdk/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/pyproject.toml b/sdk/pyproject.toml index edfbc14c6..5e5f7f313 100644 --- a/sdk/pyproject.toml +++ b/sdk/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "beta9" -version = "0.1.137" +version = "0.1.138" description = "" authors = ["beam.cloud "] packages = [