2
0

fix: isolate golangci-lint cache per job to prevent parallel conflicts
Some checks failed
CI / build-and-test (push) Has been cancelled
Release / build (amd64, darwin) (push) Successful in 56s
Release / build (amd64, linux) (push) Successful in 1m0s
Release / build (amd64, windows) (push) Successful in 1m9s
Release / build (arm64, linux) (push) Successful in 38s
Release / build (arm64, darwin) (push) Successful in 55s
Release / release (push) Successful in 27s

Add GOLANGCI_LINT_CACHE and XDG_CACHE_HOME environment variables
pointing to job-specific cache directory to prevent parallel job
conflicts when running golangci-lint.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
GitCaddy
2026-01-12 00:47:11 +00:00
parent 68ec7efde0
commit a792b47b41

View File

@@ -42,7 +42,6 @@ type Runner struct {
runningTasks sync.Map
}
// getJobCacheDir returns a job-isolated cache directory
func (r *Runner) getJobCacheDir(taskID int64) string {
return filepath.Join(r.cfg.Host.WorkdirParent, "jobs", fmt.Sprintf("%d", taskID))
@@ -65,7 +64,7 @@ func (r *Runner) CleanStaleJobCaches(maxAge time.Duration) {
if err != nil {
return // directory may not exist yet
}
cutoff := time.Now().Add(-maxAge)
for _, entry := range entries {
if !entry.IsDir() {