Docker master and latest version confusion

The docker image dgraph/dgraph:latest says

Dgraph version   : v20.07.2
Dgraph codename  : shuri-2
Dgraph SHA-256   : a927845127dab735c24727d5a24af411168771b55236aec50f0b987e8c0ac910
Commit SHA-1     : a7bc16d56
Commit timestamp : 2020-10-22 10:17:53 -0700
Branch           : HEAD
Go version       : go1.14.4

Which is what you would expect from latest.

However, the dgraph/dgraph:master image says:

Dgraph version   : v2.0.0-rc1-891-g2d993721
Dgraph codename  : unnamed
Dgraph SHA-256   : 8b1279c4a3dd66ccbc2e2ddb2ab2a95118c370f7bcbf871dab58b89523b8bf68
Commit SHA-1     : 2d993721
Commit timestamp : 2020-10-30 10:12:29 +0530
Branch           : master
Go version       : go1.14.4
jemalloc enabled : true

This v2.0.0 version is distracting. Shouldn’t it read v20.11.0-rc1?

Further, on Docker Hub it says:

Dgraph is at version 1.1.x and is production-ready.

Github README.md in master branch says:

Dgraph is at version 20.03.4 and is production ready.

I think the master README.md should be updated to 20.07.2, and the docker hub page needs to be synced with master README on every release. And the dgraph/dgraph:master version should be after 20.07.2.

2 Likes

it really seems like the dgraph team has a rather “special” interpretation of semver.
I have been both confused and frustrated several times in the last months.
Thanks for opening the thread!

@joaquin any thoughts on this?

I think if you use makefile instead of go build, the versioning should work fine. In this example Build Dgraph from the master I don’t have this behavior you have.

I am not building dgraph, I am talking about images and readme’s published by you guys that are out of sync.

Officially, We switched from semver to calver:

The development versions may have 2.0.x notation, and this should be fixed for released versions.

I just tried it now, so it looks like this got addressed.

docker run -t dgraph/dgraph:master dgraph version | awk -F: '/Dgraph version/{print $2}'
 v20.11.0-rc1-77-g32e48a40
docker run -t dgraph/dgraph:latest dgraph version | awk -F: '/Dgraph version/{print $2}'
 v20.07.2
docker run -t dgraph/dgraph:v20.11.0-rc2-5-g2188e742c dgraph version | awk -F: '/Dgraph version/{print $2}'
 v20.11.0-rc2-5-g2188e742c

When I run docker pull dgraph/dgraph:master, it pulls the latest master tag, which currently has Digest: sha256:ce7b357ccdc2, which is on par with hub.docker.com.

When I then run docker run --rm dgraph/dgraph:master dgraph version, it shows Dgraph version : v2.0.0-rc1-538-g43cce17f8:

$ docker run --rm -it dgraph/dgraph:master dgraph version
[Decoder]: Using assembly version of decoder

Dgraph version   : v2.0.0-rc1-538-g43cce17f8
Dgraph SHA-256   : 1c91014583a92edb9a683f58dd0991dfa5e305f2fe9ae8b68a1629264c62209d
Commit SHA-1     : 43cce17f8
Commit timestamp : 2020-07-21 09:59:14 +0530
Branch           : master
Go version       : go1.14.1

Inspecting the image shows it is quite old:

$ docker image inspect dgraph/dgraph:master
[
    {
        "Id": "sha256:03e1458c9a981c889d8a607942d711e44f976e361fdd9dc8000e5c8a411695bb",
        "RepoTags": [
            "dgraph/dgraph:master"
        ],
        "RepoDigests": [
            "dgraph/dgraph@sha256:ce7b357ccdc2ff5360500d084a4b4ddffe3ee488887764576e9f61371e4797f2"
        ],
...
        "Created": "2020-07-21T04:44:03.713228908Z",
...

What am I missing here?