From 70a556a1528a30cee4bbf3b6765d280f7732a10e Mon Sep 17 00:00:00 2001 From: Maciej Bielecki Date: Tue, 22 Apr 2025 11:48:35 +0000 Subject: [PATCH 01/20] .gitignore aider files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0160d27..2d61791 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *~ .test-env ghtest-env +.aider* From da9c601d4284e92694c630483a0c4d9db6dab4fe Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 11:54:02 +0000 Subject: [PATCH 02/20] feat: add --cache-success flag and parsing logic to SnapshotCliArgs --- src/SnapshotCliArgs.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SnapshotCliArgs.hs b/src/SnapshotCliArgs.hs index 6cebe1b..4bbe577 100644 --- a/src/SnapshotCliArgs.hs +++ b/src/SnapshotCliArgs.hs @@ -14,6 +14,7 @@ data SnapshotCliArgs = SnapshotCliArgs , cacheRoot :: Maybe FilePath , cacheVersion :: Maybe Text , commitStatus :: Bool + , cacheSuccess :: Bool } deriving (Show) instance Default SnapshotCliArgs where @@ -28,6 +29,7 @@ instance Default SnapshotCliArgs where , cacheRoot = Nothing , cacheVersion = Nothing , commitStatus = False + , cacheSuccess = False } type ParseError = String @@ -79,7 +81,9 @@ parse input = map fst $ flip execStateT (def :: SnapshotCliArgs, BeforeOutputs) modifyArgs (\s -> s { commitStatus = True }) go xs - go (opt:_) | '-':_ <- opt = + go ("--cache-success":xs) = do + modifyArgs (\s -> s { cacheSuccess = True }) + go xs lift $ Left $ "Invalid option or missing argument: " <> opt go (path:xs) = do From 331ee947dd97d812d6f8293b0376b4ffdd35854d Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 11:54:54 +0000 Subject: [PATCH 03/20] refactor: generalize hasOutputs to hasCache for caching logic --- src/App.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.hs b/src/App.hs index d24e6f9..17107d1 100644 --- a/src/App.hs +++ b/src/App.hs @@ -197,7 +197,7 @@ main = do forM_ snapshotArgs.postUnpackCommands \cmd -> do runPostUnpackCmd appState cmd - when (hasOutputs snapshotArgs && settings.saveRemoteCache && (not skipped || appState.settings.primeCacheMode)) do + when (hasCache snapshotArgs && settings.saveRemoteCache && (not skipped || appState.settings.primeCacheMode)) do logDebug appState "Saving remote cache" s <- RemoteCache.getRemoteCacheSettingsFromEnv RemoteCache.saveCache appState s (fromMaybe settings.rootDirectory snapshotArgs.cacheRoot) snapshotArgs.outputs (archiveName appState snapshotArgs h.hash) @@ -397,8 +397,8 @@ commandHandler appState requestPipe responsePipe = hasInputs :: SnapshotCliArgs -> Bool hasInputs args = not (null args.fileInputs) || not (null args.rawInputs) -hasOutputs :: SnapshotCliArgs -> Bool -hasOutputs args = not (null args.outputs) +hasCache :: SnapshotCliArgs -> Bool +hasCache args = args.cacheSuccess || not (null args.outputs) snapshot :: AppState -> SnapshotCliArgs -> IO String snapshot appState args = do @@ -447,7 +447,7 @@ snapshot appState args = do earlyReturn (False, Nothing) - when (hasOutputs args && not force) do + when (hasCache args && not force) do s <- RemoteCache.getRemoteCacheSettingsFromEnv success <- liftIO $ RemoteCache.restoreCache appState s (fromMaybe appState.settings.rootDirectory args.cacheRoot) (archiveName appState args currentHash) RemoteCache.Log when success do From 6955da8d5d8cbac22e6e60de8c054d9f4a6ef017 Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 11:55:13 +0000 Subject: [PATCH 04/20] refactor: rename hasCache to hasRemoteCache and update usages --- src/App.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/App.hs b/src/App.hs index 17107d1..d09e0fd 100644 --- a/src/App.hs +++ b/src/App.hs @@ -197,7 +197,7 @@ main = do forM_ snapshotArgs.postUnpackCommands \cmd -> do runPostUnpackCmd appState cmd - when (hasCache snapshotArgs && settings.saveRemoteCache && (not skipped || appState.settings.primeCacheMode)) do + when (hasRemoteCache snapshotArgs && settings.saveRemoteCache && (not skipped || appState.settings.primeCacheMode)) do logDebug appState "Saving remote cache" s <- RemoteCache.getRemoteCacheSettingsFromEnv RemoteCache.saveCache appState s (fromMaybe settings.rootDirectory snapshotArgs.cacheRoot) snapshotArgs.outputs (archiveName appState snapshotArgs h.hash) @@ -397,8 +397,8 @@ commandHandler appState requestPipe responsePipe = hasInputs :: SnapshotCliArgs -> Bool hasInputs args = not (null args.fileInputs) || not (null args.rawInputs) -hasCache :: SnapshotCliArgs -> Bool -hasCache args = args.cacheSuccess || not (null args.outputs) +hasRemoteCache :: SnapshotCliArgs -> Bool +hasRemoteCache args = args.cacheSuccess || not (null args.outputs) snapshot :: AppState -> SnapshotCliArgs -> IO String snapshot appState args = do @@ -447,7 +447,7 @@ snapshot appState args = do earlyReturn (False, Nothing) - when (hasCache args && not force) do + when (hasRemoteCache args && not force) do s <- RemoteCache.getRemoteCacheSettingsFromEnv success <- liftIO $ RemoteCache.restoreCache appState s (fromMaybe appState.settings.rootDirectory args.cacheRoot) (archiveName appState args currentHash) RemoteCache.Log when success do From 7244a72046680f0b51695e4e723c9790152cd8ae Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 11:57:18 +0000 Subject: [PATCH 05/20] test: add test case for --cache-success flag in caching mechanism --- test/t/cache-success.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 test/t/cache-success.txt diff --git a/test/t/cache-success.txt b/test/t/cache-success.txt new file mode 100644 index 0000000..5fe0bc0 --- /dev/null +++ b/test/t/cache-success.txt @@ -0,0 +1,37 @@ +# no toplevel +# s3 + +export TASKRUNNER_SAVE_REMOTE_CACHE=1 + +mkdir a + +( + cd a + echo foo > input.txt + git init -q + git add input.txt +) + +cp -r a b + +go() { + # Note: we want separate workdir for separate repos + TASKRUNNER_STATE_DIRECTORY="$(pwd)" taskrunner -n mytask bash -e -c ' + snapshot input.txt --outputs output.txt --cache-success + echo "Expensive computation" + rev input.txt > output.txt + ' +} + +( + cd a + go + echo "Output in a is: $(cat output.txt)" +) + +( + cd b + echo bar > input.txt + go # note: should run "expensive computation" again + echo "Output in b is: $(cat output.txt)" +) From ac73143b8625552b9090ebfa121130dafa97f8c4 Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 11:57:55 +0000 Subject: [PATCH 06/20] test: Update cache-success test case to remove unnecessary --outputs option --- test/t/cache-success.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/t/cache-success.txt b/test/t/cache-success.txt index 5fe0bc0..0fe6bac 100644 --- a/test/t/cache-success.txt +++ b/test/t/cache-success.txt @@ -17,7 +17,7 @@ cp -r a b go() { # Note: we want separate workdir for separate repos TASKRUNNER_STATE_DIRECTORY="$(pwd)" taskrunner -n mytask bash -e -c ' - snapshot input.txt --outputs output.txt --cache-success + snapshot input.txt --cache-success echo "Expensive computation" rev input.txt > output.txt ' From fc50de15a70d6dd2a89df6b82faaa86348ddd7d6 Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 11:59:11 +0000 Subject: [PATCH 07/20] test: remove dependency on output.txt in cache success test case --- test/t/cache-success.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/t/cache-success.txt b/test/t/cache-success.txt index 0fe6bac..6616f0c 100644 --- a/test/t/cache-success.txt +++ b/test/t/cache-success.txt @@ -19,19 +19,19 @@ go() { TASKRUNNER_STATE_DIRECTORY="$(pwd)" taskrunner -n mytask bash -e -c ' snapshot input.txt --cache-success echo "Expensive computation" - rev input.txt > output.txt + rev input.txt > /dev/null ' } ( cd a go - echo "Output in a is: $(cat output.txt)" + echo "Output in a is: $(cat input.txt | rev)" ) ( cd b echo bar > input.txt go # note: should run "expensive computation" again - echo "Output in b is: $(cat output.txt)" + echo "Output in b is: $(cat input.txt | rev)" ) From c8e1b604d281395c793c5be310f95b54aae6793b Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 11:59:50 +0000 Subject: [PATCH 08/20] fix: remove undefined variable reference in error message --- src/SnapshotCliArgs.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SnapshotCliArgs.hs b/src/SnapshotCliArgs.hs index 4bbe577..361e625 100644 --- a/src/SnapshotCliArgs.hs +++ b/src/SnapshotCliArgs.hs @@ -84,7 +84,7 @@ parse input = map fst $ flip execStateT (def :: SnapshotCliArgs, BeforeOutputs) go ("--cache-success":xs) = do modifyArgs (\s -> s { cacheSuccess = True }) go xs - lift $ Left $ "Invalid option or missing argument: " <> opt + lift $ Left "Invalid option or missing argument" go (path:xs) = do (_, phase) <- get From e69339fafccbe2d5fb81cfce344f01c375d3265e Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 12:00:45 +0000 Subject: [PATCH 09/20] fix: replace hasOutputs with hasRemoteCache in App.hs --- src/App.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.hs b/src/App.hs index d09e0fd..825e48d 100644 --- a/src/App.hs +++ b/src/App.hs @@ -456,7 +456,7 @@ snapshot appState args = do logInfo appState "Inputs changed, running task" - when (not force && hasOutputs args && args.fuzzyCache && mainBranchCommitChanged savedHashInfo hashInfo) do + when (not force && hasRemoteCache args && args.fuzzyCache && mainBranchCommitChanged savedHashInfo hashInfo) do success <- tryRestoreFuzzyCache appState args when success do -- Save change in mainBranchCommit, even if the task didn't succeed yet. From 88a5812d9992868e34aab9bc4878f18a771a7323 Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 12:03:23 +0000 Subject: [PATCH 10/20] feat: create empty tar archive when no files are provided for caching --- src/RemoteCache.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RemoteCache.hs b/src/RemoteCache.hs index 516a572..481d9c7 100644 --- a/src/RemoteCache.hs +++ b/src/RemoteCache.hs @@ -40,7 +40,7 @@ import Amazonka.S3.PutObject (newPutObject, PutObject(..)) packTar :: MonadResource m => AppState -> FilePath -> [FilePath] -> ConduitT () BS.ByteString m () packTar appState workdir files = do let cmd = "tar" - let args = ["-c"] <> files + let args = if null files then ["-c", "--files-from=/dev/null"] else ["-c"] <> files liftIO $ logDebug appState $ "Running subprocess: " <> show (cmd:args) <> " in cwd " <> show workdir bracketP ( createProcess_ "createProcess_" (proc cmd args) From d977897c1152907f94b8cffb96decf5021fa7731 Mon Sep 17 00:00:00 2001 From: Maciej Bielecki Date: Tue, 22 Apr 2025 12:03:44 +0000 Subject: [PATCH 11/20] test: update cache-success test to include output verification --- test/t/cache-success.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/t/cache-success.txt b/test/t/cache-success.txt index 6616f0c..2a6149d 100644 --- a/test/t/cache-success.txt +++ b/test/t/cache-success.txt @@ -19,19 +19,17 @@ go() { TASKRUNNER_STATE_DIRECTORY="$(pwd)" taskrunner -n mytask bash -e -c ' snapshot input.txt --cache-success echo "Expensive computation" - rev input.txt > /dev/null + rev input.txt ' } ( cd a go - echo "Output in a is: $(cat input.txt | rev)" ) ( cd b echo bar > input.txt go # note: should run "expensive computation" again - echo "Output in b is: $(cat input.txt | rev)" ) From 03ed0cc2176cb548c7d4ee8ebd20a91a78d422a7 Mon Sep 17 00:00:00 2001 From: Maciej Bielecki Date: Tue, 22 Apr 2025 12:06:58 +0000 Subject: [PATCH 12/20] Fix haskell, test --- src/SnapshotCliArgs.hs | 4 +++- test/t/cache-success-changed.out | 9 +++++++++ test/t/{cache-success.txt => cache-success-changed.txt} | 0 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test/t/cache-success-changed.out rename test/t/{cache-success.txt => cache-success-changed.txt} (100%) diff --git a/src/SnapshotCliArgs.hs b/src/SnapshotCliArgs.hs index 361e625..764f977 100644 --- a/src/SnapshotCliArgs.hs +++ b/src/SnapshotCliArgs.hs @@ -84,7 +84,9 @@ parse input = map fst $ flip execStateT (def :: SnapshotCliArgs, BeforeOutputs) go ("--cache-success":xs) = do modifyArgs (\s -> s { cacheSuccess = True }) go xs - lift $ Left "Invalid option or missing argument" + + go (opt:_) | '-':_ <- opt = + lift $ Left $ "Invalid option or missing argument: " <> opt go (path:xs) = do (_, phase) <- get diff --git a/test/t/cache-success-changed.out b/test/t/cache-success-changed.out new file mode 100644 index 0000000..3706b76 --- /dev/null +++ b/test/t/cache-success-changed.out @@ -0,0 +1,9 @@ +-- output: +[mytask] info | Inputs changed, running task +[mytask] stdout | Expensive computation +[mytask] stdout | oof +[mytask] info | success +[mytask] info | Inputs changed, running task +[mytask] stdout | Expensive computation +[mytask] stdout | rab +[mytask] info | success diff --git a/test/t/cache-success.txt b/test/t/cache-success-changed.txt similarity index 100% rename from test/t/cache-success.txt rename to test/t/cache-success-changed.txt From 9fb3d2fc13c6417286eb0bd9e17508bab65b6dbc Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 12:10:03 +0000 Subject: [PATCH 13/20] test: add cache-success-unchanged test to verify unchanged input behavior --- test/t/cache-success-unchanged.out | 9 ++++++++ test/t/cache-success-unchanged.txt | 34 ++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 test/t/cache-success-unchanged.out create mode 100644 test/t/cache-success-unchanged.txt diff --git a/test/t/cache-success-unchanged.out b/test/t/cache-success-unchanged.out new file mode 100644 index 0000000..6635ad8 --- /dev/null +++ b/test/t/cache-success-unchanged.out @@ -0,0 +1,9 @@ +-- output: +[mytask] info | Inputs changed, running task +[mytask] stdout | Expensive computation +[mytask] stdout | oof +[mytask] info | success +[mytask] info | Found remote cache mytask-6b36308659163b577fd1c832107dc46ca3aa659b.tar.zst, restoring +[mytask] info | Restored from remote cache +[mytask] stdout | oof +[mytask] info | success diff --git a/test/t/cache-success-unchanged.txt b/test/t/cache-success-unchanged.txt new file mode 100644 index 0000000..2785686 --- /dev/null +++ b/test/t/cache-success-unchanged.txt @@ -0,0 +1,34 @@ +# no toplevel +# s3 + +export TASKRUNNER_SAVE_REMOTE_CACHE=1 + +mkdir a + +( + cd a + echo foo > input.txt + git init -q + git add input.txt +) + +cp -r a b + +go() { + # Note: we want separate workdir for separate repos + TASKRUNNER_STATE_DIRECTORY="$(pwd)" taskrunner -n mytask bash -e -c ' + snapshot input.txt --cache-success + echo "Expensive computation" + rev input.txt + ' +} + +( + cd a + go +) + +( + cd b + go # note: should not run "expensive computation" again +) From 8b77466b057b349e006342cb49b99c522b68b64f Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 12:10:20 +0000 Subject: [PATCH 14/20] fix: update expected output for cache-success-unchanged test case --- test/t/cache-success-unchanged.out | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/t/cache-success-unchanged.out b/test/t/cache-success-unchanged.out index 6635ad8..f44f0ff 100644 --- a/test/t/cache-success-unchanged.out +++ b/test/t/cache-success-unchanged.out @@ -5,5 +5,3 @@ [mytask] info | success [mytask] info | Found remote cache mytask-6b36308659163b577fd1c832107dc46ca3aa659b.tar.zst, restoring [mytask] info | Restored from remote cache -[mytask] stdout | oof -[mytask] info | success From 7ee79246982e8a7408f2139239add8c4d9e06715 Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 12:12:14 +0000 Subject: [PATCH 15/20] docs: document snapshot command flags in README including new flag --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index eaf562c..ce10af3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,16 @@ ## Features +## Snapshot Command Flags + +The `snapshot` command supports the following flags: + +- `--cache-success`: Caches the result of a successful command execution. If the inputs have not changed, the command is not rerun. +- `--outputs`: TODO +- `--inputs`: TODO +- `--cache-failure`: TODO +- `--cache-key`: TODO + - Runs tasks (which are defined as shell scripts) - Ensures only one instance of a task runs at a time (globally in the whole system) - using file-based locks - Tasks can run in parallel From 1a072478a46b79b3017b7d0a2d109b79e0d45d0d Mon Sep 17 00:00:00 2001 From: Maciej Bielecki Date: Tue, 22 Apr 2025 12:13:42 +0000 Subject: [PATCH 16/20] docs: update README with snapshot command flags section --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ce10af3..1ba661d 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,6 @@ ## Features -## Snapshot Command Flags - -The `snapshot` command supports the following flags: - -- `--cache-success`: Caches the result of a successful command execution. If the inputs have not changed, the command is not rerun. -- `--outputs`: TODO -- `--inputs`: TODO -- `--cache-failure`: TODO -- `--cache-key`: TODO - Runs tasks (which are defined as shell scripts) - Ensures only one instance of a task runs at a time (globally in the whole system) - using file-based locks @@ -138,3 +129,13 @@ To use it, first build using another system, and the run `taskrunner` with `TASK - Previous impl no-op tests/scripts/UPDATE: ~1.6s - Current impl no-op tests/scripts/UPDATE: ~2.3s + +## Snapshot Command Flags + +The `snapshot` command supports the following flags: + +- `--cache-success`: Caches the result of a successful command execution. If the inputs have not changed, the command is not rerun. +- `--outputs`: TODO +- `--inputs`: TODO +- `--cache-failure`: TODO +- `--cache-key`: TODO From b634725980172805110613dd8927d78a7ae2c691 Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 12:13:43 +0000 Subject: [PATCH 17/20] docs: update snapshot command flags section with actual flag descriptions --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ba661d..e6cda66 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,9 @@ To use it, first build using another system, and the run `taskrunner` with `TASK The `snapshot` command supports the following flags: - `--cache-success`: Caches the result of a successful command execution. If the inputs have not changed, the command is not rerun. -- `--outputs`: TODO -- `--inputs`: TODO -- `--cache-failure`: TODO -- `--cache-key`: TODO +- `--outputs`: Specifies the output files of the task. These files are used to determine if the task needs to be rerun. +- `--raw`: Specifies raw input strings that are used to compute the task's hash. +- `--fuzzy-cache`: Enables the use of a fuzzy cache, which attempts to restore from a cache of a similar task if the exact cache is not available. +- `--cache-root`: Specifies the root directory for caching. +- `--cache-version`: Specifies a version string for the cache, allowing differentiation between different cache versions. +- `--commit-status`: Enables reporting of the task's status to a commit status system, such as GitHub checks. From 12c8776706d36e007ec128b2955796cd4e67a204 Mon Sep 17 00:00:00 2001 From: Maciej Bielecki Date: Tue, 22 Apr 2025 12:16:09 +0000 Subject: [PATCH 18/20] Tweak command docs --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e6cda66..a87a6da 100644 --- a/README.md +++ b/README.md @@ -134,10 +134,10 @@ To use it, first build using another system, and the run `taskrunner` with `TASK The `snapshot` command supports the following flags: -- `--cache-success`: Caches the result of a successful command execution. If the inputs have not changed, the command is not rerun. - `--outputs`: Specifies the output files of the task. These files are used to determine if the task needs to be rerun. +- `--cache-success`: Use remote cache even when no outputs are specified. The task is not rerun if it succeeded previously with the same inputs. - `--raw`: Specifies raw input strings that are used to compute the task's hash. - `--fuzzy-cache`: Enables the use of a fuzzy cache, which attempts to restore from a cache of a similar task if the exact cache is not available. -- `--cache-root`: Specifies the root directory for caching. -- `--cache-version`: Specifies a version string for the cache, allowing differentiation between different cache versions. +- `--cache-root`: Specifies the root directory for caching. Use when caching things outside of the repository, e.g. `~/.stack`. +- `--cache-version`: Specifies a version string for the cache. `--fuzzy-cache` will not download cache from another version, allowing clean breaks when making big changes, e.g. upgrading a compiler. - `--commit-status`: Enables reporting of the task's status to a commit status system, such as GitHub checks. From 23c1cb6ba94e2ccb62270363e22badd4b928c78c Mon Sep 17 00:00:00 2001 From: "Maciej Bielecki (aider)" Date: Tue, 22 Apr 2025 12:19:12 +0000 Subject: [PATCH 19/20] docs: add documentation for --long-running flag in README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a87a6da..067a5c4 100644 --- a/README.md +++ b/README.md @@ -141,3 +141,4 @@ The `snapshot` command supports the following flags: - `--cache-root`: Specifies the root directory for caching. Use when caching things outside of the repository, e.g. `~/.stack`. - `--cache-version`: Specifies a version string for the cache. `--fuzzy-cache` will not download cache from another version, allowing clean breaks when making big changes, e.g. upgrading a compiler. - `--commit-status`: Enables reporting of the task's status to a commit status system, such as GitHub checks. +- `--long-running`: Indicates that the task is expected to run for a long time. This may affect how the task is managed or monitored. From e395dd0d29699974fe0ed5df2615c7cdd2cdbda5 Mon Sep 17 00:00:00 2001 From: Maciej Bielecki Date: Tue, 22 Apr 2025 12:19:47 +0000 Subject: [PATCH 20/20] Another tweak --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 067a5c4..31168f9 100644 --- a/README.md +++ b/README.md @@ -135,10 +135,10 @@ To use it, first build using another system, and the run `taskrunner` with `TASK The `snapshot` command supports the following flags: - `--outputs`: Specifies the output files of the task. These files are used to determine if the task needs to be rerun. -- `--cache-success`: Use remote cache even when no outputs are specified. The task is not rerun if it succeeded previously with the same inputs. +- `--cache-success`: Use remote cache even when no outputs are specified. The task is not rerun if it succeeded previously with the same inputs. Useful e.g. for test suites. - `--raw`: Specifies raw input strings that are used to compute the task's hash. - `--fuzzy-cache`: Enables the use of a fuzzy cache, which attempts to restore from a cache of a similar task if the exact cache is not available. - `--cache-root`: Specifies the root directory for caching. Use when caching things outside of the repository, e.g. `~/.stack`. - `--cache-version`: Specifies a version string for the cache. `--fuzzy-cache` will not download cache from another version, allowing clean breaks when making big changes, e.g. upgrading a compiler. - `--commit-status`: Enables reporting of the task's status to a commit status system, such as GitHub checks. -- `--long-running`: Indicates that the task is expected to run for a long time. This may affect how the task is managed or monitored. +- `--long-running`: Indicates that the task is expected to run for a long time (e.g. a server). Currently doens't have any effect though, TODO: can we remove it?