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

Address action_mailbox bug report templates failures with Ruby3.1.0dev #43424

Merged
merged 1 commit into from Oct 11, 2021

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Oct 10, 2021

Summary

This commit addresses CI failure since https://buildkite.com/rails/rails/builds/81642#ee889e34-4f2f-4bb6-9204-9c9bd0d27fa8

net-smtp gem v0.2.2 released which adds dependency to digest gem which attempts to install digest 3.0.0.
However, Ruby 3.1.0dev requires digest gem 3.0.1, which causes this failure.

Refer
https://github.com/ruby/net-smtp/releases/tag/v0.2.2
ruby/net-smtp@b1adc9e

  • Steps to reproduce
$ cd guides/bug_report_templates
$ ruby action_mailbox_main.rb
  • Result without this commit
$ ruby -v
ruby 3.1.0dev (2021-10-10T15:24:09Z master 10c650628a) [x86_64-linux]
$ cd guides/bug_report_templates
$ ruby action_mailbox_main.rb
Fetching gem metadata from https://rubygems.org/......
Resolving dependencies...
Using rake 13.0.6
Using concurrent-ruby 1.1.9
Using minitest 5.14.4
Using builder 3.2.4
Using erubi 1.10.0
Using mini_mime 1.1.1
Using bundler 2.3.0.dev
Using rack 2.2.3
Using digest 3.0.0
Using io-wait 0.1.1
Using method_source 1.0.0
Using timeout 0.1.1
Using thor 1.1.0
Using zeitwerk 2.5.0.beta5
Using sqlite3 1.4.2
Using i18n 1.8.10
Using tzinfo 2.0.4
Using mail 2.7.1
Using marcel 1.0.2
Using rack-test 1.1.0
Using net-protocol 0.1.1
Using sprockets 4.0.2
Using activesupport 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using websocket-extensions 0.1.5
Using net-smtp 0.2.2
Using websocket-driver 0.7.5
Using crass 1.0.6
Using nio4r 2.5.8
Using racc 1.5.2
Using mini_portile2 2.6.1
Using nokogiri 1.12.5
Using loofah 2.12.0
Using rails-html-sanitizer 1.4.2
Using rails-dom-testing 2.0.3
Using globalid 0.5.2
Using actionview 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using activemodel 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actionpack 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using activejob 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actioncable 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actionmailer 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using sprockets-rails 3.2.2
Using activerecord 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using railties 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using activestorage 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actiontext 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actionmailbox 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using rails 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
/home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated digest 3.0.1.pre, but your Gemfile requires digest 3.0.0. Since digest is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports digest as a default gem. (Gem::LoadError)
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/runtime.rb:25:in `block in setup'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/spec_set.rb:136:in `each'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/spec_set.rb:136:in `each'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/runtime.rb:24:in `map'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/runtime.rb:24:in `setup'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/inline.rb:71:in `block in gemfile'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/settings.rb:131:in `temporary'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/inline.rb:55:in `gemfile'
	from action_mailbox_main.rb:5:in `<main>'
$

This commit addresses CI failure since https://buildkite.com/rails/rails/builds/81642#ee889e34-4f2f-4bb6-9204-9c9bd0d27fa8

`net-smtp` gem v0.2.2 released which adds dependency to digest gem  which attempts to install digest 3.0.0.
However, Ruby 3.1.0dev requires digest gem 3.0.1, which causes this failure.

Refer
https://github.com/ruby/net-smtp/releases/tag/v0.2.2
ruby/net-smtp@b1adc9e

- Steps to reproduce
```
$ cd guides/bug_report_templates
$ ruby action_mailbox_main.rb

- Result without this commit

```ruby
$ ruby -v
ruby 3.1.0dev (2021-10-10T15:24:09Z master 10c650628a) [x86_64-linux]
$ cd guides/bug_report_templates
$ ruby action_mailbox_main.rb
Fetching gem metadata from https://rubygems.org/......
Resolving dependencies...
Using rake 13.0.6
Using concurrent-ruby 1.1.9
Using minitest 5.14.4
Using builder 3.2.4
Using erubi 1.10.0
Using mini_mime 1.1.1
Using bundler 2.3.0.dev
Using rack 2.2.3
Using digest 3.0.0
Using io-wait 0.1.1
Using method_source 1.0.0
Using timeout 0.1.1
Using thor 1.1.0
Using zeitwerk 2.5.0.beta5
Using sqlite3 1.4.2
Using i18n 1.8.10
Using tzinfo 2.0.4
Using mail 2.7.1
Using marcel 1.0.2
Using rack-test 1.1.0
Using net-protocol 0.1.1
Using sprockets 4.0.2
Using activesupport 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using websocket-extensions 0.1.5
Using net-smtp 0.2.2
Using websocket-driver 0.7.5
Using crass 1.0.6
Using nio4r 2.5.8
Using racc 1.5.2
Using mini_portile2 2.6.1
Using nokogiri 1.12.5
Using loofah 2.12.0
Using rails-html-sanitizer 1.4.2
Using rails-dom-testing 2.0.3
Using globalid 0.5.2
Using actionview 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using activemodel 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actionpack 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using activejob 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actioncable 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actionmailer 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using sprockets-rails 3.2.2
Using activerecord 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using railties 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using activestorage 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actiontext 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using actionmailbox 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
Using rails 7.0.0.alpha2 from https://github.com/rails/rails.git (at /home/yahonda/src/github.com/rails/rails@5e1a039)
/home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/runtime.rb:309:in `check_for_activated_spec!': You have already activated digest 3.0.1.pre, but your Gemfile requires digest 3.0.0. Since digest is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports digest as a default gem. (Gem::LoadError)
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/runtime.rb:25:in `block in setup'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/spec_set.rb:136:in `each'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/spec_set.rb:136:in `each'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/runtime.rb:24:in `map'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/runtime.rb:24:in `setup'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/inline.rb:71:in `block in gemfile'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/settings.rb:131:in `temporary'
	from /home/yahonda/.rbenv/versions/3.1.0-dev/lib/ruby/3.1.0/bundler/inline.rb:55:in `gemfile'
	from action_mailbox_main.rb:5:in `<main>'
$
```
@rails-bot rails-bot bot added the docs label Oct 10, 2021
@yahonda
Copy link
Member Author

yahonda commented Oct 10, 2021

We can see the last successful build uses net-smtp 0.2.1 and the first failing build uses net-smtp 0.2.2.

Using net-smtp 0.2.1
Installing net-smtp 0.2.2

@kamipo kamipo merged commit bc590ff into rails:main Oct 11, 2021
yahonda added a commit to yahonda/rails that referenced this pull request Dec 26, 2021
No need to add digest gem explicitly anymore.

Refer:
https://www.ruby-lang.org/en/news/2021/12/25/ruby-3-1-0-released/

> Standard libraries updates
> The following default gem are updated.
> digest 3.1.0

This commit is kind of reverting these pull requests.

rails#42902
rails#43424
rails#43433
@yahonda yahonda deleted the net_smtp_requires_digest branch January 2, 2022 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants