Error fixed with this PR
To make this post more readable, I'm shift the complete logs to comment section.
Recently, I'm facing this error quite frequently and I was not able to decipher it :p Any leads or suggestions would be great.
Update
Initially, I thought this was an error linked to Heroku or Dokku, but with this post and it's comments it was clear that, even the Fedora CoreOS
and docker
based Forem installation processes are also facing the same issue.
So, I raised a new issue in the Forem repository.
Upon the request in Github, there was a new PR on this issue, so for more updates you can view this PR.
In a fresh installation.
Here fresh installation indicates that deploying a new Forem instance with the latest repo.
Using release configuration from last framework (Ruby).
-----> Discovering process types
Procfile declares types -> release, sidekiq_worker, web
-----> Releasing leewardslope...
-----> Checking for predeploy task
No predeploy task found, skipping
-----> Checking for release task
-----> Executing release task from Procfile: ./release-tasks.sh
=====> Start of leewardslope release task (00a819ffb) output
+ [[ '' = \b\l\o\c\k\e\d ]]
+ STATEMENT_TIMEOUT=4500000
+ bundle exec rails app_initializer:setup
== Preparing database ==
== 20200731033002 DropUserOptionalFields: migrating ===========================
[strong_migrations] DANGER: No lock timeout set
-- drop_table(:user_optional_fields)
-> 0.0037s
-- index_exists?(:user_optional_fields, [:label, :user_id], {:unique=>true})
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
wrong number of arguments (given 3, expected 2)
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:99:in `index_exists?'
----- Skipping => Entire log can be seen in comments -------
/app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
Caused by:
ArgumentError: wrong number of arguments (given 3, expected 2)
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:99:in `index_exists?'
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-_bootsnap_lfi'
----- Skipping => Entire log can be seen in comments -------
Tasks: TOP => db:prepare
(See full trace by running task with --trace)
++ notify
+++ caller
++ FAILED_COMMAND='18 ./release-tasks.sh: STATEMENT_TIMEOUT=4500000 bundle exec rails app_initializer:setup'
++ bundle exec rails runner ReleasePhaseNotifier.ping_slack
/app/app/services/edge_cache/bust/nginx.rb:44: warning: already initialized constant Net::HTTP::Purge::METHOD
/app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:166: warning: previous definition of METHOD was here
/app/app/services/edge_cache/bust/nginx.rb:45: warning: already initialized constant Net::HTTP::Purge::REQUEST_HAS_BODY
/app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:167: warning: previous definition of REQUEST_HAS_BODY was here
/app/app/services/edge_cache/bust/nginx.rb:46: warning: already initialized constant Net::HTTP::Purge::RESPONSE_HAS_BODY
/app/vendor/bundle/ruby/3.0.0/gems/fastly-3.0.2/lib/fastly/client.rb:168: warning: previous definition of RESPONSE_HAS_BODY was here
=====> End of leewardslope release task (00a819ffb) output
! Execution of release task failed: ./release-tasks.sh
2021/09/03 04:42:55 exit status 1
! exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
2021/09/03 04:42:55 exit status 1
! exit status 1
Building the above Forem instance with old-repo
Here, I used a old-repo where the ruby version was 2.7.2
To, keep it more simple => I used the same hardware, env variables but changed the Forem repository to an older version.
It didn't exited with status 1, but have a working Forem.
-----> Releasing leewardslope...
-----> Checking for predeploy task
No predeploy task found, skipping
-----> Checking for release task
-----> Executing release task from Procfile: ./release-tasks.sh
=====> Start of leewardslope release task (69c4b09c5) output
+ [[ '' = \b\l\o\c\k\e\d ]]
+ STATEMENT_TIMEOUT=4500000
+ bundle exec rails app_initializer:setup
== Preparing database ==
== Performing setup tasks ==
== Updating Data ==
== Bust Caches ==
+ bundle exec rake fastly:update_configs
+ bundle exec rails runner 'puts '\''app load success'\'''
/app/app/services/edge_cache/bust/nginx.rb:44: warning: already initialized constant Net::HTTP::Purge::METHOD
/app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:166: warning: previous definition of METHOD was here
/app/app/services/edge_cache/bust/nginx.rb:45: warning: already initialized constant Net::HTTP::Purge::REQUEST_HAS_BODY
/app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:167: warning: previous definition of REQUEST_HAS_BODY was here
/app/app/services/edge_cache/bust/nginx.rb:46: warning: already initialized constant Net::HTTP::Purge::RESPONSE_HAS_BODY
/app/vendor/bundle/ruby/2.7.0/gems/fastly-3.0.2/lib/fastly/client.rb:168: warning: previous definition of RESPONSE_HAS_BODY was here
app load success
=====> End of leewardslope release task (69c4b09c5) output
-----> App Procfile file found
=====> Processing deployment checks
No CHECKS file found. Simple container checks will be performed.
----- Skipping => Entire log can be seen in comments -------
-----> Running post-deploy
-----> Configuring test.leewardslope.com...(using built-in template)
-----> Creating https nginx.conf
Enabling HSTS
Reloading nginx
-----> Renaming containers
Found previous container(s) (b69dd1fc5aeb) named leewardslope.sidekiq_worker.1
Renaming container (b69dd1fc5aeb) leewardslope.sidekiq_worker.1 to leewardslope.sidekiq_worker.1.1630646338
Renaming container (bd6a2cbb3bf8) sleepy_wing to leewardslope.sidekiq_worker.1
Found previous container(s) (4eaea067c9f2) named leewardslope.web.1
Renaming container (4eaea067c9f2) leewardslope.web.1 to leewardslope.web.1.1630646339
Renaming container (d981b4adfe33) nice_dijkstra to leewardslope.web.1
-----> Checking for postdeploy task
No postdeploy task found, skipping
-----> Shutting down old containers in 60 seconds
=====> Application deployed:
http://test.leewardslope.com
https://test.leewardslope.com
Updating an Existing Forem instance to load via new repo
It didn't exited with status 1, but have a working Forem.
Using release configuration from last framework (Ruby).
-----> Discovering process types
Procfile declares types -> release, sidekiq_worker, web
-----> Releasing forem...
-----> Deploying forem...
-----> Checking for predeploy task
No predeploy task found, skipping
-----> Checking for release task
-----> Executing release task from Procfile: ./release-tasks.sh
=====> Start of forem release task (48159e5ed) output
+ [[ '' = \b\l\o\c\k\e\d ]]
+ STATEMENT_TIMEOUT=4500000
+ bundle exec rails app_initializer:setup
== Preparing database ==
== Performing setup tasks ==
== Updating Data ==
== Bust Caches ==
+ bundle exec rake fastly:update_configs
+ bundle exec rails runner 'puts '\''app load success'\'''
----- Skipping => Entire log can be seen in comments -------
-----> Running post-deploy
-----> Configuring app.leewardslope.com...(using built-in template)
-----> Creating https nginx.conf
Enabling HSTS
-----> Configuring redirect for 75.119.143.54 to app.leewardslope.com via HTTP 301...
Reloading nginx
-----> Renaming containers
Found previous container(s) (95202fdca051) named forem.sidekiq_worker.1
Renaming container (95202fdca051) forem.sidekiq_worker.1 to forem.sidekiq_worker.1.1630646260
Renaming container (629bf973e5c9) adoring_wilson to forem.sidekiq_worker.1
Found previous container(s) (26be38e39873) named forem.web.1
Renaming container (26be38e39873) forem.web.1 to forem.web.1.1630646261
Renaming container (c0b2d3ee2f79) compassionate_lederberg to forem.web.1
-----> Checking for postdeploy task
No postdeploy task found, skipping
-----> Shutting down old containers in 60 seconds
=====> Application deployed:
http://app.leewardslope.com
https://app.leewardslope.com
Top comments (4)
Upgrading old Forem instace (old repo) to new Forem (new repo)
surprisingly, this didn't failed; but displaying few errors.
Fresh Installation with new Repo.
For some reason, the release got failed.
Fresh installation with Old repository.
Here the ruby version was 2.7.2, It didn't failed.
Hi, I have the same problem with
index_exists
. Hope that it will be fixed soon.My issue is here: forem.dev/tien/dependency-failed-f...