Skip to content

Commit

Permalink
chore: more DB cleanup (#3803)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
stuartwdouglas and github-actions[bot] authored Dec 17, 2024
1 parent de2f528 commit f5cb63d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 48 deletions.
9 changes: 0 additions & 9 deletions backend/admin/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"net/url"

"connectrpc.com/connect"
"github.com/alecthomas/kong"
_ "github.com/jackc/pgx/v5/stdlib"

ftlv1 "github.com/block/ftl/backend/protos/xyz/block/ftl/v1"
Expand All @@ -17,7 +16,6 @@ import (
"github.com/block/ftl/internal/configuration"
"github.com/block/ftl/internal/configuration/manager"
"github.com/block/ftl/internal/configuration/providers"
"github.com/block/ftl/internal/dsn"
"github.com/block/ftl/internal/log"
"github.com/block/ftl/internal/rpc"
"github.com/block/ftl/internal/schema/schemaeventsource"
Expand All @@ -27,12 +25,6 @@ type Config struct {
Bind *url.URL `help:"Socket to bind to." default:"http://127.0.0.1:8896" env:"FTL_BIND"`
}

func (c *Config) SetDefaults() {
if err := kong.ApplyDefaults(c, kong.Vars{"dsn": dsn.PostgresDSN("ftl")}); err != nil {
panic(err)
}
}

type AdminService struct {
schr SchemaRetriever
cm *manager.Manager[configuration.Configuration]
Expand Down Expand Up @@ -78,7 +70,6 @@ func Start(
sm *manager.Manager[configuration.Secrets],
schr SchemaRetriever,
) error {
config.SetDefaults()

logger := log.FromContext(ctx).Scope("admin")
svc := NewAdminService(cm, sm, schr)
Expand Down
5 changes: 0 additions & 5 deletions backend/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"time"

"connectrpc.com/connect"
"github.com/alecthomas/kong"
"github.com/alecthomas/types/optional"
"github.com/alecthomas/types/result"
"github.com/jackc/pgx/v5"
Expand All @@ -44,7 +43,6 @@ import (
"github.com/block/ftl/common/sha256"
"github.com/block/ftl/common/slices"
"github.com/block/ftl/internal/deploymentcontext"
"github.com/block/ftl/internal/dsn"
"github.com/block/ftl/internal/log"
ftlmaps "github.com/block/ftl/internal/maps"
"github.com/block/ftl/internal/model"
Expand Down Expand Up @@ -75,9 +73,6 @@ type Config struct {
}

func (c *Config) SetDefaults() {
if err := kong.ApplyDefaults(c, kong.Vars{"dsn": dsn.PostgresDSN("ftl")}); err != nil {
panic(err)
}
if c.Advertise == nil {
c.Advertise = c.Bind
}
Expand Down
2 changes: 0 additions & 2 deletions cmd/ftl-admin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/block/ftl/internal/configuration/manager"
"github.com/block/ftl/internal/configuration/providers"
"github.com/block/ftl/internal/configuration/routers"
"github.com/block/ftl/internal/dsn"
"github.com/block/ftl/internal/log"
"github.com/block/ftl/internal/observability"
"github.com/block/ftl/internal/rpc"
Expand All @@ -40,7 +39,6 @@ func main() {
kong.UsageOnError(),
kong.Vars{
"version": ftl.FormattedVersion,
"dsn": dsn.PostgresDSN("ftl"),
},
)

Expand Down
2 changes: 0 additions & 2 deletions cmd/ftl-controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/block/ftl/backend/protos/xyz/block/ftl/v1/ftlv1connect"
"github.com/block/ftl/backend/timeline"
_ "github.com/block/ftl/internal/automaxprocs" // Set GOMAXPROCS to match Linux container CPU quota.
"github.com/block/ftl/internal/dsn"
"github.com/block/ftl/internal/log"
"github.com/block/ftl/internal/observability"
"github.com/block/ftl/internal/rpc"
Expand All @@ -39,7 +38,6 @@ func main() {
kong.UsageOnError(),
kong.Vars{
"version": ftl.FormattedVersion,
"dsn": dsn.PostgresDSN("ftl"),
},
)
cli.ControllerConfig.SetDefaults()
Expand Down
28 changes: 0 additions & 28 deletions cmd/ftl-initdb/main.go

This file was deleted.

2 changes: 0 additions & 2 deletions frontend/cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/block/ftl/internal/configuration"
"github.com/block/ftl/internal/configuration/manager"
"github.com/block/ftl/internal/configuration/providers"
"github.com/block/ftl/internal/dsn"
"github.com/block/ftl/internal/log"
"github.com/block/ftl/internal/profiles"
"github.com/block/ftl/internal/projectconfig"
Expand Down Expand Up @@ -195,7 +194,6 @@ func createKongApplication(cli any, csm *currentStatusManager) *kong.Kong {
"arch": runtime.GOARCH,
"numcpu": strconv.Itoa(runtime.NumCPU()),
"gitroot": gitRoot,
"dsn": dsn.PostgresDSN("ftl"),
},
kong.Exit(func(code int) {
if sm, ok := csm.statusManager.Get(); ok {
Expand Down

0 comments on commit f5cb63d

Please sign in to comment.