Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: stable tag for docker images #11897

Closed
dschier-wtd opened this issue Jun 15, 2020 · 15 comments
Closed

Feature: stable tag for docker images #11897

dschier-wtd opened this issue Jun 15, 2020 · 15 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@dschier-wtd
Copy link

  • Gitea version (or commit ref):
  • Git version:
  • Operating system: containers / docker

Description

Hi everybody,

it would be awesome, to see a tag "stable" in the docker registry, pointing to the latest stable release. As a user, this may ensure using the stable version, which is easily identifiable. This tag can also be used for several documentation, currently using outdated version numbers or latest as reference.

Background

At the moment, the "latest" tag seems to point to the latest build, some release candidates are present, etc. As far as I can see, there is already a tag "1", pointing to the latest stable release, adding a tag "stable" should be easily doable.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jun 18, 2020
@pabloyoyoista
Copy link

I can add one more reason for the importance of the "stable" tag. Currently, according to the documentation: For a stable release you can use :1
However, tag :1 is published with every v.1.* release. This has lead to a regression between tags v1.11.7, v1.12.0 and v1.11.8. What has happened is the following:

  • Until 3 days ago, tag :1 was still referring to v1.11.7
  • 3 days ago, with the publication of v1.12.0, tag :1 became v1.12.0
  • Today tag v1.11.8 got published and therefore docker tag :1 has been updated to point to v1.11.8.

This behaviour is not ideal, but most importantly can lead to big issues for CI systems relying in tag :1 to be stable. If after updating gitea to v1.12.0, the CI catches the "new" :1 tag and gitea is "updated" from v1.12.0 to v1.11.8, it is expected that gitea will break due to new features and breaking changes introduced in v1.12.0

@lunny
Copy link
Member

lunny commented Jun 22, 2020

So we need a version comparable for :1 on drone configuration but not a new tag stable? Two tags will make people confusing.

@hweidner
Copy link

I personally would recommend to use the following tags:

  • latest for the latest stable version of Gitea, in a monotonic fashion (i.e. without downgrades)
  • dev or development for the latest commited version (what is currently "latest")
  • 1 for the latest stable version og Gitea 1.x, in a monotonic fashion. And later 2 when Gitea 2.x is released.

@sleeve
Copy link

sleeve commented Jun 22, 2020

I agree with @hweidner. That seems like a more standard docker tag naming convention.

@pabloyoyoista
Copy link

For me what is important is that the corresponding documented stable tag (as :1 is currently marked in the documentation) never jumps backwards as it happened yesterday. Any implemented solution should be fine

@lunny
Copy link
Member

lunny commented Jun 22, 2020

But as I know many fellows like to use latest to try the newest version of gitea but not dev. They don't use :1 which documented as a stable version.

@lunny
Copy link
Member

lunny commented Jun 22, 2020

Or we can follow the tags to keep compitable as before.

  • latest keep compitable as now to follow the master
  • stable point to 1 or 2 when gitea upgraded to 2.x
  • 1 gitea 1.x stable version.
  • 2 gitea 2.x stable version.

@dschier-wtd
Copy link
Author

For me, all of the suggested options would be fine. As long as I can point to a tag and will get the latest stable image for deployments in production environment :)

@lafriks
Copy link
Member

lafriks commented Jun 22, 2020

Stable seems redundant as I don't see 2 coming anytime soon and most probably it will be breaking enough to require changing label to :2 manually. We just need to figure way how to make drone not to override :1 tag when publishing minor release for previous major verion

@lunny
Copy link
Member

lunny commented Jun 23, 2020

@lafriks Yes, that's the first step we need to do. I think we have to contribute to https://github.com/drone-plugins/drone-docker or create a fork.

@Ryonez
Copy link

Ryonez commented Jun 24, 2020

Glad to see this. Just popped in because I found out about the new release, and remembered I hadn't yet looked into the footer saying it was version 1.13 dev.
Fixed that now.

@lunny
Copy link
Member

lunny commented Jun 24, 2020

see drone-plugins/drone-docker#287

@tboerger
Copy link
Member

IMHO :latest = master branch and :1 = latest stable for v1.x.x and :2 = latest stable for v2.x.x would be the best. Having a :stable which gets updated from v1.x.x to a breaking change v2.x.x (otherwise it wouldn't be a major version change) will lead to a lot trouble.

For the docker plugin you can just generate a .tags file within a step before the docker plugin which got a better logic to decide the tags that got to be pushed. The 1.11 release branch can just drop :1 from the tags file while 1.12 release branch can keep :1 until 1.13 gets released, or you could even query the releases API to check if there are more current minor versions.

@sleeve
Copy link

sleeve commented Jun 24, 2020

As a user that only wants a the most recent stable release. I should be able to just point to the stable docker image tag and automatically pickup the latest stable version. Whenever 2.0 is officially released the stable tag will point to it. I don't think a user should have to constantly investigate if it's "safe" or stable to update 1.x to 2.0. It should be up to the maintainers to determine that.

I understand the issue that @tboerger brings up, that there may be breaking changes migrating from 1.x to 2.0 but hopefully those issues would be thoroughly tested and mostly ironed out before 2.0 is marked stable.

@techknowlogick
Copy link
Member

:1 is our stable tag, however we've had a few releases of 1.11.x that happen at the same time as our 1.12.x releases, we've tried our hardest to ensure that they happen right before we make a tag for a newer version, however occasionally it doesn't always happen that we tag them in the correct order.

I'm going to keep this open as we can add some protections to our CI to prevent overwriting newer versions with older versions (using @tboerger suggestion), however adding a new specific "stable" tag is something that has been discussed previously and for various reasons decided against.

I will lock this to maintainers as there is much discussion on this, however changing how tag names would be a massive breaking change with little to no added benefit (especially since we already offer a tag for latest stable version).

@go-gitea go-gitea locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

9 participants