Skip to content

Commit

Permalink
refactor: an alternate runtime format (#3612)
Browse files Browse the repository at this point in the history
A single `*Runtime` struct, where each field is an event, and mutable.
  • Loading branch information
alecthomas authored Dec 4, 2024
1 parent e376f9e commit ac4aaf5
Show file tree
Hide file tree
Showing 13 changed files with 795 additions and 630 deletions.
4 changes: 2 additions & 2 deletions backend/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ func (s *Service) CreateDeployment(ctx context.Context, req *connect.Request[ftl
return nil, fmt.Errorf("invalid module schema: %w", err)
}

dkey, err := s.dal.CreateDeployment(ctx, ms.Runtime.Language, module, artefacts)
dkey, err := s.dal.CreateDeployment(ctx, ms.Runtime.Base.Language, module, artefacts)

if err != nil {
logger.Errorf(err, "Could not create deployment")
Expand Down Expand Up @@ -1581,7 +1581,7 @@ func (s *Service) watchModuleChanges(ctx context.Context, sendChange func(respon
message.Schema.Runtime.Scaling = &schema.ModuleRuntimeScaling{
MinReplicas: int32(message.MinReplicas),
}
message.Schema.Runtime.CreateTime = message.CreatedAt
message.Schema.Runtime.Base.CreateTime = message.CreatedAt

moduleSchema := message.Schema.ToProto().(*schemapb.Module) //nolint:forcetypeassert
hasher := sha.New()
Expand Down
Loading

0 comments on commit ac4aaf5

Please sign in to comment.