Skip to content

Commit

Permalink
rsc: Failing jobs shouldn't be cached (#1645)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-FEXrt authored Sep 6, 2024
1 parent a25a29d commit a2ad5bb
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 a2ad5bb

Please sign in to comment.