C’è un problema con Docker Manager?
Docker Manager: FAILED TO UPGRADE
#<NoMethodError: undefined method `branch' for #<DockerManager::GitRepo:0x00007f1132b2ce20 @path="/var/www/discourse/plugins/discourse-onebox-assistant", @name="discourse-onebox-assistant", @memoize={"rev-parse HEAD"=>"0bf6e034f9a3ce0d23139417d05d2937132f2eaa", "symbolic-ref -q HEAD"=>"refs/heads/master", "for-each-ref --format='%(upstream:short)' refs/heads/master"=>"origin/master", "rev-parse --is-shallow-repository"=>"false", "show-branch remotes/origin/main"=>nil, "rev-parse origin/master^{}"=>"681fe5f804f444503c64a75e620b81f4f48dd1bf"}, @upgrade_key="upgrade:/var/www/discourse/plugins/discourse-onebox-assistant", @upgrade_version=nil>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:73:in `block in upgrade'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:71:in `each'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:71:in `each_with_index'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:71:in `upgrade'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:19:in `block in <main>'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `fork'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `<main>'
Mi manca qualcosa o si tratta di un bug in docker_manager?
Potrebbe essere correlato a questo commit?:
committed 05:17PM - 19 Apr 23 UTC
* FEATURE: Adds support for git tags
* Detects when the tracked branch has be… en deleted from `origin` and forces a rebuild on the command line
* Allows updating when a tag is tracked and the tag was moved to a new commit
* Improves support for shallow clones
* Works with partial clones
* Adds lots of specs for git commands and replaces the existing specs. All specs use real git repositories instead of mocks
Nello specifico questa modifica?:
e
Eppure è ancora referenziato qui?:
Process.kill("TSTP", unicorn_master_pid)
sleep 1
# older versions do not have support, so quickly send a cont so master process is not hung
Process.kill("CONT", unicorn_master_pid)
end
# HEAD@{upstream} is just a fancy way how to say origin/main (in normal case)
# see http://stackoverflow.com/a/12699604/84283
@repos.each_with_index do |repo, index|
# We automatically handle renames from `master` -> `main`
if repo.upstream_branch == "origin/master" && repo.branch == "origin/main"
log "Branch has changed to #{repo.branch}"
# Just in case `main` exists locally but is not used. Perhaps it was fetched?
if repo.has_local_main?
run "cd #{repo.path} && git checkout main"
else
run "cd #{repo.path} && git branch -m master main"
end
run "cd #{repo.path} && git fetch origin --tags --force"
Grazie in anticipo!
1 Mi Piace
pfaffman
(Jay Pfaffman)
20 Aprile 2023, 2:44pm
2
Ieri sera ho ricevuto una segnalazione da un utente secondo cui un aggiornamento dell’UX aveva causato il crash del suo sito. Non ho riscontrato l’errore. Sono abbastanza sicuro che sia avvenuto dopo il passaggio alla nuova immagine di base, il che potrebbe spiegare il loro problema. Sembrerebbe però che ciò possa influire solo su chi utilizza la versione beta?
1 Mi Piace
questo è stato un aggiornamento tests_passed.
Sono abbastanza sicuro che sia un bug.
3 Mi Piace
gerhard
(Gerhard Schlager)
20 Aprile 2023, 3:34pm
5
In effetti, sembra che l’abbia rotto e non me ne sia accorto perché tutte le mie repo avevano un branch main.
Lo sistemerò presto.
2 Mi Piace
Sì, grazie! Sembra un caso limite
Sono tentato di spostare il branch ora, ma potrebbe essere utile testare la risoluzione se non lo faccio
gerhard
(Gerhard Schlager)
20 Aprile 2023, 4:00pm
7
Ciò non lo risolverà finché docker_manager non sarà risolto. Dammi un paio di minuti per verificare la mia soluzione e creare una PR…
main ← fix-branch
opened 04:15PM - 20 Apr 23 UTC
See https://meta.discourse.org/t/upgrade-failure-docker-manager-bug/262404
2 Mi Piace
gerhard
(Gerhard Schlager)
20 Aprile 2023, 4:25pm
8
Grazie per aver segnalato quella regressione. È stata corretta ora.
6 Mi Piace