From e0419c2e58bfa6767a4dc7e2386c93e1f194fc21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Sat, 11 Mar 2023 13:19:55 +0000 Subject: [PATCH] Fix Sentry Debug Regex that was ignoring composed messages including a newline. Also, add regression test. --- internal/nomad/sentry_debug_writer.go | 25 ++++++++++++++-------- internal/nomad/sentry_debug_writer_test.go | 12 +++++++++++ tests/e2e/websocket_test.go | 4 ++-- 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/internal/nomad/sentry_debug_writer.go b/internal/nomad/sentry_debug_writer.go index 497880e..cc262b6 100644 --- a/internal/nomad/sentry_debug_writer.go +++ b/internal/nomad/sentry_debug_writer.go @@ -19,7 +19,7 @@ var ( timeDebugMessageFormatEnd = `%s; ec=$?; ` + timeDebugMessageFormat + ` && exit $ec` timeDebugMessagePattern = regexp.MustCompile( - `(?P.*)\x1EPoseidon (?P.+) (?P