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

Forgejo 'latest' is not a reliable release version #138

Open
adrinux opened this issue Dec 15, 2023 · 1 comment
Open

Forgejo 'latest' is not a reliable release version #138

adrinux opened this issue Dec 15, 2023 · 1 comment

Comments

@adrinux
Copy link
Contributor

adrinux commented Dec 15, 2023

At this point Forgejo are maintaining two releases, a stable version v1.21.2-1 and an old-stable v1.20.6-1, the code in this role to check the Codeberg API:

https://codeberg.org/api/v1/repos/forgejo/forgejo/releases?limit=1

Fetches whatever was released latest and the v1.20.6-1 release came after v1.21.2-1

In my case I had GITEA_VERSION set to 'latest' and ansible_role_gitea installed v1.20.6-1 on my existing v1.21.1-0 instance -- Forgejo refused to migrate the newer version of the database and the instance wouldn't restart.

The workaround/fix is simple, just specify the released version in GITEA_VERSION instead of 'latest' and rerun the role.

Earl Warren's replies to my comment imply that there isn't really a better way to get the correct 'latest' except something hairy like looping over the latest releases.

I'm not sure what the fix is. Possibly just a documentation change to recommend setting a release version of Forgejo instead of leaving GITEA_VERSION at its default of 'latest'?

@DO1JLR
Copy link
Member

DO1JLR commented Dec 15, 2023

Well, yes, we could add more logic to the detection what the latest release is by increasing the limit and comparing the tag_name or something like that... But as you mentioned, it is not that smooth.

Maybe we could add some more state handling and if the new forgjo release has a lower version than the newer one, it won't run or something like that...

I am not sure if I find the time to try any of the ideas this year.
But I am happy to review a pull-request that will implement something like that or improves the README.

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

No branches or pull requests

2 participants