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

Add a missing base64 require #635

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Add a missing base64 require #635

merged 1 commit into from
Jan 9, 2024

Conversation

mdkent
Copy link
Member

@mdkent mdkent commented Jan 8, 2024

We observed this today during a routine bin/kamal envify -d staging:

Acquiring the deploy lock...
  ERROR (NameError): Exception while executing on host foo-staging-app-01: uninitialized constant Kamal::Commands::Lock::Base64
/Users/mkent/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kamal-1.3.0/lib/kamal/commands/lock.rb:26:in `write_lock_details'
/Users/mkent/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kamal-1.3.0/lib/kamal/commands/lock.rb:8:in `acquire'
/Users/mkent/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/kamal-1.3.0/lib/kamal/cli/base.rb:109:in `block (2 levels) in acquire_lock'
/Users/mkent/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sshkit-1.21.7/lib/sshkit/backends/abstract.rb:31:in `instance_exec'
/Users/mkent/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sshkit-1.21.7/lib/sshkit/backends/abstract.rb:31:in `run'
/Users/mkent/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sshkit-1.21.7/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'

I'm guessing one of the underlying gems we bundle installed stopped requiring base64, but I haven't tracked down which one.

While we're at it, this also prepares for the moving of base64 from default to a bundled gem in ruby 3.4 (see rails/rails#48907).

@mdkent
Copy link
Member Author

mdkent commented Jan 8, 2024

Oof, before merging this it looks like gemfiles/rails_edge.gemfile can't run with the older ruby version.

And #630 should be merged first as well.

/cc @djmb

@mdkent mdkent requested a review from djmb January 8, 2024 19:44
@mdkent
Copy link
Member Author

mdkent commented Jan 9, 2024

Aha, tracked this down. Looks like we used to get base64 via net-ssh, but they dropped it net-ssh/net-ssh@3120304

I can reproduce this issue on a fresh install of ruby.

Also, prepare for the moving of base64 from default to a bundled gem in ruby 3.4.
@mdkent mdkent force-pushed the missing-base64-require branch from 17f8b31 to c5ae54d Compare January 9, 2024 16:21
@djmb djmb merged commit acc6b9a into main Jan 9, 2024
7 checks passed
@djmb djmb deleted the missing-base64-require branch January 9, 2024 16:44
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

Successfully merging this pull request may close these issues.

2 participants