From bb94aa3572706f8af13ace6356acd0f8a8307866 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 23 Dec 2025 08:57:36 -0500 Subject: Omni/Ci: fix timeout and carriage return issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add explicit --time 0 argument to bild test command - Add debug logging for BILD_ARGS environment variable - Strip ANSI escape sequences and carriage returns from error messages - Fixes ^M characters appearing in git notes - Ensures timeout is properly disabled for CI runs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Omni/Ci.hs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Omni/Ci.hs b/Omni/Ci.hs index 04dba06..bc84aae 100755 --- a/Omni/Ci.hs +++ b/Omni/Ci.hs @@ -60,6 +60,7 @@ move args = do currentBildArgs <- Environment.lookupEnv "BILD_ARGS" let bildArgs = "--time 0 " <> fromMaybe "" currentBildArgs Environment.setEnv "BILD_ARGS" bildArgs + Log.info ["ci", "set BILD_ARGS=" <> Text.pack bildArgs] -- 3. Get user info at <- readProcess "date" ["-u", "-R"] "" |> fmap chomp @@ -146,7 +147,7 @@ move args = do -- We can pass namespaces. -- Let's try passing all files again. -- bild handles namespaces. - (exitCodeTest, _, testStderr) <- Process.readProcessWithExitCode "bild" ("--test" : allFiles) "" + (exitCodeTest, _, testStderr) <- Process.readProcessWithExitCode "bild" ("--test" : "--time" : "0" : allFiles) "" pure <| case exitCodeTest of Exit.ExitSuccess -> ("good", "") _ -> ("fail", extractErrorMessage (Text.pack testStderr)) @@ -209,6 +210,7 @@ extractErrorMessage :: Text -> Text extractErrorMessage output = let errorLines = Text.lines output + |> map stripAnsiEscapes -- Remove ANSI escape sequences |> filter isErrorLine |> take 5 -- Limit to first 5 error lines cleaned = @@ -230,3 +232,10 @@ extractErrorMessage output = `Text.isInfixOf` stripped ) && not ("warning:" `Text.isInfixOf` stripped) -- Exclude warnings + + -- Remove ANSI escape sequences including carriage returns + stripAnsiEscapes line = + line + |> Text.replace "\r" "" -- Remove carriage returns + |> Text.replace "\ESC[" "" -- Remove ANSI escape start + |> Text.filter (\c -> c >= ' ' || c == '\t') -- Keep only printable chars and tabs -- cgit v1.2.3