fix: run post cleanup after failed jobs - #40
Merged
Merged
Conversation
Piotr1215
marked this pull request as ready for review
August 4, 2026 18:30
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.
Why
The action advertises its post step as exporting vind container logs and deleting the cluster, but
post-if: success()skips that step precisely when a later test fails. Failed E2E jobs therefore lose the diagnostic artifact and leave cleanup to runner destruction.This was found while dogfooding setup-vind for loft-router's Platform-through-router production canary.
What changed
always()so log export and deletion execute after successful, failed, or cancelled jobs.TDD evidence
Before the metadata change, the new test failed with:
After the change:
npm test -- --runInBand: 15 tests passed.npm run build: both checked-in action bundles rebuilt cleanly with no diff.git diff --check: clean.npm run lintis currently not runnable onmainbecause the declared script invokes ESLint but ESLint is absent frompackage.jsonand the lockfile. That pre-existing packaging issue is intentionally outside this focused lifecycle fix.Related: loft-sh/loft-router#23