Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
# Conflicts:
#	backend/controller/console/console.go
#	backend/controller/controller.go
#	backend/controller/timeline/events_async.go
#	backend/controller/timeline/events_call.go
#	backend/controller/timeline/events_cron.go
#	backend/controller/timeline/events_ingress.go
#	backend/controller/timeline/events_log.go
#	backend/controller/timeline/events_pubsub_consume.go
#	backend/controller/timeline/events_pubsub_publish.go
#	backend/controller/timeline/timeline.go

# Conflicts:
#	backend/controller/controller.go
#	backend/controller/timeline/timeline.go
  • Loading branch information
matt2e committed Dec 6, 2024
1 parent c5f8097 commit 2b1dde0
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 1,412 deletions.
396 changes: 94 additions & 302 deletions backend/controller/console/console.go

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions backend/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import (
"github.com/TBD54566975/ftl/backend/controller/observability"
"github.com/TBD54566975/ftl/backend/controller/pubsub"
"github.com/TBD54566975/ftl/backend/controller/scheduledtask"
oldtimeline "github.com/TBD54566975/ftl/backend/controller/timeline"
"github.com/TBD54566975/ftl/backend/libdal"
"github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/console/v1/pbconsoleconnect"
ftldeployment "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/deployment/v1"
Expand Down Expand Up @@ -160,7 +159,7 @@ func Start(
logger.Debugf("Advertising as %s", config.Advertise)

admin := admin.NewAdminService(cm, sm, svc.dal)
console := console.NewService(svc.dal, svc.timeline, admin)
console := console.NewService(svc.dal, admin)

g, ctx := errgroup.WithContext(ctx)

Expand Down Expand Up @@ -209,7 +208,6 @@ type Service struct {
tasks *scheduledtask.Scheduler
pubSub *pubsub.Service
registry artefacts.Service
timeline *oldtimeline.Service
controllerListListeners []ControllerListListener

// Map from runnerKey.String() to client.
Expand Down Expand Up @@ -275,8 +273,6 @@ func New(
}
svc.registry = storage

timelineSvc := oldtimeline.New(ctx, conn, encryption)
svc.timeline = timelineSvc
pubSub := pubsub.New(ctx, conn, encryption, optional.Some[pubsub.AsyncCallListener](svc))
svc.pubSub = pubSub
svc.dal = dal.New(ctx, conn, encryption, pubSub, svc.registry)
Expand Down Expand Up @@ -465,7 +461,7 @@ func (s *Service) StreamDeploymentLogs(ctx context.Context, stream *connect.Clie
requestKey = optional.Some(rkey)
}

timeline.Publish(ctx, &timeline.Log{
timeline.Publish(ctx, timeline.Log{
DeploymentKey: deploymentKey,
RequestKey: requestKey,
Time: msg.TimeStamp.AsTime(),
Expand Down Expand Up @@ -903,7 +899,7 @@ func (s *Service) PublishEvent(ctx context.Context, req *connect.Request[ftldepl
routes := s.routeTable.Current()
route, ok := routes.GetDeployment(module).Get()
if ok {
timeline.Publish(ctx, &timeline.PubSubPublish{
timeline.Publish(ctx, timeline.PubSubPublish{
DeploymentKey: route,
RequestKey: requestKey,
Time: now,
Expand Down Expand Up @@ -1261,7 +1257,7 @@ func (s *Service) executeAsyncCalls(ctx context.Context) (interval time.Duration
if e, ok := err.Get(); ok {
errStr = optional.Some(e.Error())
}
timeline.Publish(ctx, &timeline.AsyncExecute{
timeline.Publish(ctx, timeline.AsyncExecute{
DeploymentKey: deployment,
RequestKey: call.ParentRequestKey,
EventType: eventType,
Expand Down
49 changes: 0 additions & 49 deletions backend/controller/timeline/events_async.go

This file was deleted.

127 changes: 0 additions & 127 deletions backend/controller/timeline/events_call.go

This file was deleted.

43 changes: 0 additions & 43 deletions backend/controller/timeline/events_cron.go

This file was deleted.

43 changes: 0 additions & 43 deletions backend/controller/timeline/events_deployment.go

This file was deleted.

Loading

0 comments on commit 2b1dde0

Please sign in to comment.