Skip to content

Late ContainerFetchException on wrong image name #5190

Open

Description

@meistermeier

I composed a, at least for me, invalid image name neo4j:neo4j:4.4 and threw it into TC.
Obviously, the image could not be found and the error contained:

RemoteDockerImage(imageName=neo4j:neo4j, imagePullPolicy=DefaultPullPolicy())

Somewhere between the creation of the DockerImageName and the output of RemoteDockerImage's toString()(?) the last bit got missed. I assume it's this part:

} else if (remoteName.contains(":")) {
repository = remoteName.split(":")[0];
versioning = new TagVersioning(remoteName.split(":")[1]);
} else {

Would be helpful if the parsing in DockerImageName would be even more restrictive, if the name has an invalid pattern. (At least, I assume that this pattern is non-sense 😉 )

Somehow related to #4762

Activity

  1. kiview commented on Mar 31, 2022

    @kiview
    Member

    Trying to pull an image with such name using the Docker CLI leads to:

    docker pull neo4j:neo4j:4.4
    invalid reference format

    So it seems to be sensible to be more restrictive on the image name as well (would be good to find a real specification here). Besides, your observation about wrong image name in the ContainerFetchException is also correct, thanks!

  2. gesellix commented on Mar 31, 2022

    @gesellix
    Contributor

    A good reference is this one: https://github.com/distribution/distribution/blob/main/reference/reference.go

    The google/re2j regex matcher helped me adopting the reference parser for the JVM.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions