grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
24.02k stars 3.46k forks source link

drone: Do not push `latest` tag for older patch releases #10695

Open kavirajk opened 1 year ago

kavirajk commented 1 year ago

Describe the bug Currently every release pipeline (both stable and patch version) pushes latest tag docker images. This can cause issue and confusion.

e.g: Say we have latest release branch 2.9.x and we release patch release for older Loki 2.8.x. Now latest tag points to some 2.8.x version instead of 2.9.x.

pulling latest

docker pull grafana/loki                                                                                                                             ─╯
Using default tag: latest
latest: Pulling from grafana/loki
Digest: sha256:fc2462a2a0c18928e9ddd6070bdbed34a7172bffd2a6b8d1191d5a15c32f6dd7
Status: Image is up to date for grafana/loki:latest
docker.io/grafana/loki:latest

But it's older.

docker run --rm -it grafana/loki --version                                                                                                           ─╯
loki, version 2.8.5 (branch: HEAD, revision: 03cd6c82b)
  build user:       root@bdb1fa196fd7
  build date:       2023-09-14T17:17:19Z
  go version:       go1.20.7
  platform:         linux/amd64

To Reproduce You can look into any older Loki patch releases in Docker hub. https://hub.docker.com/r/grafana/loki/tags?page=1&name=latest

Expected behavior When tagging latest, tag only if it's from current latest release branch (e.g: in this case 2.9.x). For every other older branch releases, do not tag latest (e.g: in this case 2.8.x or older)

Environment:

Screenshots, Promtail config, or terminal output

litetex commented 4 months ago

Is there any progress on this?

I encountered the exact same problem (got 2.9.9 as latest from DockerHub but it should have been 3.1.0 -.- )