Skip to content

Commit

Permalink
rsc: Failing jobs shouldn't be cached
Browse files Browse the repository at this point in the history
  • Loading branch information
V-FEXrt committed Sep 6, 2024
1 parent a25a29d commit 964ef1c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions share/wake/lib/system/remote_cache_runner.wake
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export def mkRemoteCacheRunner (rscApi: RemoteCacheApi) (hashFn: Result RunnerIn
# Run the job to get the results
require Pass output = baseDoIt job (Pass input)

# Don't cache failing jobs
require True = output.getRunnerOutputUsage.getUsageStatus == 0
else Pass output

# If pushing to the cache is not enabled don't bother
require True = rscApi.getRemoteCacheApiCanPush
else Pass output
Expand Down

0 comments on commit 964ef1c

Please sign in to comment.