Skip to content

Commit

Permalink
fix(scorch): prepend component stream path with base path
Browse files Browse the repository at this point in the history
  • Loading branch information
activeshadow committed Oct 25, 2023
1 parent f65afaa commit f86bc00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/go/web/rbac/known_policy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/go/web/scorch/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ func GetComponentOutput(w http.ResponseWriter, r *http.Request) error {
return nil
}

body, _ := json.Marshal(util.WithRoot("stream", fmt.Sprintf("/api/v1/experiments/%s/scorch/components/%d/%d/%s/%s/ws", exp, run, loop, stage, cmp)))
body, _ := json.Marshal(util.WithRoot("stream", fmt.Sprintf("%sapi/v1/experiments/%s/scorch/components/%d/%d/%s/%s/ws", basePath, exp, run, loop, stage, cmp)))

w.Header().Set("Content-Type", "application/json")
w.Write(body)
Expand Down
2 changes: 1 addition & 1 deletion src/go/web/scorch/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func CreateWebTerminal(ctx context.Context, exp string, run, loop int, stage, na
term.Pty = tty
term.Pid = c.Process.Pid

plog.Info("spawned newterminal", "cmd", cmd, "pid", term.Pid)
plog.Info("spawned new terminal", "cmd", cmd, "pid", term.Pid)

webTermMu.Lock()
webTermsPid[term.Pid] = term
Expand Down

0 comments on commit f86bc00

Please sign in to comment.