diff --git a/api/runner/worker.go b/api/runner/worker.go index 3964e89be..ec2935125 100644 --- a/api/runner/worker.go +++ b/api/runner/worker.go @@ -373,7 +373,6 @@ func (hc *htfn) serve(ctx context.Context) { } }() - cfg.Env["FN_FORMAT"] = cfg.Format cfg.Timeout = 0 // add a timeout to simulate ab.end. failure. cfg.Stdin = hc.containerIn cfg.Stdout = hc.containerOut diff --git a/api/server/runner.go b/api/server/runner.go index 365ccf124..dae8a72db 100644 --- a/api/server/runner.go +++ b/api/server/runner.go @@ -152,12 +152,15 @@ func (s *Server) serve(ctx context.Context, c *gin.Context, appName string, rout } return "https" }(), c.Request.Host, c.Request.URL.String()), - "CALL_ID": reqID, - "FORMAT": route.Format, + "CALL_ID": reqID, + "FN_FORMAT": route.Format, } - // TODO we could add... format, app_name, route from above (but nothing from the specific request) - baseVars := make(map[string]string, len(app.Config)+len(route.Config)) + // baseVars are the vars on the route & app, not on this specific request [for hot functions] + baseVars := make(map[string]string, len(app.Config)+len(route.Config)+3) + baseVars["FN_FORMAT"] = route.Format + baseVars["APP_NAME"] = appName + baseVars["ROUTE"] = route.Path // app config for k, v := range app.Config {