Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback does not work: undefined method metadata #106

Open
webmatze opened this issue Aug 10, 2022 · 1 comment
Open

Rollback does not work: undefined method metadata #106

webmatze opened this issue Aug 10, 2022 · 1 comment

Comments

@webmatze
Copy link

webmatze commented Aug 10, 2022

Rollback does not work for me at the moment.

bundle exec kuby -e production rollback

Results in:

error: undefined method `metadata' for #<Kuby::Docker::Spec:0x00007fe87030b168>
bundler: failed to load command: kuby (/Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/bin/kuby)
Traceback (most recent call last):
	25: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/bin/bundle:23:in `<main>'
	24: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/bin/bundle:23:in `load'
	23: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/exe/bundle:36:in `<top (required)>'
	22: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	21: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/exe/bundle:48:in `block in <top (required)>'
	20: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
	19: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	18: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
	17: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	16: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	15: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	14: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
	13: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
	12: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:58:in `kernel_load'
	11: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:58:in `load'
	10: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/bin/kuby:23:in `<top (required)>'
	 9: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/bin/kuby:23:in `load'
	 8: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/kuby-core-0.18.0/bin/kuby:6:in `<top (required)>'
	 7: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/kuby-core-0.18.0/lib/kuby/commands.rb:35:in `run'
	 6: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/gli-2.21.0/lib/gli/app_support.rb:85:in `run'
	 5: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/gli-2.21.0/lib/gli/app_support.rb:311:in `call_command'
	 4: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/gli-2.21.0/lib/gli/app_support.rb:298:in `block in call_command'
	 3: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/gli-2.21.0/lib/gli/command_support.rb:131:in `execute'
	 2: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/kuby-core-0.18.0/lib/kuby/commands.rb:187:in `block (2 levels) in <class:Commands>'
	 1: from /Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/kuby-core-0.18.0/lib/kuby/tasks.rb:144:in `rollback'
/Users/mathiaskarstaedt/.asdf/installs/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/kuby-core-0.18.0/lib/kuby/kubernetes/spec.rb:184:in `rollback': undefined method `metadata' for #<Kuby::Docker::Spec:0x00007fe87030b168> (NoMethodError)

It looks like instead of docker.metadata.previous_tag it should be docker.image.previous_version or something different (/lib/kubernetes/spec.rb:183)?

If you want I can try to provide a PR with a fix.

@camertron
Copy link
Member

Woops! Yes, a PR would be greatly appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants