docker-compose-buildkite-plugin
docker-compose-buildkite-plugin copied to clipboard
Logs on failure do not have any content
From PR #26, the logs are getting tailed and then uploaded after the command/test fails. However the logs that are uploaded do not have any content (zero byte)
This is occurring on a AWS Elastic Environment.
This could be some kind of configuration issue. Not sure what else to add here, let me know need more info
Log generation:
EOF
--
| $ docker logs --timestamps --tail 500 /buildkited48fb259943147958a42a1b6a87f8dd8_dockerpostgres_1
| EOF
| EOF
| EOF
| $ docker logs --timestamps --tail 500 /buildkited48fb259943147958a42a1b6a87f8dd8_redis_1
| EOF
| EOF
Upload:
2017-10-25 01:02:56 INFO Found 2 files that match "docker-compose-logs/*.log"
--
| 2017-10-25 01:02:56 INFO Creating (0-2)/2 artifacts
| 2017-10-25 01:02:56 INFO Uploading artifact e3cd97fc-dc34-4ebc-b583-71e9dd1fac5c docker-compose-logs/buildkited48fb259943147958a42a1b6a87f8dd8_redis_1.log (0 bytes)
| 2017-10-25 01:02:56 INFO Uploading artifact c6c4738d-7230-4a34-a2da-cb02b517c6ed docker-compose-logs/buildkited48fb259943147958a42a1b6a87f8dd8_dockerpostgres_1.log (0 bytes)
Thanks for the report! We're also looking into this. Will keep you posted, I think we have all the info we need for the moment ☺️
I've been having this issue as well. Some of the docker logs are populated but many are not.
When running in a local environment and getting the same failures, the docker logs for the same container are populated, so it does not seem to be an issue with my docker compose set up.
I'm currently looking at adding a script in my pre-exit or post-command hooks that gets the docker logs for me, but I am unsure if this will work, or if it will if it is the right hook to use. Any update/advice would be great thanks
I strongly suspect that this is a race condition with docker's logs and stopped containers. At the minute we don't have any good solutions to this, but will keep looking.
Closing this since I believe this issue has been solved, specially as new options to upload logs have been added (like #210) and new ones are even being worked on (like #330)