bundle exec rake dev:setup failed in CI
Overview
Job https://gitlab.com/gitlab-org/gitlab-development-kit/-/jobs/2857119950 failed in https://gitlab.com/gitlab-org/gitlab-development-kit/-/pipelines/611854916:
== Seed from /builds/gitlab-org/gitlab-development-kit/gdk/gitlab/db/fixtures/development/19_environments.rb
rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Sha The commit does not exist, Ref The branch or tag does not exist
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/validations.rb:80:in `raise_validation_error'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/validations.rb:53:in `save!'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:302:in `block in save!'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:115:in `block in read_write'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:184:in `retry_with_backoff'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:111:in `read_write'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:119:in `write_using_load_balancer'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:71:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:302:in `save!'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/suppressor.rb:48:in `save!'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:515:in `block in save!'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:530:in `block in around_save'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:150:in `block in run_actions'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:170:in `catch_exceptions'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:148:in `run_actions'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:133:in `run_callbacks'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:212:in `run_callbacks'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block (2 levels) in perform'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `catch'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:63:in `block in perform'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:186:in `within_transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-0.5.0/lib/state_machines/transition_collection.rb:62:in `perform'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:530:in `around_save'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/state_machines-activerecord-0.8.0/lib/state_machines/integrations/active_record.rb:515:in `save!'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_association.rb:371:in `insert_record'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/has_many_association.rb:58:in `insert_record'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_association.rb:358:in `block (2 levels) in _create_record'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_association.rb:462:in `replace_on_target'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_association.rb:283:in `add_to_target'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_association.rb:357:in `block in _create_record'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_association.rb:136:in `block in transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/app/models/concerns/cross_database_modification.rb:92:in `block in transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:115:in `block in read_write'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:184:in `retry_with_backoff'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:111:in `read_write'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:119:in `write_using_load_balancer'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:71:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:209:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database.rb:331:in `block in transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/notifications.rb:205:in `instrument'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database.rb:330:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/app/models/concerns/cross_database_modification.rb:83:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_association.rb:135:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_association.rb:355:in `_create_record'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/has_many_association.rb:137:in `_create_record'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/association.rb:209:in `create!'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/associations/collection_proxy.rb:364:in `create!'
(eval):48:in `create_deployment!'
(eval):20:in `block in create_master_deployments!'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/app/models/commit_collection.rb:23:in `each'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/app/models/commit_collection.rb:23:in `each'
(eval):19:in `map'
(eval):19:in `create_master_deployments!'
(eval):11:in `seed!'
(eval):71:in `block (4 levels) in run_file'
(eval):69:in `each'
(eval):69:in `block (3 levels) in run_file'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/seeder.rb:94:in `block (3 levels) in quiet'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/seeder.rb:122:in `without_new_note_notifications'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/seeder.rb:93:in `block (2 levels) in quiet'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/seeder.rb:132:in `without_statement_timeout'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/seeder.rb:92:in `block in quiet'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/seeder.rb:148:in `without_database_logging'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/seeder.rb:91:in `quiet'
(eval):68:in `block (2 levels) in run_file'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:46:in `eval'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:46:in `block (2 levels) in run_file'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:58:in `block in open'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:57:in `open'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:57:in `open'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:36:in `block in run_file'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:120:in `block in write_using_load_balancer'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:115:in `block in read_write'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:184:in `retry_with_backoff'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/load_balancer.rb:111:in `read_write'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:119:in `write_using_load_balancer'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database/load_balancing/connection_proxy.rb:71:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:209:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database.rb:331:in `block in transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.6.1/lib/active_support/notifications.rb:205:in `instrument'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/gitlab/database.rb:330:in `transaction'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:35:in `run_file'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:26:in `block in run'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:25:in `each'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu/runner.rb:25:in `run'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/seed-fu.rb:29:in `seed'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/seed-fu-2.3.7/lib/tasks/seed_fu.rake:36:in `block (2 levels) in <top (required)>'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-5.1.1/lib/sentry/rake.rb:26:in `execute'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/tasks/gitlab/setup.rake:36:in `setup_db'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/tasks/gitlab/setup.rake:7:in `block (2 levels) in <top (required)>'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-5.1.1/lib/sentry/rake.rb:26:in `execute'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/lib/tasks/dev.rake:9:in `block (2 levels) in <top (required)>'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/sentry-ruby-core-5.1.1/lib/sentry/rake.rb:26:in `execute'
/builds/gitlab-org/gitlab-development-kit/gdk/gitlab/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `load'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `kernel_load'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:23:in `run'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/cli.rb:483:in `exec'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in `dispatch'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/exe/bundle:48:in `block in <top (required)>'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
/builds/gitlab-org/gitlab-development-kit/.gem/gems/bundler-2.3.15/exe/bundle:36:in `<top (required)>'
/home/gdk/.asdf/installs/ruby/2.7.5/bin/bundle:25:in `load'
/home/gdk/.asdf/installs/ruby/2.7.5/bin/bundle:25:in `<main>'
Tasks: TOP => db:seed_fu
(See full trace by running task with --trace)
ERROR: 'support/exec-cd gitlab bundle exec rake dev:setup' failed.
ERROR: The command "bundle exec rake dev:setup" failed. Try to run it again with:
support/exec-cd gitlab bundle exec rake dev:setup
make: *** [support/makefiles/Makefile.postgresql.mk:9: postgresql-seed-rails] Error 1
ERROR: Failed to install.
Steps to replicate (optional)
- Go to
/gitlab
directory in your local GDK - Run
bundle exec rake db:seed_fu FILTER=19_environments.rb
Proposal (optional)
Environment (optional)
- Operating system name:
<!-- output of `uname -a` command -->
- Architecture:
<!-- output of `arch` command -->
- The contents of your
gdk.yml
(if any) - Ruby version:
<!-- output of `ruby --version` command -->
- GDK version:
<!-- output of `git rev-parse --short HEAD` command -->