Ensure sending of the Sentry End debug message.

This commit is contained in:
Maximilian Paß
2023-02-26 21:28:30 +00:00
committed by Sebastian Serth
parent 4fb6ab980b
commit f309d0f70e
3 changed files with 27 additions and 4 deletions

View File

@ -9,6 +9,7 @@ import (
"github.com/openHPI/poseidon/internal/config"
"github.com/openHPI/poseidon/pkg/logging"
"io"
"strings"
)
var (
@ -89,7 +90,8 @@ func (nc *nomadAPIClient) Execute(runnerID string,
ctx context.Context, command []string, tty bool,
stdin io.Reader, stdout, stderr io.Writer,
) (int, error) {
log.WithField("command", command).Trace("Requesting Nomad Exec")
log.WithField("command", strings.ReplaceAll(strings.Join(command, ", "), "\n", "")).
Trace("Requesting Nomad Exec")
var allocations []*nomadApi.AllocationListStub
var err error
logging.StartSpan("nomad.execute.list", "List Allocations for id", ctx, func(_ context.Context) {