fix: cleanup temp files to resolve Bug #1 and Bug #2#18
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 -fcleanup at start of each step using temp files.Will recreate tag v1.1.1 after merge to avoid changing caller workflows.