Skip to content
This repository was archived by the owner on Mar 21, 2022. It is now read-only.
This repository was archived by the owner on Mar 21, 2022. It is now read-only.

Add @Nullable to TaskStatus::containerStatus #1005

Closed
@man4j

Description

@man4j

I very often receive an exception at the very beginning of the Swarm Task launch:

 Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `com.spotify.docker.client.messages.swarm.TaskStatus`, problem: Null containerStatus
  at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 8864] (through reference chain: java.util.ArrayList[5]->com.spotify.docker.client.messages.swarm.Task["Status"])
 	at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)

 	... common frames omitted
 Caused by: java.lang.NullPointerException: Null containerStatus
 	at com.spotify.docker.client.messages.swarm.AutoValue_TaskStatus.(AutoValue_TaskStatus.java:38)
 	at com.spotify.docker.client.messages.swarm.TaskStatus.create(TaskStatus.java:75)
 	... common frames omitted

I think that when Swarm Task just started "ContainerStatus" is not present.
When the task started after a while, the exception disappears.

How to reproduce

Often poll task status:
GET unix://localhost:80/tasks?filters=%7B%22desired-state%22%3A%5B%22running%22%5D%7D

Software:

  • docker version:
    Client:
    Version: 18.03.0-ce
    API version: 1.37
    Go version: go1.9.4
    Git commit: 0520e24
    Built: Wed Mar 21 23:09:15 2018
    OS/Arch: linux/amd64
    Experimental: false
    Orchestrator: swarm
    Server:
    Engine:
    Version: 18.03.0-ce
    API version: 1.37 (minimum version 1.12)
    Go version: go1.9.4
    Git commit: 0520e24
    Built: Wed Mar 21 23:13:03 2018
    OS/Arch: linux/amd64
    Experimental: false

  • Spotify's docker-client version: 8.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions