Upgrade from 2.8.0.beta1 -> beta4 fails on DB migrate?

Hey,

I am running a launcher rebuild to upgrade from 2.8.0.beta1 β†’ beta4.

I disabled all unofficial plugins, but it seems our bug is within the core.

app.yaml for a simple single container build:

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  - "templates/cloudflare.template.yml"

Build log:


I, [2021-08-04T16:28:25.000925 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
NOTE: nokogumbo: Using Nokogiri::HTML5 provided by Nokogiri. See https://github.com/sparklemotion/nokogiri/issues/2205 for more information.
rake aborted!
NoMethodError: undefined method `client_setting' for #<Class:0x0000560ce241d530>
Did you mean?  client_settings
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/application.rb:360:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/application.rb:526:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment

Looks like a DB migration again?

(See full trace by running task with --trace)
I, [2021-08-04T16:28:27.237146 #1]  INFO -- : 
I, [2021-08-04T16:28:27.237451 #1]  INFO -- : Terminating async processes
I, [2021-08-04T16:28:27.237485 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 57
I, [2021-08-04T16:28:27.237508 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 174
2021-08-04 16:28:27.237 UTC [57] LOG:  received fast shutdown request
174:signal-handler (1628094507) Received SIGTERM scheduling shutdown...
2021-08-04 16:28:27.238 UTC [57] LOG:  aborting any active transactions
2021-08-04 16:28:27.240 UTC [57] LOG:  background worker "logical replication launcher" (PID 66) exited with exit code 1
2021-08-04 16:28:27.241 UTC [61] LOG:  shutting down
174:M 04 Aug 2021 16:28:27.263 # User requested shutdown...
174:M 04 Aug 2021 16:28:27.263 * Saving the final RDB snapshot before exiting.
174:M 04 Aug 2021 16:28:27.306 * DB saved on disk
174:M 04 Aug 2021 16:28:27.306 # Redis is now ready to exit, bye bye...
2021-08-04 16:28:27.311 UTC [57] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 3928 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
094fab4de06ec9e94ef5e3be53e68870df6add7eb7991dfe037198cf52de764f
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Discourse doc days we are good. But cannot build.

Happy for any help!

Best,
Marius

1 Like

Can you paste a few extra lines before that backtrace?

1 Like

Sure.

1:  rails_multisite (3.0.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rails_multisite-3.0.0.gemspec
Using discourse-ember-rails 0.18.6
1:  discourse-ember-rails (0.18.6) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/discourse-ember-rails-0.18.6.gemspec
3:  nio4r (2.5.8) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/nio4r-2.5.8.gemspec
Fetching puma 5.4.0
Installing puma 5.4.0 with native extensions
Building native extensions. This could take a while...
1:  puma (5.4.0) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/puma-5.4.0.gemspec
0:  oj (3.12.3) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/oj-3.12.3.gemspec
2:  ffi (1.15.3) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/ffi-1.15.3.gemspec
Using mini_suffix 0.3.2
3:  mini_suffix (0.3.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/mini_suffix-0.3.2.gemspec
Using rbtrace 0.4.14
3:  rbtrace (0.4.14) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/rbtrace-0.4.14.gemspec
Using sassc 2.0.1
3:  sassc (2.0.1) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/sassc-2.0.1.gemspec
Using sassc-rails 2.1.2
2:  sassc-rails (2.1.2) from /var/www/discourse/vendor/bundle/ruby/2.7.0/specifications/sassc-rails-2.1.2.gemspec
Bundle complete! 126 Gemfile dependencies, 172 gems now installed.
Gems in the groups 'test' and 'development' were not installed.
Bundled gems are installed into `./vendor/bundle`
Post-install message from rubyzip:
RubyZip 3.0 is coming!
**********************

The public API of some Rubyzip classes has been modernized to use named
parameters for optional arguments. Please check your usage of the
following classes:
  * `Zip::File`
  * `Zip::Entry`
  * `Zip::InputStream`
  * `Zip::OutputStream`

Please ensure that your Gemfiles and .gemspecs are suitably restrictive
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
See https://github.com/rubyzip/rubyzip for details. The Changelog also
lists other enhancements and bugfixes that have been implemented since
version 2.3.0.

I, [2021-08-04T17:23:05.372537 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake plugin:pull_compatible_all'
NOTE: nokogumbo: Using Nokogiri::HTML5 provided by Nokogiri. See https://github.com/sparklemotion/nokogiri/issues/2205 for more information.


I, [2021-08-04T17:23:07.700176 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
NOTE: nokogumbo: Using Nokogiri::HTML5 provided by Nokogiri. See https://github.com/sparklemotion/nokogiri/issues/2205 for more information.
rake aborted!
NoMethodError: undefined method `client_setting' for #<Class:0x000055fa73b18780>
Did you mean?  client_settings
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.3.2/lib/active_record/dynamic_matchers.rb:22:in `method_missing'
/var/www/discourse/plugins/discourse-tagging/plugin.rb:13:in `block in activate!'
/var/www/discourse/lib/plugin/instance.rb:447:in `block in notify_after_initialize'
/var/www/discourse/lib/plugin/instance.rb:445:in `each'
/var/www/discourse/lib/plugin/instance.rb:445:in `notify_after_initialize'
/var/www/discourse/config/application.rb:351:in `each'
/var/www/discourse/config/application.rb:351:in `block (2 levels) in <class:Application>'
/var/www/discourse/lib/plugin_initialization_guard.rb:5:in `plugin_initialization_guard'
/var/www/discourse/config/application.rb:350:in `block in <class:Application>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:51:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/application/finisher.rb:140:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/application.rb:384:in `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/railtie.rb:207:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/railtie.rb:207:in `method_missing'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.7.7/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:299:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/dependencies.rb:332:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/application.rb:360:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.3.2/lib/rails/application.rb:526:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)
I, [2021-08-04T17:23:11.177809 #1]  INFO -- : 
I, [2021-08-04T17:23:11.178039 #1]  INFO -- : Terminating async processes
I, [2021-08-04T17:23:11.178063 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 55
I, [2021-08-04T17:23:11.178098 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 172
172:signal-handler (1628097791) Received SIGTERM scheduling shutdown...
2021-08-04 17:23:11.178 UTC [55] LOG:  received fast shutdown request
2021-08-04 17:23:11.179 UTC [55] LOG:  aborting any active transactions
2021-08-04 17:23:11.180 UTC [55] LOG:  background worker "logical replication launcher" (PID 64) exited with exit code 1
2021-08-04 17:23:11.181 UTC [59] LOG:  shutting down
2021-08-04 17:23:11.251 UTC [55] LOG:  database system is shut down
172:M 04 Aug 2021 17:23:11.264 # User requested shutdown...
172:M 04 Aug 2021 17:23:11.264 * Saving the final RDB snapshot before exiting.
172:M 04 Aug 2021 17:23:11.300 * DB saved on disk
172:M 04 Aug 2021 17:23:11.300 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 4010 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
9a5092784c9c0a57bcd02f5750638b9f565840ca4c6afa3346860ff01ac3ab5d
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
1 Like

This plugin was deprecated in 2016 :scream:. Please remove it from the app.yml and rebuild.

3 Likes

Ohhh :innocent:

Problem solved. That was in the β€œdon’t touch” section :slight_smile:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.