Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

properly name our gateways in python #17

Merged
merged 1 commit into from
Dec 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions pkg/lang/python/plugin_expose.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package python

import (
"fmt"
"path"
"regexp"
"strings"
Expand Down Expand Up @@ -128,8 +127,7 @@ func (h *restAPIHandler) handle(unit *core.ExecutionUnit) error {
}

for spec, routes := range h.RoutesByGateway {
gwName := fmt.Sprintf("%s#%s", spec.FilePath, spec.AppVarName)
gw := core.NewGateway(gwName)
gw := core.NewGateway(spec.AppVarName)
if existing := h.Result.Get(gw.Key()); existing != nil {
gw = existing.(*core.Gateway)
} else {
Expand Down Expand Up @@ -217,7 +215,7 @@ func (h *restAPIHandler) handleFile(f *core.SourceFile) (*core.SourceFile, error

gwSpec := gatewaySpec{
FilePath: f.Path(),
AppVarName: appName,
AppVarName: cap.ID,
}

log = log.With(zap.String("var", appName))
Expand Down