From 79cee27ca6ac577ffab70bf723a76e6bc1276820 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 02:22:05 +0000 Subject: [PATCH 1/3] Bump Proc from 0.8.2 to 0.9.1 Bumps [Proc](https://github.com/nullean/proc) from 0.8.2 to 0.9.1. - [Release notes](https://github.com/nullean/proc/releases) - [Commits](https://github.com/nullean/proc/compare/0.8.2...0.9.1) --- updated-dependencies: - dependency-name: Proc dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../OpenSearch.OpenSearch.Managed.csproj | 2 +- build/scripts/scripts.fsproj | 2 +- tests/Tests.Core/Tests.Core.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/abstractions/src/OpenSearch.OpenSearch.Managed/OpenSearch.OpenSearch.Managed.csproj b/abstractions/src/OpenSearch.OpenSearch.Managed/OpenSearch.OpenSearch.Managed.csproj index 207777d386..da9ec6ecd2 100644 --- a/abstractions/src/OpenSearch.OpenSearch.Managed/OpenSearch.OpenSearch.Managed.csproj +++ b/abstractions/src/OpenSearch.OpenSearch.Managed/OpenSearch.OpenSearch.Managed.csproj @@ -13,7 +13,7 @@ - + diff --git a/build/scripts/scripts.fsproj b/build/scripts/scripts.fsproj index 4b15f599e7..4d461ecfde 100644 --- a/build/scripts/scripts.fsproj +++ b/build/scripts/scripts.fsproj @@ -46,6 +46,6 @@ - + diff --git a/tests/Tests.Core/Tests.Core.csproj b/tests/Tests.Core/Tests.Core.csproj index 97284f751c..af5b7ac942 100644 --- a/tests/Tests.Core/Tests.Core.csproj +++ b/tests/Tests.Core/Tests.Core.csproj @@ -23,6 +23,6 @@ - + From 9a974faacb6936182441ec703272b96566557f76 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 16 Dec 2024 02:22:23 +0000 Subject: [PATCH 2/3] Update changelog Signed-off-by: dependabot[bot] --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03d953331f..4582be2459 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `Fake.IO.Zip` from 6.1.0 to 6.1.3 - Bumps `Fake.Tools.Git` from 6.1.0 to 6.1.3 - Bumps `CSharpier.Core` from 0.29.1 to 0.30.2 -- Bumps `Proc` from 0.8.1 to 0.8.2 +- Bumps `Proc` from 0.8.1 to 0.9.1 - Bumps `System.Text.Json` from 8.0.4 to 8.0.5 - Bumps `JunitXml.TestLogger` from 4.0.254 to 4.1.0 - Bumps `FSharp.Core` from 8.0.400 to 8.0.401 From df614a7fbfee21a5f7cb199c69268670c8c95acb Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Tue, 24 Dec 2024 12:41:01 +1300 Subject: [PATCH 3/3] Fix compiling Signed-off-by: Thomas Farr --- .../Tasks/IClusterComposeTask.cs | 6 ++++-- build/scripts/Tooling.fs | 15 +++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/IClusterComposeTask.cs b/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/IClusterComposeTask.cs index 74441951ef..5395ca7171 100644 --- a/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/IClusterComposeTask.cs +++ b/abstractions/src/OpenSearch.OpenSearch.Ephemeral/Tasks/IClusterComposeTask.cs @@ -200,10 +200,12 @@ private static void ExecuteBinaryInternal(EphemeralClusterConfiguration config, var timeout = TimeSpan.FromSeconds(420); var processStartArguments = new StartArguments(binary, arguments) { - Environment = environment + Environment = environment, + Timeout = timeout, + ConsoleOutWriter = new ConsoleOutWriter() }; - var result = Proc.Start(processStartArguments, timeout, new ConsoleOutColorWriter()); + var result = Proc.Start(processStartArguments); if (!result.Completed) throw new Exception($"Timeout while executing {description} exceeded {timeout}"); diff --git a/build/scripts/Tooling.fs b/build/scripts/Tooling.fs index 91a011a9ba..623626abe8 100644 --- a/build/scripts/Tooling.fs +++ b/build/scripts/Tooling.fs @@ -44,11 +44,13 @@ module Tooling = let private defaultConsoleWriter = Some <| (ConsoleOutColorWriter() :> IConsoleOutWriter) - let readInWithTimeout timeout workinDir bin (writer: IConsoleOutWriter option) args = + let readInWithTimeout (timeout: TimeSpan) workinDir bin (writer: IConsoleOutWriter option) args = let startArgs = StartArguments(bin, args |> List.toArray) if (Option.isSome workinDir) then startArgs.WorkingDirectory <- Option.defaultValue "" workinDir - let result = Proc.Start(startArgs, timeout, Option.defaultValue (NoopWriter()) writer) + startArgs.Timeout <- timeout + startArgs.ConsoleOutWriter <- Option.defaultValue (NoopWriter()) writer + let result = Proc.Start(startArgs) if not result.Completed then failwithf "process failed to complete within %O: %s" timeout bin if not result.ExitCode.HasValue then failwithf "process yielded no exit code: %s" bin @@ -57,16 +59,17 @@ module Tooling = let read bin args = readInWithTimeout defaultTimeout None bin defaultConsoleWriter args let readQuiet bin args = readInWithTimeout defaultTimeout None bin None args - let execInWithTimeout timeout workinDir bin args = + let execInWithTimeout (timeout: TimeSpan) workinDir bin args = let startArgs = ExecArguments(bin, args |> List.toArray) if (Option.isSome workinDir) then startArgs.WorkingDirectory <- Option.defaultValue "" workinDir + startArgs.Timeout <- timeout let options = args |> String.concat " " printfn ":: Running command: %s %s" bin options - let result = Proc.Exec(startArgs, timeout) try - if not result.HasValue || result.Value > 0 then - failwithf "process returned %i: %s" result.Value bin + let result = Proc.Exec(startArgs) + if result > 0 then + failwithf "process returned %i: %s" result bin with | :? ProcExecException as ex -> failwithf "%s" ex.Message