Skip to content

Conversation

@dcolina
Copy link
Member

@dcolina dcolina commented Dec 16, 2025

Bug Fixes: Temp File Cleanup (Bug #1 and Bug #2)

Fixes critical bugs by adding explicit cleanup of temp files at the start of each job.

Root Cause: /tmp directory persists between jobs in GitHub Actions.

Bugs Fixed:

Solution: Add rm -f cleanup at start of each step using temp files.


Will recreate tag v1.1.1 after merge to avoid changing caller workflows.

Root cause: /tmp directory is NOT cleaned between jobs in GitHub Actions,
causing temp files to persist and contaminate subsequent workflow runs.

This caused two critical bugs:
- Bug #1: /tmp/validation_failed.txt persisted from previous runs, causing
  valid PRs to fail with exit code 1
- Bug #2: /tmp/new_images.txt and /tmp/old_images.txt accumulated data
  from multiple test PRs, causing wrong images to be processed

Solution: Add explicit cleanup at the start of each step that uses temp files.

Changes:
1. validate-changed-files: Clean /tmp/disallowed_files.txt
2. validate-image-only-changed: Clean /tmp/validation_failed.txt,
   /tmp/new_images.txt, /tmp/old_images.txt
3. validate-images: Clean /tmp/validation_failed.txt

Fixes: Bug #1 - Exit code 1 on successful validations
Fixes: Bug #2 - Wrong image processed (Test Case #6)
Related: Test Cases #1, #2, #6
@dcolina dcolina requested review from a team as code owners December 16, 2025 13:19
@dcolina dcolina merged commit 4def28a into main Dec 16, 2025
3 checks passed
@dcolina dcolina deleted the fix/cleanup-temp-files-bug1-bug2 branch December 16, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant