Ricostruzione fallita (stringa numero versione malformata)

Sto cercando di ricreare una vecchia installazione (3.1.0.beta5) per aggiornare un plugin senza aggiornare Discourse. In containers/app.yaml abbiamo version bloccato a un hash git specifico.

Questo ha funzionato per noi in passato, ma oggi la ricostruzione è fallita. L’errore nei log è:

ArgumentError: Malformed version number string < 3.3.0.beta1-dev

Ho trovato alcuni vecchi thread su questo che menzionano che una ricostruzione CLI dovrebbe risolvere eventuali problemi, ma ci ho provato alcune volte e non ha funzionato.

Qualche idea?

Ecco una parte dell’errore (più alcune righe sopra/sotto).

Bundle complete! 137 Gemfile dependencies, 173 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Bundled gems are installed into ./vendor/bundle

I, [2024-05-15T20:59:06.357437 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
rake aborted!
ArgumentError: Malformed version number string < 3.3.0.beta1-dev
/var/www/discourse/lib/version.rb:44:in `block in find_compatible_resource'
/var/www/discourse/lib/version.rb:44:in `each'
/var/www/discourse/lib/version.rb:44:in `sort_by'
/var/www/discourse/lib/version.rb:44:in `find_compatible_resource'
/var/www/discourse/lib/version.rb:79:in `find_compatible_git_resource'
/var/www/discourse/lib/tasks/plugin.rake:140:in `block in <main>'
/var/www/discourse/lib/tasks/plugin.rake:121:in `block (2 levels) in <main>'
/var/www/discourse/lib/tasks/plugin.rake:119:in `each'
/var/www/discourse/lib/tasks/plugin.rake:119:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => plugin:pull_compatible
(See full trace by running task with --trace)
I, [2024-05-15T20:59:08.586468 #1]  INFO -- :
I, [2024-05-15T20:59:08.586890 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2024-05-15T20:59:08.589266 #1]  INFO -- : > sleep 10
4224:C 15 May 2024 20:59:08.593 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
4224:C 15 May 2024 20:59:08.593 # Redis version=7.0.7, bits=64, commit=00000000, modified=0, pid=4224, just started
4224:C 15 May 2024 20:59:08.593 # Configuration loaded
4224:M 15 May 2024 20:59:08.594 * monotonic clock: POSIX clock_gettime
4224:M 15 May 2024 20:59:08.594 # Warning: Could not create server TCP listening socket *:6379: bind: Address already in use
4224:M 15 May 2024 20:59:08.594 # Failed listening on port 6379 (TCP), aborting.
I, [2024-05-15T20:59:18.592023 #1]  INFO -- :
I, [2024-05-15T20:59:18.592525 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
I, [2024-05-15T20:59:22.569878 #1]  INFO -- :
I, [2024-05-15T20:59:22.570279 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile:build'
rake aborted!
Don't know how to build task 'assets:precompile:build' (See the list of available tasks with `rake --tasks`)
Did you mean?  assets:precompile
               assets:precompile:css
               assets:precompile:before
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
(See full trace by running task with --trace)
I, [2024-05-15T20:59:23.600115 #1]  INFO -- :
I, [2024-05-15T20:59:23.600637 #1]  INFO -- : Terminating async processes
I, [2024-05-15T20:59:23.600673 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 35
2024-05-15 20:59:23.600 UTC [35] LOG:  received fast shutdown request
I, [2024-05-15T20:59:23.600751 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 97
97:signal-handler (1715806763) Received SIGTERM scheduling shutdown...
2024-05-15 20:59:23.605 UTC [35] LOG:  aborting any active transactions
2024-05-15 20:59:23.607 UTC [35] LOG:  background worker "logical replication launcher" (PID 50) exited with exit code 1
2024-05-15 20:59:23.609 UTC [45] LOG:  shutting down
2024-05-15 20:59:23.651 UTC [35] LOG:  database system is shut down
97:M 15 May 2024 20:59:23.666 # User requested shutdown...
97:M 15 May 2024 20:59:23.666 * Saving the final RDB snapshot before exiting.
97:M 15 May 2024 20:59:23.715 * DB saved on disk
97:M 15 May 2024 20:59:23.715 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile:build' failed with return #<Process::Status: pid 4246 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"build", "hook"=>"assets_precompile_build", "cmd"=>["su discourse -c 'bundle exec rake assets:precompile:build'"]}
bootstrap failed with exit code 1
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
d64132a4857117bb081fcc96afed62539cf84318342a258d42bf23b4736b0d9b

Ti consiglio di aggiornare le cose, ma non è quello che hai chiesto.

Hai anche bloccato discourse_docker alla stessa versione di un tempo? Penso che sia da lì che proviene l’errore.

Il modo migliore per farlo sarebbe prendere l’image (discourse/base:2.0.20230825-1850) dall’attuale launcher, e poi eseguire rebuild con --run-image=discourse/base:2.0.20230825-1850 come opzione? O c’è un modo diverso/migliore per bloccarci alla stessa versione di docker?

Cosa c’è che non va nell’aggiornare il plugin dall’aggiornamento online che può essere fatto in isolamento?

Non sono sicuro del perché non ci abbia provato prima. Grazie @merefield!