Skip to content

Improve task failure output #97

@Radiergummi

Description

@Radiergummi

Sometimes when tasks fail, the error output generated is not particularly helpful:

Error: Error: Update of service "some-stack_some-service" failed: Service is paused: update paused due to failure or early termination of task uozt8s7vppwlafkzptho72ehy

This can happen for a variety of reasons, some of which can be discovered by running docker service ps some-service for example when the image tag can't be found or the health checks fail.

Relatedly, the action provides multiple error annotations (usually three):

  1. Deploy to Docker Swarm.
    Error: Update of service "some-stack_some-service" failed: Service is paused: update paused due to failure or early termination of task tmmdlj7es6w4uhot9vke0ie7x
  2. Deploy to Docker Swarm
    Service Details:
    {
      "ID": "qnbunfhupi15mmjug8k4yjctk",
      […long JSON output truncated…]
    }
  3. Deploy to Docker Swarm
    Error: Service "some-stack_some-service" failed to update: Update of service "some-stack_some-service" failed: Service is paused: update paused due to failure or early termination of task tmmdlj7es6w4uhot9vke0ie7x

We should add more robust error discovery here, to make sure the action provides actionable info on what went wrong, and isn't overly verbose with the annotations. In this case, the last annotation would be enough, with the service details being added to the summary as part of a detailed debug trace instead.

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions