fix: stream compose logs in post-job cleanup - #298
Conversation
6100198 to
6f7e04a
Compare
Super-linter summary
Super-linter detected linting errors For more information, see the GitHub Actions workflow run Powered by Super-linter BIOME_FORMATSPELL_CODESPELL |
6f7e04a to
05978b5
Compare
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #298 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 173 179 +6
Branches 37 38 +1
=========================================
+ Hits 173 179 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
05978b5 to
5e62815
Compare
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Co-authored-by: neilime <314088+neilime@users.noreply.github.com> Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
5e62815 to
6f330cd
Compare
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
Addressed in 6d8e925. The custom log-spawn path was removed in favor of |
| output: out, | ||
| }; | ||
| } catch (error) { | ||
| return { | ||
| error: this.getDockerComposeErrorMessage(error), | ||
| output: "", |
There was a problem hiding this comment.
IMO, returning output is useless now
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
neilime
left a comment
There was a problem hiding this comment.
@copilot handle code coverage miss issue: #298 (comment)
Co-authored-by: neilime <314088+neilime@users.noreply.github.com>
Addressed in 135b46f. I added coverage for the non-Error log collection failure path in |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Large
docker compose logsoutput could crash the post-job hook before cleanup completed because log collection buffered the full command output in memory. As a result,docker compose downcould be skipped when service logs were very large.Post-job log collection
docker-composepackagelogs()helper with a directdocker compose logsprocess spawn.post-runner, since logs are now emitted incrementally.Cleanup resilience
docker compose downeven when log collection exits non-zero, is terminated by signal, or cannot be spawned.Failure reporting