Upgrade failure: Docker Manager bug?

Is there a problem with 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>'

Am I missing anything or this a bug in docker_manager?

Could it be related to this commit?:

Specifically this change?:

&

Yet it is still referenced here?:

Thanks in advance!

1 Like

I had someone last night complain that a UX upgrade had crashed their site. I didn’t see the error. I’m pretty sure it was after the bump to the new base image, so this might explain their problem. It would seem like it would affect only those on beta, though?

1 Like

this was a tests_passed upgrade.

I’m fairly sure it’s a bug.

3 Likes

Indeed, it looks like I broke it and didn’t notice because all my repos had a main branch. :man_facepalming:
I’ll fix it soon.

2 Likes

Yeah, thanks! Looks like an edge case :slight_smile:

I’m tempted to move the branch now, but might help to test the resolution if I don’t :thinking:

That won’t fix it until docker_manager is fixed. Give me a couple of minutes to verify my solution and create a PR…

2 Likes

Thanks for reporting that regression. It’s fixed now.

6 Likes