Skip to content

Issue with collecting docker compose logs output in post job cleanup #297

Description

@lilspikey

Description:

During the post job cleanup stage I sometimes see an error like:

  Post job cleanup.
  file:///home/runner/_work/_actions/hoverkraft-tech/compose-action/11beaa1c2dae4e8ed7b1665aa074723b6cecb0e4/dist/post.js:193
          result.out += chunk.toString();
                              ^
  
  RangeError: Invalid string length
      at Socket.<anonymous> (file:///home/runner/_work/_actions/hoverkraft-tech/compose-action/11beaa1c2dae4e8ed7b1665aa074723b6cecb0e4/dist/post.js:193:29)
      at Socket.emit (node:events:509:28)
      at addChunk (node:internal/streams/readable:563:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)
      at Readable.push (node:internal/streams/readable:394:5)
      at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)
  
  Node.js v24.18.0

I think this may happen when the output from docker compose logs is particularly large? (beyond 1-2GB)?

I think also those logs are not actually output by default?

Looks like the line mentioned is here https://github.com/hoverkraft-tech/compose-action/blob/v3.0.0/dist/post.js#L193

If it helps the containers being run were Elasticsearch and were hit by a lot of acceptance tests.

I guess having the ability to set -n/--tail on the command might help workaround this.

Action version: 3

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Repro steps:

Have docker compose logs produce a lot of logs

Expected behavior:

Post cleanup runs without errors docker compose down is run.

Actual behavior:

Post cleanup fails to run and docker compose down is not run.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions