Change-Id: Ib25ce471afc473bc1bc1b90570d2dbd6d60bf9ce
Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
tomhjp/cigocacher-windows
Tom Proctor 2 weeks ago
parent 62256f908a
commit e2f0908f51
No known key found for this signature in database

@ -276,9 +276,11 @@ jobs:
- name: Tidy cache
working-directory: ${{ env.DEV_DRIVE_WORKSPACE }}/src
shell: bash
shell: pwsh
run: |
find ${{ env.DEV_DRIVE_WORKSPACE }}/cigocacher -type f -mmin +90 -delete
Get-ChildItem -Path "${{ env.DEV_DRIVE_WORKSPACE }}\cigocacher" -File -Recurse |
Where-Object { $_.LastAccessTime -lt (Get-Date).AddMinutes(-90) } |
Remove-Item -Force
win-tool-go:
# windows-8vpu is a 2022 GitHub-managed runner in our

@ -53,7 +53,7 @@ func (dc *DiskCache) Get(ctx context.Context, actionID string) (outputID, diskPa
dc.logf("disk miss: %v", actionID)
}
}
return "", "", err
return "", "", fmt.Errorf("failed to os.ReadFile in Get: %w", err)
}
var ie indexEntry
if err := json.Unmarshal(ij, &ie); err != nil {
@ -146,7 +146,7 @@ func (dc *DiskCache) Put(ctx context.Context, actionID, outputID string, size in
return "", err
}
if _, err := writeAtomic(actionFile, bytes.NewReader(ij)); err != nil {
return "", err
return "", fmt.Errorf("atomic write failed: %w", err)
}
return outputFile, nil
}

Loading…
Cancel
Save