usememos / memos

An open source, lightweight note-taking service. Easily capture and share your great thoughts.
https://usememos.com
MIT License
30.31k stars 2.27k forks source link

Premature Pushing of Stable Docker Tags #3645

Closed gabe565 closed 2 months ago

gabe565 commented 2 months ago

Describe the bug

I host all of my infrastructure in a GitOps repository which uses Renovate to automate Docker image updates. I've noticed Memos that frequently triggers update PRs before releases are officially available. For instance, I've had a PR updating to Memos v0.22.3 since 2024-06-21, even though v0.22.2 is the latest release. It appears that the release/0.22.3 branch is being pushed, which is causing this issue.

I would expect stable Docker tags to only be created when a new release is officially available. Pushing release tags early can cause confusion and potentially unstable updates in automated systems, as users may receive updates that are not officially released.

Steps to reproduce

Any hosting strategy that automates updates will have this issue. Renovate makes it obvious in my case, but there are other times this could happen more silently. For example, if a user uses Watchtower, they will receive the update much earlier than they should without warning.

The version of Memos you're using

v0.22.2

Screenshots or additional context

Here is a screenshot of the latest package tags:

image

I would expect latest to match stable and 0.22.2, while 0.22.3 should not exist or should have a suffix indicating it is not yet stable.

johnnyjoygh commented 2 months ago

Or maybe you should use stable tag instead of latest?

gabe565 commented 2 months ago

I don't use latest, that was just an example for people that use Watchtower. While I agree that they should use stable, I suspect a lot of people use latest.

I always pin to the latest release, and the reason I've noticed this happens is because I get a PR that a new version is available (in this case v0.22.3) when that version is not really available yet.

nikdoof commented 2 months ago

Looks like its due to the GitHub workflow building off the branch rather than the tags. A release/0.22.3 branch exists, but the tag doesn't as its obviously not released yet.

https://github.com/usememos/memos/blob/7c9f967a07cd331b1c5df1c0ee1cdb991164935d/.github/workflows/build-and-push-release-image.yml#L7

It would be a simple change to the GitHub workflow, but it all really depends on the dev's workflow for releases.

nikdoof commented 2 months ago

Just happened again, 0.22.4 got pushed for the version number change in master