Y a-t-il un problème avec 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>'
Est-ce que je manque quelque chose ou est-ce un bug dans docker_manager ?
Cela pourrait-il être lié à ce 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
Spécifiquement ce changement ? :
Et
Pourtant, il est toujours référencé ici ? :
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"
Merci d’avance !
1 « J'aime »
pfaffman
(Jay Pfaffman)
Avril 20, 2023, 2:44
2
Hier soir, quelqu’un s’est plaint qu’une mise à niveau de l’expérience utilisateur avait fait planter son site. Je n’ai pas vu l’erreur. Je suis à peu près sûr que c’était après le passage à la nouvelle image de base, donc cela pourrait expliquer leur problème. Cela ne devrait affecter que ceux qui sont sur la version bêta, cependant ?
1 « J'aime »
Ceci était une mise à niveau tests_passed.
Je suis presque sûr que c’est un bug.
3 « J'aime »
gerhard
(Gerhard Schlager)
Avril 20, 2023, 3:34
5
En effet, on dirait que je l’ai cassé et que je ne m’en suis pas rendu compte car tous mes dépôts avaient une branche main.
Je vais corriger ça bientôt.
2 « J'aime »
Ouais, merci ! On dirait un cas limite
Je suis tenté de déplacer la branche maintenant, mais cela pourrait aider à tester la résolution si je ne le fais pas
gerhard
(Gerhard Schlager)
Avril 20, 2023, 4:00
7
Cela ne résoudra pas le problème tant que docker_manager ne sera pas corrigé. Donnez-moi quelques minutes pour vérifier ma solution et créer une PR…
main ← fix-branch
opened 04:15PM - 20 Apr 23 UTC
See https://meta.discourse.org/t/upgrade-failure-docker-manager-bug/262404
2 « J'aime »
gerhard
(Gerhard Schlager)
Avril 20, 2023, 4:25
8
Merci d’avoir signalé cette régression. Elle est maintenant corrigée.
6 « J'aime »