From 714cd8306f16b39a145ea09d7ddbd0e6c43535e2 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Mon, 3 Mar 2025 09:27:18 -0600 Subject: [PATCH 1/2] remove host requirement in `WithRoute` --- pkg/chassis/networking.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/chassis/networking.go b/pkg/chassis/networking.go index f205dd4..9397b18 100644 --- a/pkg/chassis/networking.go +++ b/pkg/chassis/networking.go @@ -76,12 +76,6 @@ func (c *Runtime) setAndValidateRoute(route *ntv1.Route) *ntv1.Route { if route.Match == nil { c.logger.Panic("route requested but no match provided") } - if route.Match.Host == "" { - route.Match.Host = c.config.GetString("service.network.external.host") - } - if route.Match.Host == "" { - c.logger.Panic("route requested but no host provided in the match") - } if route.Endpoint == nil { route.Endpoint = &ntv1.Endpoint{ Host: c.getConfigInternalHost(), From 7812bd5a691f28962b3328bb115bca90da077972 Mon Sep 17 00:00:00 2001 From: Jack Kawell Date: Mon, 3 Mar 2025 09:27:51 -0600 Subject: [PATCH 2/2] added `Ping()` call to `postgres/bun.Open()` --- pkg/repositories/postgres/bun/bun.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/repositories/postgres/bun/bun.go b/pkg/repositories/postgres/bun/bun.go index b8e554f..ccc39d8 100644 --- a/pkg/repositories/postgres/bun/bun.go +++ b/pkg/repositories/postgres/bun/bun.go @@ -44,7 +44,7 @@ func (r *repository) Open(ctx context.Context, config chassis.Config) error { sqldb := sql.OpenDB(pgdriver.NewConnector(pgdriver.WithDSN(url))) client := bun.NewDB(sqldb, pgdialect.New()) r.client = client - return nil + return r.Ping(ctx) } func (r *repository) Close(ctx context.Context) error {