Ho avuto alcuni problemi diversi mesi fa e alla fine ho dovuto tornare a 2.9.0.beta1 e semplicemente non ho potuto aggiornare oltre in quel momento.
A causa di varie circostanze attenuanti, ho dovuto abbandonare questo progetto per un po’ e solo ora sono in grado di tornarci. Ho scoperto che il problema principale era che il server del database PostgreSQL non era stato sufficientemente e correttamente aggiornato, questo è stato ora risolto e ora è in esecuzione su PostgresQL 14.x e Discourse è anche in esecuzione su questa versione del database.
Sfortunatamente, quando ho provato ad aggiornare di nuovo tramite la normale interfaccia utente di aggiornamento web, ha indicato che fatal: HEAD does not point to a branch (errore completo qui):
fatal: HEAD does not point to a branch
Docker Manager: FAILED TO UPGRADE
#<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:203:in `run'
...
Ho pensato che forse avrei potuto fare un /var/discourse/launcher rebuild app, ma non ha funzionato nemmeno e ha solo portato alla stessa versione che si avviava di nuovo, ma ho notato il seguente output:
$ ./launcher rebuild app
x86_64 arch detected.
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed
Please be patient
2.0.20220818-0047: Pulling from discourse/base
1efc276f4ff9: Pull complete
1b880e64942b: Pull complete
794f6dc9a2ff: Pull complete
Digest: sha256:7734701087766821ffb2ddcef423754798bd345c2ac0d550131c6e6905c268e8
Status: Downloaded newer image for discourse/base:2.0.20220818-0047
docker.io/discourse/base:2.0.20220818-0047
...
I, [2022-09-13T02:09:12.828649 #1] INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2022-09-13T02:09:12.829826 #1] INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2022-09-13T02:09:13.957219 #1] INFO -- :
I, [2022-09-13T02:09:13.958187 #1] INFO -- : > cd /var/www/discourse && git fetch --depth=1 origin tag v2.9.0.beta2 --no-tags
From https://github.com/discourse/discourse
* [new tag] v2.9.0.beta2 -> v2.9.0.beta2
I, [2022-09-13T02:09:18.214516 #1] INFO -- :
I, [2022-09-13T02:09:18.215535 #1] INFO -- : > cd /var/www/discourse && git checkout v2.9.0.beta2
Note: switching to 'v2.9.0.beta2'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 88a85843 FIX: Cooking custom emojis should not use a secure URL (#15929)
I, [2022-09-13T02:09:19.557296 #1] INFO -- :
...
Alla fine ho annullato queste modifiche ripristinando un backup e ho pensato che avrei dovuto chiedere un parere qui prima su come potrei e dovrei riconnettere correttamente Discourse a HEAD su main e ricominciare a costruire con l’ultima beta - e poi, dopo aver finalmente aggiornato tutto questo, vorrei bloccarlo su un aggiornamento di rilascio stabile in futuro. Avevo usato le beta per risolvere un problema che ho avuto quest’anno, ma questa è stata un’avventura sufficiente per me. ![]()