rspec migration pg12 2/9
Passed Started
by
@leetickett

Lee Tickett
1Running with gitlab-runner 15.1.0~beta.20.g62206bb2 (62206bb2)2 on blue-1.shared-gitlab-org.runners-manager.gitlab.com/default KzYhZxBv3 feature flags: FF_USE_FASTZIP:true6Using Docker executor with image registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-2.7.patched-golang-1.17-node-16.14-postgresql-12:rubygems-3.2-git-2.36-lfs-2.9-chrome-101-yarn-1.22-graphicsmagick-1.3.36 ...7Starting service postgres:12 ...8Pulling docker image postgres:12 ...9Using docker image sha256:ac3b8cd6a8b42e839456256bc514d6230b5a2538c738b3d522e1384a2a172b96 for postgres:12 with digest postgres@sha256:e6ffad42c91a4d5a29257a27ac4e160c3ae7196696b37bf2e80410024ed95951 ...10Starting service redis:6.0-alpine ...11Pulling docker image redis:6.0-alpine ...12Using docker image sha256:09401fed2a421bf0019f96dcec70c85f82ec7b76beb1ae589547b0dc302d6b76 for redis:6.0-alpine with digest redis@sha256:217a9db40a914cc3f6206a143a4d750da0607500cc013a147a4979e08e40beff ...13Waiting for services to be up and running (timeout 30 seconds)...14Authenticating with credentials from job payload (GitLab Registry)15Pulling docker image registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-2.7.patched-golang-1.17-node-16.14-postgresql-12:rubygems-3.2-git-2.36-lfs-2.9-chrome-101-yarn-1.22-graphicsmagick-1.3.36 ...16Using docker image sha256:642191311550aaa03aba1d11d8d921042ead8ee5afeb833fc7e4e3f933b7ed04 for registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-2.7.patched-golang-1.17-node-16.14-postgresql-12:rubygems-3.2-git-2.36-lfs-2.9-chrome-101-yarn-1.22-graphicsmagick-1.3.36 with digest registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-2.7.patched-golang-1.17-node-16.14-postgresql-12@sha256:f0990c59018be757dd56365bb2cc6791d65f3f4bf99a431c3b26e3df08260f6a ...18Running on runner-kzyhzxbv-project-278964-concurrent-0 via runner-kzyhzxbv-shared-gitlab-org-1656912646-31923827...20$ eval "$CI_PRE_CLONE_SCRIPT"21Fetching changes with git depth set to 20...22Initialized empty Git repository in /builds/gitlab-org/gitlab/.git/23Created fresh repository.24remote: Enumerating objects: 115982, done. 25remote: Counting objects: 100% (115982/115982), done. 26remote: Compressing objects: 100% (81018/81018), done. 27remote: Total 115982 (delta 48513), reused 75495 (delta 30560), pack-reused 0 28Receiving objects: 100% (115982/115982), 108.44 MiB | 28.60 MiB/s, done.29Resolving deltas: 100% (48513/48513), done.31 * [new ref] refs/pipelines/579176392 -> refs/pipelines/57917639232Checking out 204b4379 as refs/merge-requests/91556/merge...33Skipping Git submodules setup34$ git remote set-url origin "${CI_REPOSITORY_URL}"36Checking cache for ruby-gems-debian-bullseye-ruby-2.7-10...37Downloading cache.zip from https://storage.googleapis.com/gitlab-com-runners-cache/project/278964/ruby-gems-debian-bullseye-ruby-2.7-10 38Successfully extracted cache39Checking cache for gitaly-ruby-gems-debian-bullseye-ruby-2.7-10...40Downloading cache.zip from https://storage.googleapis.com/gitlab-com-runners-cache/project/278964/gitaly-ruby-gems-debian-bullseye-ruby-2.7-10 41Successfully extracted cache43Downloading artifacts for compile-test-assets (2673336706)...44Downloading artifacts from coordinator... ok id=2673336706 responseStatus=200 OK token=4xCXwf5x45Downloading artifacts for detect-tests (2673336715)...46Downloading artifacts from coordinator... ok id=2673336715 responseStatus=200 OK token=4xCXwf5x47Downloading artifacts for retrieve-tests-metadata (2673336722)...48Downloading artifacts from coordinator... ok id=2673336722 responseStatus=200 OK token=4xCXwf5x49Downloading artifacts for setup-test-env (2673336712)...50Downloading artifacts from coordinator... ok id=2673336712 responseStatus=200 OK token=4xCXwf5x52Using docker image sha256:642191311550aaa03aba1d11d8d921042ead8ee5afeb833fc7e4e3f933b7ed04 for registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-2.7.patched-golang-1.17-node-16.14-postgresql-12:rubygems-3.2-git-2.36-lfs-2.9-chrome-101-yarn-1.22-graphicsmagick-1.3.36 with digest registry.gitlab.com/gitlab-org/gitlab-build-images/debian-bullseye-ruby-2.7.patched-golang-1.17-node-16.14-postgresql-12@sha256:f0990c59018be757dd56365bb2cc6791d65f3f4bf99a431c3b26e3df08260f6a ...53$ echo $FOSS_ONLY54$ [ "$FOSS_ONLY" = "1" ] && rm -rf ee/ qa/spec/ee/ qa/qa/specs/features/ee/ qa/qa/ee/ qa/qa/ee.rb55$ export GOPATH=$CI_PROJECT_DIR/.go56$ mkdir -p $GOPATH57$ source scripts/utils.sh58$ source scripts/prepare_build.sh593.2.3360Bundler version 2.2.3361Successfully installed bundler-2.3.15621 gem installed63production:development64Settings are listed in order of priority. The top value will be used.65clean66Set for your local app (/builds/gitlab-org/gitlab/.bundle/config): true67frozen68Set via BUNDLE_FROZEN: true69install_flags70Set via BUNDLE_INSTALL_FLAGS: "--jobs=$(nproc) --retry=3 --quiet"71path72Set for your local app (/builds/gitlab-org/gitlab/.bundle/config): "/builds/gitlab-org/gitlab/vendor"73without74Set via BUNDLE_WITHOUT: [:production, :development]75$ bundle install --jobs=$(nproc) --retry=3 --quiet && bundle check76Don't run Bundler as root. Bundler can ask for sudo if it is needed, and77installing your bundle as root will break this application for all non-root78users on this machine.79The Gemfile's dependencies are satisfied80==> 'bundle install --jobs=$(nproc) --retry=3 --quiet && bundle check' succeeded in 2 seconds.81$ bundle pristine pg82Installing pg 1.3.5 with native extensions83==> 'bundle pristine pg' succeeded in 11 seconds.84Using decomposed database config (config/database.yml.decomposed-postgresql)85$ setup_db_user_only86CREATE ROLE87GRANT88==> 'setup_db_user_only' succeeded in 1 seconds.89$ bundle exec rake db:drop db:create db:schema:load db:migrate90Dropped database 'gitlabhq_test'91Dropped database 'gitlabhq_test_ci'92Dropped database 'gitlabhq_geo_test'93Created database 'gitlabhq_test'94Created database 'gitlabhq_test_ci'95Created database 'gitlabhq_geo_test'96==> 'bundle exec rake db:drop db:create db:schema:load db:migrate' succeeded in 46 seconds.97$ setup_db_praefect98SELECT pg_catalog.set_config('search_path', '', false);99CREATE DATABASE praefect_test ENCODING 'UTF8';100==> 'setup_db_praefect' succeeded in 0 seconds.101$ run_timed_command "gem install knapsack --no-document"102$ gem install knapsack --no-document103Successfully installed knapsack-4.0.01041 gem installed105==> 'gem install knapsack --no-document' succeeded in 0 seconds.106$ run_timed_command "scripts/gitaly-test-spawn"107$ scripts/gitaly-test-spawn108find: ‘/builds/gitlab-org/gitlab/tmp/tests/gitaly/cmd’: No such file or directory109Don't run Bundler as root. Bundler can ask for sudo if it is needed, and110installing your bundle as root will break this application for all non-root111users on this machine.112Using abstract_type 0.0.7113Using concurrent-ruby 1.1.10114Using i18n 1.10.0115Using minitest 5.15.0116Using tzinfo 2.0.4117Using zeitwerk 2.5.4118Using activesupport 6.1.4.7119Using builder 3.2.4120Using erubi 1.10.0121Using mini_portile2 2.8.0122Using racc 1.6.0123Using nokogiri 1.13.6 (x86_64-linux)124Using rails-dom-testing 2.0.3125Using crass 1.0.6126Using loofah 2.16.0127Using rails-html-sanitizer 1.4.2128Using actionview 6.1.4.7129Using rack 2.2.3130Using rack-test 1.1.0131Using actionpack 6.1.4.7132Using ice_nine 0.11.2133Using thread_safe 0.3.6134Using memoizable 0.4.2135Using adamantium 0.2.0136Using public_suffix 4.0.6137Using addressable 2.7.0138Using ast 2.4.2139Using binding_ninja 0.2.3140Using bundler 2.3.15141Using charlock_holmes 0.7.7142Using coderay 1.1.2143Using equalizer 0.0.11144Using concord 0.1.5145Using diff-lcs 1.3146Using dotenv 2.7.6147Using escape_utils 1.2.1148Using factory_bot 5.0.2149Using multipart-post 2.1.1150Using faraday 1.0.1151Using ffi 1.15.3152Using json 2.5.1153Using gemojione 3.3.0154Using mini_mime 1.0.2155Using rugged 1.2.0156Using github-linguist 7.12.1157Using github-markup 1.7.0158Using mime-types-data 3.2020.1104159Using mime-types 3.3.1160Using gitlab-gollum-rugged_adapter 0.4.4.4.gitlab.1161Using rouge 3.27.0162Using sanitize 6.0.0163Using stringex 2.8.5164Using gitlab-gollum-lib 4.2.7.10.gitlab.2165Using google-protobuf 3.19.1 (x86_64-linux)166Using googleapis-common-protos-types 1.3.0167Using grpc 1.42.0 (x86_64-linux)168Using opentracing 0.5.0169Using thrift 0.15.0170Using jaeger-client 1.1.0171Using pg_query 2.1.1172Using redis 4.4.0173Using gitlab-labkit 0.23.0174Using rubyzip 2.3.2175Using thor 1.1.0176Using tomlrb 2.0.1177Using with_env 1.1.0178Using rexml 3.2.5179Using xml-simple 1.1.9180Using gitlab-license_finder 6.14.2.1181Using gitlab-markup 1.7.1182Using grpc-tools 1.42.0183Using sawyer 0.8.2184Using octokit 4.20.0185Using reverse_markdown 1.4.0186Using licensee 9.14.1187Using method_source 0.9.2188Using msgpack 1.3.3189Using optimist 3.0.1190Using parallel 1.19.2191Using parser 3.0.3.2192Using procto 0.0.3193Using unparser 0.4.7194Using proc_to_ast 0.1.0195Using pry 0.12.2196Using rainbow 3.0.0197Using rbtrace 0.4.14198Using rdoc 6.3.2199Using regexp_parser 1.8.1200Using rspec-support 3.8.0201Using rspec-core 3.8.0202Using rspec-expectations 3.8.3203Using rspec-mocks 3.8.0204Using rspec 3.8.0205Using rspec-parameterized 0.4.2206Using rubocop-ast 0.2.0207Using ruby-progressbar 1.10.1208Using unicode-display_width 1.7.0209Using rubocop 0.86.0210Using sentry-raven 3.0.4211Using timecop 0.9.1212Bundle complete! 22 Gemfile dependencies, 100 gems now installed.213Gems in the groups 'production' and 'development' were not installed.214Bundled gems are installed into `/builds/gitlab-org/gitlab/vendor/gitaly-ruby`215Checking gitaly-ruby Gemfile...216Checking gitaly-ruby bundle...217The Gemfile's dependencies are satisfied218Trying to connect to gitaly: .......................................... OK219Trying to connect to gitaly2: .................................................................. OK220Starting Praefect with in-memory election strategyTrying to connect to praefect: ........ OK221==> 'scripts/gitaly-test-spawn' succeeded in 13 seconds.222$ source ./scripts/rspec_helpers.sh223$ rspec_paralellized_job "--tag ~quarantine --tag level:migration"224SKIP_FLAKY_TESTS_AUTOMATICALLY: true225RETRY_FAILED_TESTS_IN_NEW_PROCESS: true226KNAPSACK_GENERATE_REPORT: true227FLAKY_RSPEC_GENERATE_REPORT: true228KNAPSACK_TEST_FILE_PATTERN: spec/{migrations,lib/gitlab/background_migration,lib/ee/gitlab/background_migration}{,/**/}*_spec.rb229KNAPSACK_LOG_LEVEL: debug230KNAPSACK_REPORT_PATH: knapsack/rspec_migration_pg12_2_9_report.json231FLAKY_RSPEC_SUITE_REPORT_PATH: rspec/flaky/report-suite.json232FLAKY_RSPEC_REPORT_PATH: rspec/flaky/all_rspec_migration_pg12_2_9_report.json233NEW_FLAKY_RSPEC_REPORT_PATH: rspec/flaky/new_rspec_migration_pg12_2_9_report.json234SKIPPED_FLAKY_TESTS_REPORT_PATH: rspec/flaky/skipped_flaky_tests_rspec_migration_pg12_2_9_report.txt235RETRIED_TESTS_REPORT_PATH: rspec/flaky/retried_tests_rspec_migration_pg12_2_9_report.txt236CRYSTALBALL: 237Knapsack report generator started!238DEPRECATION WARNING: /builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/activerecord-6.1.4.7/lib/active_record/connection_adapters/postgresql_adapter.rb:78: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call239/builds/gitlab-org/gitlab/vendor/ruby/2.7.0/gems/pg-1.3.5/lib/pg.rb:68: warning: The called method `connect' is defined here240 (called from new_client at /builds/gitlab-org/gitlab/config/initializers/00_connection_logger.rb:21)241Run options:242 include {:level=>"migration"}243 exclude {:quarantine=>true}244Test environment set up in 0.525520021 seconds245Gitlab::BackgroundMigration::BackfillSnippetRepositories246 #perform247 logs successful migrated snippets248 when snippet has a non empty repository249 does not perform any action250 when snippet has an empty repo251 behaves like commits the file to the repository252 when author can update snippet and use git253 creates the repository and commit the file254 when author cannot update snippet or use git255 when user is blocked256 behaves like migration_bot user commits files257 is expected to eq "noreply+gitlab-migration-bot%s@localhost"258 when user is deactivated259 behaves like migration_bot user commits files260 is expected to eq "noreply+gitlab-migration-bot%s@localhost"261 when user is a ghost262 behaves like migration_bot user commits files263 is expected to eq "noreply+gitlab-migration-bot%s@localhost"264 when snippet does not have a repository265 creates the repository266 behaves like commits the file to the repository267 when author can update snippet and use git268 creates the repository and commit the file269 when author cannot update snippet or use git270 when user is blocked271 behaves like migration_bot user commits files272 is expected to eq "noreply+gitlab-migration-bot%s@localhost"273 when user is deactivated274 behaves like migration_bot user commits files275 is expected to eq "noreply+gitlab-migration-bot%s@localhost"276 when user is a ghost277 behaves like migration_bot user commits files278 is expected to eq "noreply+gitlab-migration-bot%s@localhost"279 when an error is raised280 logs errors281 retries 2 times the operation if it fails282 destroys the snippet repository283 deletes the repository on disk284 with invalid file names285 invalid_file_name: "filename.js // with comment", converted_file_name: "filename-js-with-comment"286 checks for file path errors when errors are raised287 converts invalid filenames288 does not convert valid filenames on subsequent migrations289 invalid_file_name: ".git/hooks/pre-commit", converted_file_name: "git-hooks-pre-commit"290 checks for file path errors when errors are raised291 converts invalid filenames292 does not convert valid filenames on subsequent migrations293 invalid_file_name: "https://gitlab.com", converted_file_name: "https-gitlab-com"294 checks for file path errors when errors are raised295 converts invalid filenames296 does not convert valid filenames on subsequent migrations297 invalid_file_name: "html://web.title%mp4/mpg/mpeg.net", converted_file_name: "html-web-title-mp4-mpg-mpeg-net"298 checks for file path errors when errors are raised299 converts invalid filenames300 does not convert valid filenames on subsequent migrations301 invalid_file_name: "../../etc/passwd", converted_file_name: "etc-passwd"302 checks for file path errors when errors are raised303 converts invalid filenames304 does not convert valid filenames on subsequent migrations305 invalid_file_name: ".", converted_file_name: "snippetfile1.txt"306 checks for file path errors when errors are raised307 converts invalid filenames308 does not convert valid filenames on subsequent migrations309 when snippet content size is higher than the existing limit310 behaves like migration_bot user commits files311 is expected to eq "noreply+gitlab-migration-bot%s@localhost"312 when user name is invalid313 behaves like migration_bot user commits files314 is expected to eq "noreply+gitlab-migration-bot%s@localhost"315 when both user name and snippet file_name are invalid316 updates the file_name only when it is invalid317 does not alter the commit author in subsequent migrations318 increases the number of retries temporarily from 2 to 3319 behaves like migration_bot user commits files320 is expected to eq "noreply+gitlab-migration-bot%s@localhost"321RemoveHipchatServiceRecords322== 20210420103955 RemoveHipchatServiceRecords: migrating ======================323== 20210420103955 RemoveHipchatServiceRecords: migrated (0.0385s) =============324 removes services records of type HipchatService325Gitlab::BackgroundMigration::FixFirstMentionedInCommitAt326 running the migration when first_mentioned_in_commit_at is timestamp without time zone327 behaves like fixes first_mentioned_in_commit_at328 marks successful slices as completed329 when the persisted first_mentioned_in_commit_at is later than the first commit authored_date330 updates the issue_metrics record331 when the persisted first_mentioned_in_commit_at is earlier than the first commit authored_date332 does not update the issue_metrics record333 when the first_mentioned_in_commit_at is null334 does nothing335 running the migration when first_mentioned_in_commit_at is timestamp with time zone336 behaves like fixes first_mentioned_in_commit_at337main: -- transaction_open?()338main: -> 0.0001s339main: -- indexes(:issue_metrics)340main: -> 0.0072s341main: -- remove_index(:issue_metrics, {:algorithm=>:concurrently, :name=>"index_issue_metrics_first_mentioned_in_commit"})342main: -> 0.0122s343main: -- transaction_open?()344main: -> 0.0001s345main: -- index_exists?(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at at time zone 'UTC') > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})346main: -> 0.0044s347main: -- add_index(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at at time zone 'UTC') > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})348main: -> 0.0022s349main: -- transaction_open?()350main: -> 0.0001s351main: -- indexes(:issue_metrics)352main: -> 0.0051s353main: -- remove_index(:issue_metrics, {:algorithm=>:concurrently, :name=>"index_issue_metrics_first_mentioned_in_commit"})354main: -> 0.0017s355main: -- transaction_open?()356main: -> 0.0001s357main: -- index_exists?(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at) > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})358main: -> 0.0044s359main: -- add_index(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at) > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})360main: -> 0.0021s361 marks successful slices as completed362 when the persisted first_mentioned_in_commit_at is later than the first commit authored_date363main: -- transaction_open?()364main: -> 0.0001s365main: -- indexes(:issue_metrics)366main: -> 0.0072s367main: -- remove_index(:issue_metrics, {:algorithm=>:concurrently, :name=>"index_issue_metrics_first_mentioned_in_commit"})368main: -> 0.0018s369main: -- transaction_open?()370main: -> 0.0001s371main: -- index_exists?(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at at time zone 'UTC') > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})372main: -> 0.0041s373main: -- add_index(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at at time zone 'UTC') > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})374main: -> 0.0021s375main: -- transaction_open?()376main: -> 0.0003s377main: -- indexes(:issue_metrics)378main: -> 0.0057s379main: -- remove_index(:issue_metrics, {:algorithm=>:concurrently, :name=>"index_issue_metrics_first_mentioned_in_commit"})380main: -> 0.0023s381main: -- transaction_open?()382main: -> 0.0001s383main: -- index_exists?(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at) > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})384main: -> 0.0042s385main: -- add_index(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at) > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})386main: -> 0.0022s387 updates the issue_metrics record388 when the persisted first_mentioned_in_commit_at is earlier than the first commit authored_date389main: -- transaction_open?()390main: -> 0.0001s391main: -- indexes(:issue_metrics)392main: -> 0.0070s393main: -- remove_index(:issue_metrics, {:algorithm=>:concurrently, :name=>"index_issue_metrics_first_mentioned_in_commit"})394main: -> 0.0017s395main: -- transaction_open?()396main: -> 0.0001s397main: -- index_exists?(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at at time zone 'UTC') > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})398main: -> 0.0046s399main: -- add_index(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at at time zone 'UTC') > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})400main: -> 0.0021s401main: -- transaction_open?()402main: -> 0.0001s403main: -- indexes(:issue_metrics)404main: -> 0.0057s405main: -- remove_index(:issue_metrics, {:algorithm=>:concurrently, :name=>"index_issue_metrics_first_mentioned_in_commit"})406main: -> 0.0019s407main: -- transaction_open?()408main: -> 0.0001s409main: -- index_exists?(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at) > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})410main: -> 0.0054s411main: -- add_index(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at) > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})412main: -> 0.0021s413 does not update the issue_metrics record414 when the first_mentioned_in_commit_at is null415main: -- transaction_open?()416main: -> 0.0003s417main: -- indexes(:issue_metrics)418main: -> 0.0079s419main: -- remove_index(:issue_metrics, {:algorithm=>:concurrently, :name=>"index_issue_metrics_first_mentioned_in_commit"})420main: -> 0.0021s421main: -- transaction_open?()422main: -> 0.0001s423main: -- index_exists?(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at at time zone 'UTC') > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})424main: -> 0.0049s425main: -- add_index(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at at time zone 'UTC') > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})426main: -> 0.0025s427main: -- transaction_open?()428main: -> 0.0003s429main: -- indexes(:issue_metrics)430main: -> 0.0045s431main: -- remove_index(:issue_metrics, {:algorithm=>:concurrently, :name=>"index_issue_metrics_first_mentioned_in_commit"})432main: -> 0.0015s433main: -- transaction_open?()434main: -> 0.0001s435main: -- index_exists?(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at) > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})436main: -> 0.0043s437main: -- add_index(:issue_metrics, :issue_id, {:where=>"EXTRACT(YEAR FROM first_mentioned_in_commit_at) > 2019", :name=>"index_issue_metrics_first_mentioned_in_commit", :algorithm=>:concurrently})438main: -> 0.0019s439 does nothing440SetDefaultJobTokenScopeTrue441 #up442-- change_column_default(:project_ci_cd_settings, :job_token_scope_enabled, {:from=>false, :to=>true})443 -> 0.0063s444 sets the job_token_scope_enabled default to true445 #down446-- change_column_default(:project_ci_cd_settings, :job_token_scope_enabled, {:from=>true, :to=>false})447 -> 0.0071s448 sets the job_token_scope_enabled default to false449ScheduleDropInvalidVulnerabilities2450== 20210511142748 ScheduleDropInvalidVulnerabilities2: migrating ==============451-- Scheduled 2 DropInvalidVulnerabilities jobs with a maximum of 1 records per batch and an interval of 120 seconds.452The migration is expected to take at least 240 seconds. Expect all jobs to have completed after 2022-07-04 07:21:27 UTC."453== 20210511142748 ScheduleDropInvalidVulnerabilities2: migrated (0.1079s) =====454 schedules background migrations455AddTriggersToIntegrationsTypeNew456 #up457 INSERT trigger458== 20210721135638 AddTriggersToIntegrationsTypeNew: migrating =================459-- execute("CREATE OR REPLACE FUNCTION integrations_set_type_new()\nRETURNS TRIGGER AS\n$$\nBEGIN\nWITH mapping(old_type, new_type) AS (VALUES\n ('AsanaService', 'Integrations::Asana'),\n ('AssemblaService', 'Integrations::Assembla'),\n ('BambooService', 'Integrations::Bamboo'),\n ('BugzillaService', 'Integrations::Bugzilla'),\n ('BuildkiteService', 'Integrations::Buildkite'),\n ('CampfireService', 'Integrations::Campfire'),\n ('ConfluenceService', 'Integrations::Confluence'),\n ('CustomIssueTrackerService', 'Integrations::CustomIssueTracker'),\n ('DatadogService', 'Integrations::Datadog'),\n ('DiscordService', 'Integrations::Discord'),\n ('DroneCiService', 'Integrations::DroneCi'),\n ('EmailsOnPushService', 'Integrations::EmailsOnPush'),\n ('EwmService', 'Integrations::Ewm'),\n ('ExternalWikiService', 'Integrations::ExternalWiki'),\n ('FlowdockService', 'Integrations::Flowdock'),\n ('HangoutsChatService', 'Integrations::HangoutsChat'),\n ('IrkerService', 'Integrations::Irker'),\n ('JenkinsService', 'Integrations::Jenkins'),\n ('JiraService', 'Integrations::Jira'),\n ('MattermostService', 'Integrations::Mattermost'),\n ('MattermostSlashCommandsService', 'Integrations::MattermostSlashCommands'),\n ('MicrosoftTeamsService', 'Integrations::MicrosoftTeams'),\n ('MockCiService', 'Integrations::MockCi'),\n ('MockMonitoringService', 'Integrations::MockMonitoring'),\n ('PackagistService', 'Integrations::Packagist'),\n ('PipelinesEmailService', 'Integrations::PipelinesEmail'),\n ('PivotaltrackerService', 'Integrations::Pivotaltracker'),\n ('PrometheusService', 'Integrations::Prometheus'),\n ('PushoverService', 'Integrations::Pushover'),\n ('RedmineService', 'Integrations::Redmine'),\n ('SlackService', 'Integrations::Slack'),\n ('SlackSlashCommandsService', 'Integrations::SlackSlashCommands'),\n ('TeamcityService', 'Integrations::Teamcity'),\n ('UnifyCircuitService', 'Integrations::UnifyCircuit'),\n ('YoutrackService', 'Integrations::Youtrack'),\n ('WebexTeamsService', 'Integrations::WebexTeams'),\n\n -- EE-only integrations\n ('GithubService', 'Integrations::Github'),\n ('GitlabSlackApplicationService', 'Integrations::GitlabSlackApplication')\n)\n\nUPDATE integrations SET type_new = mapping.new_type\nFROM mapping\nWHERE integrations.id = NEW.id\n AND mapping.old_type = NEW.type;\nRETURN NULL;\n\nEND\n$$ LANGUAGE PLPGSQL\n")460 -> 0.0035s461-- execute("CREATE TRIGGER trigger_type_new_on_insert\nAFTER INSERT ON integrations\nFOR EACH ROW\nEXECUTE FUNCTION integrations_set_type_new();\n")462 -> 0.0018s463== 20210721135638 AddTriggersToIntegrationsTypeNew: migrated (0.0058s) ========464 sets `type_new` to the transformed `type` class name465== 20210721135638 AddTriggersToIntegrationsTypeNew: migrating =================466-- execute("CREATE OR REPLACE FUNCTION integrations_set_type_new()\nRETURNS TRIGGER AS\n$$\nBEGIN\nWITH mapping(old_type, new_type) AS (VALUES\n ('AsanaService', 'Integrations::Asana'),\n ('AssemblaService', 'Integrations::Assembla'),\n ('BambooService', 'Integrations::Bamboo'),\n ('BugzillaService', 'Integrations::Bugzilla'),\n ('BuildkiteService', 'Integrations::Buildkite'),\n ('CampfireService', 'Integrations::Campfire'),\n ('ConfluenceService', 'Integrations::Confluence'),\n ('CustomIssueTrackerService', 'Integrations::CustomIssueTracker'),\n ('DatadogService', 'Integrations::Datadog'),\n ('DiscordService', 'Integrations::Discord'),\n ('DroneCiService', 'Integrations::DroneCi'),\n ('EmailsOnPushService', 'Integrations::EmailsOnPush'),\n ('EwmService', 'Integrations::Ewm'),\n ('ExternalWikiService', 'Integrations::ExternalWiki'),\n ('FlowdockService', 'Integrations::Flowdock'),\n ('HangoutsChatService', 'Integrations::HangoutsChat'),\n ('IrkerService', 'Integrations::Irker'),\n ('JenkinsService', 'Integrations::Jenkins'),\n ('JiraService', 'Integrations::Jira'),\n ('MattermostService', 'Integrations::Mattermost'),\n ('MattermostSlashCommandsService', 'Integrations::MattermostSlashCommands'),\n ('MicrosoftTeamsService', 'Integrations::MicrosoftTeams'),\n ('MockCiService', 'Integrations::MockCi'),\n ('MockMonitoringService', 'Integrations::MockMonitoring'),\n ('PackagistService', 'Integrations::Packagist'),\n ('PipelinesEmailService', 'Integrations::PipelinesEmail'),\n ('PivotaltrackerService', 'Integrations::Pivotaltracker'),\n ('PrometheusService', 'Integrations::Prometheus'),\n ('PushoverService', 'Integrations::Pushover'),\n ('RedmineService', 'Integrations::Redmine'),\n ('SlackService', 'Integrations::Slack'),\n ('SlackSlashCommandsService', 'Integrations::SlackSlashCommands'),\n ('TeamcityService', 'Integrations::Teamcity'),\n ('UnifyCircuitService', 'Integrations::UnifyCircuit'),\n ('YoutrackService', 'Integrations::Youtrack'),\n ('WebexTeamsService', 'Integrations::WebexTeams'),\n\n -- EE-only integrations\n ('GithubService', 'Integrations::Github'),\n ('GitlabSlackApplicationService', 'Integrations::GitlabSlackApplication')\n)\n\nUPDATE integrations SET type_new = mapping.new_type\nFROM mapping\nWHERE integrations.id = NEW.id\n AND mapping.old_type = NEW.type;\nRETURN NULL;\n\nEND\n$$ LANGUAGE PLPGSQL\n")467 -> 0.0033s468-- execute("CREATE TRIGGER trigger_type_new_on_insert\nAFTER INSERT ON integrations\nFOR EACH ROW\nEXECUTE FUNCTION integrations_set_type_new();\n")469 -> 0.0017s470== 20210721135638 AddTriggersToIntegrationsTypeNew: migrated (0.0054s) ========471 ignores types that are not namespaced472== 20210721135638 AddTriggersToIntegrationsTypeNew: migrating =================473-- execute("CREATE OR REPLACE FUNCTION integrations_set_type_new()\nRETURNS TRIGGER AS\n$$\nBEGIN\nWITH mapping(old_type, new_type) AS (VALUES\n ('AsanaService', 'Integrations::Asana'),\n ('AssemblaService', 'Integrations::Assembla'),\n ('BambooService', 'Integrations::Bamboo'),\n ('BugzillaService', 'Integrations::Bugzilla'),\n ('BuildkiteService', 'Integrations::Buildkite'),\n ('CampfireService', 'Integrations::Campfire'),\n ('ConfluenceService', 'Integrations::Confluence'),\n ('CustomIssueTrackerService', 'Integrations::CustomIssueTracker'),\n ('DatadogService', 'Integrations::Datadog'),\n ('DiscordService', 'Integrations::Discord'),\n ('DroneCiService', 'Integrations::DroneCi'),\n ('EmailsOnPushService', 'Integrations::EmailsOnPush'),\n ('EwmService', 'Integrations::Ewm'),\n ('ExternalWikiService', 'Integrations::ExternalWiki'),\n ('FlowdockService', 'Integrations::Flowdock'),\n ('HangoutsChatService', 'Integrations::HangoutsChat'),\n ('IrkerService', 'Integrations::Irker'),\n ('JenkinsService', 'Integrations::Jenkins'),\n ('JiraService', 'Integrations::Jira'),\n ('MattermostService', 'Integrations::Mattermost'),\n ('MattermostSlashCommandsService', 'Integrations::MattermostSlashCommands'),\n ('MicrosoftTeamsService', 'Integrations::MicrosoftTeams'),\n ('MockCiService', 'Integrations::MockCi'),\n ('MockMonitoringService', 'Integrations::MockMonitoring'),\n ('PackagistService', 'Integrations::Packagist'),\n ('PipelinesEmailService', 'Integrations::PipelinesEmail'),\n ('PivotaltrackerService', 'Integrations::Pivotaltracker'),\n ('PrometheusService', 'Integrations::Prometheus'),\n ('PushoverService', 'Integrations::Pushover'),\n ('RedmineService', 'Integrations::Redmine'),\n ('SlackService', 'Integrations::Slack'),\n ('SlackSlashCommandsService', 'Integrations::SlackSlashCommands'),\n ('TeamcityService', 'Integrations::Teamcity'),\n ('UnifyCircuitService', 'Integrations::UnifyCircuit'),\n ('YoutrackService', 'Integrations::Youtrack'),\n ('WebexTeamsService', 'Integrations::WebexTeams'),\n\n -- EE-only integrations\n ('GithubService', 'Integrations::Github'),\n ('GitlabSlackApplicationService', 'Integrations::GitlabSlackApplication')\n)\n\nUPDATE integrations SET type_new = mapping.new_type\nFROM mapping\nWHERE integrations.id = NEW.id\n AND mapping.old_type = NEW.type;\nRETURN NULL;\n\nEND\n$$ LANGUAGE PLPGSQL\n")474 -> 0.0027s475-- execute("CREATE TRIGGER trigger_type_new_on_insert\nAFTER INSERT ON integrations\nFOR EACH ROW\nEXECUTE FUNCTION integrations_set_type_new();\n")476 -> 0.0015s477== 20210721135638 AddTriggersToIntegrationsTypeNew: migrated (0.0045s) ========478 ignores types that are unknown479 #down480-- execute("CREATE OR REPLACE FUNCTION integrations_set_type_new()\nRETURNS TRIGGER AS\n$$\nBEGIN\nWITH mapping(old_type, new_type) AS (VALUES\n ('AsanaService', 'Integrations::Asana'),\n ('AssemblaService', 'Integrations::Assembla'),\n ('BambooService', 'Integrations::Bamboo'),\n ('BugzillaService', 'Integrations::Bugzilla'),\n ('BuildkiteService', 'Integrations::Buildkite'),\n ('CampfireService', 'Integrations::Campfire'),\n ('ConfluenceService', 'Integrations::Confluence'),\n ('CustomIssueTrackerService', 'Integrations::CustomIssueTracker'),\n ('DatadogService', 'Integrations::Datadog'),\n ('DiscordService', 'Integrations::Discord'),\n ('DroneCiService', 'Integrations::DroneCi'),\n ('EmailsOnPushService', 'Integrations::EmailsOnPush'),\n ('EwmService', 'Integrations::Ewm'),\n ('ExternalWikiService', 'Integrations::ExternalWiki'),\n ('FlowdockService', 'Integrations::Flowdock'),\n ('HangoutsChatService', 'Integrations::HangoutsChat'),\n ('IrkerService', 'Integrations::Irker'),\n ('JenkinsService', 'Integrations::Jenkins'),\n ('JiraService', 'Integrations::Jira'),\n ('MattermostService', 'Integrations::Mattermost'),\n ('MattermostSlashCommandsService', 'Integrations::MattermostSlashCommands'),\n ('MicrosoftTeamsService', 'Integrations::MicrosoftTeams'),\n ('MockCiService', 'Integrations::MockCi'),\n ('MockMonitoringService', 'Integrations::MockMonitoring'),\n ('PackagistService', 'Integrations::Packagist'),\n ('PipelinesEmailService', 'Integrations::PipelinesEmail'),\n ('PivotaltrackerService', 'Integrations::Pivotaltracker'),\n ('PrometheusService', 'Integrations::Prometheus'),\n ('PushoverService', 'Integrations::Pushover'),\n ('RedmineService', 'Integrations::Redmine'),\n ('SlackService', 'Integrations::Slack'),\n ('SlackSlashCommandsService', 'Integrations::SlackSlashCommands'),\n ('TeamcityService', 'Integrations::Teamcity'),\n ('UnifyCircuitService', 'Integrations::UnifyCircuit'),\n ('YoutrackService', 'Integrations::Youtrack'),\n ('WebexTeamsService', 'Integrations::WebexTeams'),\n\n -- EE-only integrations\n ('GithubService', 'Integrations::Github'),\n ('GitlabSlackApplicationService', 'Integrations::GitlabSlackApplication')\n)\n\nUPDATE integrations SET type_new = mapping.new_type\nFROM mapping\nWHERE integrations.id = NEW.id\n AND mapping.old_type = NEW.type;\nRETURN NULL;\n\nEND\n$$ LANGUAGE PLPGSQL\n")481 -> 0.0025s482-- execute("CREATE TRIGGER trigger_type_new_on_insert\nAFTER INSERT ON integrations\nFOR EACH ROW\nEXECUTE FUNCTION integrations_set_type_new();\n")483 -> 0.0022s484-- execute("DROP TRIGGER IF EXISTS trigger_type_new_on_insert ON integrations")485 -> 0.0021s486-- execute("DROP FUNCTION IF EXISTS integrations_set_type_new()")487 -> 0.0016s488 drops the INSERT trigger489CleanUpPendingBuildsTable490== 20210525075724 CleanUpPendingBuildsTable: migrating ========================491-- execute("DELETE FROM ci_pending_builds\n USING ci_builds\n WHERE ci_builds.id = ci_pending_builds.build_id\n AND ci_builds.status != 'pending'\n AND ci_builds.type = 'Ci::Build'\n AND ci_pending_builds.id BETWEEN 1 AND 3\n")492 -> 0.0022s493== 20210525075724 CleanUpPendingBuildsTable: migrated (0.0157s) ===============494 removes duplicated data from pending builds table495 when there are multiple batches496== 20210525075724 CleanUpPendingBuildsTable: migrating ========================497-- execute("DELETE FROM ci_pending_builds\n USING ci_builds\n WHERE ci_builds.id = ci_pending_builds.build_id\n AND ci_builds.status != 'pending'\n AND ci_builds.type = 'Ci::Build'\n AND ci_pending_builds.id BETWEEN 1 AND 1\n")498 -> 0.0022s499-- execute("DELETE FROM ci_pending_builds\n USING ci_builds\n WHERE ci_builds.id = ci_pending_builds.build_id\n AND ci_builds.status != 'pending'\n AND ci_builds.type = 'Ci::Build'\n AND ci_pending_builds.id BETWEEN 2 AND 2\n")500 -> 0.0022s501-- execute("DELETE FROM ci_pending_builds\n USING ci_builds\n WHERE ci_builds.id = ci_pending_builds.build_id\n AND ci_builds.status != 'pending'\n AND ci_builds.type = 'Ci::Build'\n AND ci_pending_builds.id BETWEEN 3 AND 3\n")502 -> 0.0022s503== 20210525075724 CleanUpPendingBuildsTable: migrated (0.0298s) ===============504 iterates the data correctly505AssociateExistingDastBuildsWithVariables506 when there are ci_pipelines with associated dast_profiles507 migration up508WARNING: Active Record does not support composite primary key.509dast_profiles_pipelines has composite primary key. Composite primary key is ignored.510WARNING: Active Record does not support composite primary key.511dast_profiles_pipelines has composite primary key. Composite primary key is ignored.512WARNING: Active Record does not support composite primary key.513dast_site_profiles_builds has composite primary key. Composite primary key is ignored.514 adds association of dast_site_profiles to ci_builds515 migration down516WARNING: Active Record does not support composite primary key.517dast_site_profiles_builds has composite primary key. Composite primary key is ignored.518 deletes all records in the dast_site_profiles_builds table519The application_settings (main) table has 1300 columns.520Recreating the database521Dropped database 'gitlabhq_test'522Dropped database 'gitlabhq_test_ci'523Dropped database 'gitlabhq_geo_test'524Created database 'gitlabhq_test'525Created database 'gitlabhq_test_ci'526Created database 'gitlabhq_geo_test'527Databases re-creation done in 11.049964980000368528ScheduleSecuritySettingCreation529 #up530 for EE version531== 20210730170823 ScheduleSecuritySettingCreation: migrating ==================532-- Scheduled 2 CreateSecuritySetting jobs with a maximum of 2 records per batch and an interval of 300 seconds.533The migration is expected to take at least 600 seconds. Expect all jobs to have completed after 2022-07-04 07:31:17 UTC."534== 20210730170823 ScheduleSecuritySettingCreation: migrated (0.0696s) =========535 schedules background migration job536 for FOSS version537== 20210730170823 ScheduleSecuritySettingCreation: migrating ==================538== 20210730170823 ScheduleSecuritySettingCreation: migrated (0.0004s) =========539 does not schedule any jobs540ResetJobTokenScopeEnabled541== 20210628124505 ResetJobTokenScopeEnabled: migrating ========================542-- remove_column(:project_ci_cd_settings, :job_token_scope_enabled)543 -> 0.0023s544-- add_column(:project_ci_cd_settings, :job_token_scope_enabled, :boolean, {:default=>false, :null=>false})545 -> 0.0037s546== 20210628124505 ResetJobTokenScopeEnabled: migrated (0.0151s) ===============547 migrates job_token_scope_enabled to be always false548EncryptStaticObjectsExternalStorageAuthToken549 when static_objects_external_storage_auth_token is not set550main: == 20211126115449 EncryptStaticObjectsExternalStorageAuthToken: migrating =====551main: == 20211126115449 EncryptStaticObjectsExternalStorageAuthToken: migrated (0.2901s) 552 does nothing553 when static_objects_external_storage_auth_token is set554main: == 20211126115449 EncryptStaticObjectsExternalStorageAuthToken: migrating =====555main: == 20211126115449 EncryptStaticObjectsExternalStorageAuthToken: migrated (0.5683s) 556 encrypts static_objects_external_storage_auth_token557 when static_objects_external_storage_auth_token is empty string558main: == 20211126115449 EncryptStaticObjectsExternalStorageAuthToken: migrating =====559main: == 20211126115449 EncryptStaticObjectsExternalStorageAuthToken: migrated (0.5563s) 560 does not break561CleanupOrphanProjectAccessTokens562main: == 20210914095310 CleanupOrphanProjectAccessTokens: migrating =================563main: -- index_exists?(:users, :id, {:name=>"idx_users_on_user_type_project_bots_batched", :where=>"user_type = 6", :algorithm=>:concurrently})564main: -> 0.0288s565main: -- add_index(:users, :id, {:name=>"idx_users_on_user_type_project_bots_batched", :where=>"user_type = 6", :algorithm=>:concurrently})566main: -> 0.0034s567main: -- indexes(:users)568main: -> 0.0361s569main: -- remove_index(:users, {:algorithm=>:concurrently, :name=>"idx_users_on_user_type_project_bots_batched"})570main: -> 0.0024s571main: == 20210914095310 CleanupOrphanProjectAccessTokens: migrated (0.1571s) ========572 marks all bots without memberships as deactivated573main: == 20210914095310 CleanupOrphanProjectAccessTokens: migrating =================574main: -- index_exists?(:users, :id, {:name=>"idx_users_on_user_type_project_bots_batched", :where=>"user_type = 6", :algorithm=>:concurrently})575main: -> 0.0281s576main: -- add_index(:users, :id, {:name=>"idx_users_on_user_type_project_bots_batched", :where=>"user_type = 6", :algorithm=>:concurrently})577main: -> 0.0031s578main: -- indexes(:users)579main: -> 0.0294s580main: -- remove_index(:users, {:algorithm=>:concurrently, :name=>"idx_users_on_user_type_project_bots_batched"})581main: -> 0.0020s582main: == 20210914095310 CleanupOrphanProjectAccessTokens: migrated (0.1358s) ========583 schedules for deletion all bots without memberships584CleanupBigintConversionForCiBuildsMetadata585main: == 20210907013944 CleanupBigintConversionForCiBuildsMetadata: migrating =======586main: -- remove_column(:ci_builds_metadata, "id_convert_to_bigint")587main: -> 0.0016s588main: -- remove_column(:ci_builds_metadata, "build_id_convert_to_bigint")589main: -> 0.0017s590main: == 20210907013944 CleanupBigintConversionForCiBuildsMetadata: migrated (0.0081s) 591 correctly migrates up and down592RecreateIndexSecurityCiBuildsOnNameAndIdParserFeatures593main: -- index_exists?("ci_builds", [:name, :id], {:name=>"index_security_ci_builds_on_name_and_id_parser_features"})594main: -> 0.0379s595main: -- index_exists?("ci_builds", [:name, :id], {:name=>"index_security_ci_builds_on_name_and_id_parser_features_broken"})596main: -> 0.0374s597main: == 20211005083015 RecreateIndexSecurityCiBuildsOnNameAndIdParserFeatures: migrating 598main: -- rename_index("ci_builds", "index_security_ci_builds_on_name_and_id_parser_features", "index_security_ci_builds_on_name_and_id_parser_features_broken")599main: -> 0.0011s600main: -- index_exists?("ci_builds", [:name, :id], {:name=>"index_security_ci_builds_on_name_and_id_parser_features", :where=>"(name::text = ANY (ARRAY['container_scanning'::character varying::text,\n 'dast'::character varying::text,\n 'dependency_scanning'::character varying::text,\n 'license_management'::character varying::text,\n 'sast'::character varying::text,\n 'secret_detection'::character varying::text,\n 'coverage_fuzzing'::character varying::text,\n 'license_scanning'::character varying::text])\n ) AND type::text = 'Ci::Build'::text", :algorithm=>:concurrently})601main: -> 0.0304s602main: -- add_index_options("ci_builds", [:name, :id], {:name=>"index_security_ci_builds_on_name_and_id_parser_features", :where=>"(name::text = ANY (ARRAY['container_scanning'::character varying::text,\n 'dast'::character varying::text,\n 'dependency_scanning'::character varying::text,\n 'license_management'::character varying::text,\n 'sast'::character varying::text,\n 'secret_detection'::character varying::text,\n 'coverage_fuzzing'::character varying::text,\n 'license_scanning'::character varying::text])\n ) AND type::text = 'Ci::Build'::text", :algorithm=>:concurrently})603main: -> 0.0003s604main: == 20211005083015 RecreateIndexSecurityCiBuildsOnNameAndIdParserFeatures: migrated (0.0491s) 605main: -- index_exists?("ci_builds", [:name, :id], {:name=>"index_security_ci_builds_on_name_and_id_parser_features"})606main: -> 0.0339s607main: -- index_exists?("ci_builds", [:name, :id], {:name=>"index_security_ci_builds_on_name_and_id_parser_features_broken"})608main: -> 0.0321s609main: -- index_exists?("ci_builds", [:name, :id], {:name=>"index_security_ci_builds_on_name_and_id_parser_features"})610main: -> 0.0347s611main: -- index_exists?("ci_builds", [:name, :id], {:name=>"index_security_ci_builds_on_name_and_id_parser_features_broken"})612main: -> 0.0310s613 recreates index614ConsumeRemainingUserNamespaceJobs615 when Namespaces with nil `type` still exist616main: == 20211101222614 ConsumeRemainingUserNamespaceJobs: migrating ================617main: -- change_column_null(:namespaces, :type, false)618main: -> 0.0019s619main: == 20211101222614 ConsumeRemainingUserNamespaceJobs: migrated (0.0853s) =======620 steals sidekiq jobs from BackfillUserNamespace background migration621main: == 20211101222614 ConsumeRemainingUserNamespaceJobs: migrating ================622main: -- change_column_null(:namespaces, :type, false)623main: -> 0.0019s624main: == 20211101222614 ConsumeRemainingUserNamespaceJobs: migrated (0.0821s) =======625 migrates namespaces without type626MigrateRemainingU2fRegistrations627main: == 20211117084814 MigrateRemainingU2fRegistrations: migrating =================628main: == 20211117084814 MigrateRemainingU2fRegistrations: migrated (0.0518s) ========629 correctly migrates u2f registrations previously not migrated630main: == 20211117084814 MigrateRemainingU2fRegistrations: migrating =================631main: == 20211117084814 MigrateRemainingU2fRegistrations: migrated (0.0598s) ========632 migrates all valid u2f registrations depite errors633BackfillSequenceColumnForSprintsTable634 #up635main: -- execute(" UPDATE sprints\n SET sequence=t.row_number\n FROM (\n SELECT id, row_number() OVER (PARTITION BY iterations_cadence_id ORDER BY start_date)\n FROM sprints as s1\n WHERE s1.iterations_cadence_id IS NOT NULL\n ) as t\n WHERE t.id=sprints.id AND (sprints.sequence IS NULL OR sprints.sequence <> t.row_number)\n")636main: -> 0.0036s637main: -- execute(" UPDATE sprints\n SET sequence=t.row_number\n FROM (\n SELECT id, row_number() OVER (PARTITION BY iterations_cadence_id ORDER BY start_date)\n FROM sprints as s1\n WHERE s1.iterations_cadence_id IS NOT NULL\n ) as t\n WHERE t.id=sprints.id AND (sprints.sequence IS NULL OR sprints.sequence <> t.row_number)\n")638main: -> 0.0030s639 correctly sets the sequence attribute with idempotency640FinaliseProjectNamespaceMembers641 #up642 when migration is missing643main: == 20220628012902 FinaliseProjectNamespaceMembers: migrating ==================644main: == 20220628012902 FinaliseProjectNamespaceMembers: migrated (0.0135s) =========645 warns migration not found646 with migration present647 when migration finished successfully648main: == 20220628012902 FinaliseProjectNamespaceMembers: migrating ==================649main: == 20220628012902 FinaliseProjectNamespaceMembers: migrated (0.0250s) =========650 does not raise exception651 with different migration statuses652 status: 0, description: "paused"653 behaves like finalizes the migration654 finalizes the migration655 status: 1, description: "active"656 behaves like finalizes the migration657 finalizes the migration658 status: 4, description: "failed"659 behaves like finalizes the migration660 finalizes the migration661 status: 5, description: "finalizing"662 behaves like finalizes the migration663 finalizes the migration664Gitlab::BackgroundMigration::BackfillWorkItemTypeIdForIssues665 sets work_item_type_id only for the given type666 tracks timings of queries667 when database timeouts668 error_class: ActiveRecord::StatementTimeout669 retries on timeout error670 error_class: ActiveRecord::QueryCanceled671 retries on timeout error672The application_settings (main) table has 1203 columns.673Recreating the database674Dropped database 'gitlabhq_test'675Dropped database 'gitlabhq_test_ci'676Dropped database 'gitlabhq_geo_test'677Created database 'gitlabhq_test'678Created database 'gitlabhq_test_ci'679Created database 'gitlabhq_geo_test'680Databases re-creation done in 11.294184468000822681AddSecurityTrainingProviders682main: == 20220305223212 AddSecurityTrainingProviders: migrating =====================683main: == 20220305223212 AddSecurityTrainingProviders: migrated (0.0379s) ============684 creates default data685CreateNotNullConstraintReleasesTag686main: -- current_schema()687main: -> 0.0008s688main: -- current_schema()689main: -> 0.0011s690main: -- execute("ALTER TABLE releases\nADD CONSTRAINT releases_not_null_tag\nCHECK ( tag IS NOT NULL )\nNOT VALID;\n")691main: -> 0.0015s692 adds a check constraint to tags693ScheduleMigratePersonalNamespaceProjectMaintainerToOwner694 #up695main: == 20220208080921 ScheduleMigratePersonalNamespaceProjectMaintainerToOwner: migrating 696main: == 20220208080921 ScheduleMigratePersonalNamespaceProjectMaintainerToOwner: migrated (0.0793s) 697 schedules background jobs for each batch of members698UpdatePagesOnboardingState699 #up700 sets the onboarding_complete attribute to the value of deployed701 #down702 sets all onboarding_complete attributes to false703RemoveNotNullContraintOnTitleFromSprints704 #down705main: -- change_column_null(:sprints, :title, true)706main: -> 0.0014s707main: -- execute("UPDATE sprints SET title = id WHERE title IS NULL\n")708main: -> 0.0020s709main: -- change_column_null(:sprints, :title, false)710main: -> 0.0017s711 removes null titles by setting them with ids712Gitlab::BackgroundMigration::FixDuplicateProjectNameAndPath713 #up714 backfills namespace_id for the selected records715Gitlab::BackgroundMigration::BackfillProjectSettings716 backfills project settings when it does not exist717ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects718 on gitlab.com719 #up720main: == 20220520040416 ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects: migrating 721main: == 20220520040416 ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects: migrated (0.0654s) 722 schedules background jobs for each batch of projects723 #down724main: == 20220520040416 ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects: migrating 725main: == 20220520040416 ScheduleSetLegacyOpenSourceLicenseAvailableForNonPublicProjects: migrated (0.0715s) 726 deletes all batched migration records727 on self-managed instance728 #up729 does not schedule background job730 #down731 does not delete background job732ScheduleBackfillProjectMemberNamespaceId733 #up734main: == 20220516054011 ScheduleBackfillProjectMemberNamespaceId: migrating =========735main: == 20220516054011 ScheduleBackfillProjectMemberNamespaceId: migrated (0.0798s) 736 schedules background jobs for each batch of project members737 #down738main: == 20220516054011 ScheduleBackfillProjectMemberNamespaceId: migrating =========739main: == 20220516054011 ScheduleBackfillProjectMemberNamespaceId: migrated (0.0599s) 740 deletes all batched migration records741FixAutomaticIterationsCadencesStartDate742 #up743main: == 20220505044348 FixAutomaticIterationsCadencesStartDate: migrating ==========744main: -- execute("UPDATE iterations_cadences\nSET start_date=COALESCE(\n (\n SELECT start_date\n FROM sprints\n WHERE iterations_cadences.id=sprints.iterations_cadence_id\n ORDER BY sprints.start_date ASC\n LIMIT 1\n ),\n start_date\n)\nWHERE iterations_cadences.automatic=true;\n")745main: -> 0.0040s746main: == 20220505044348 FixAutomaticIterationsCadencesStartDate: migrated (0.0044s) =747 updates automatic iterations_cadence records to use start dates of their earliest sprint records748Gitlab::BackgroundMigration::ResetTooManyTagsSkippedRegistryImports749 #up750 resets only qualified container repositories751Gitlab::BackgroundMigration::PopulateOperationVisibilityPermissionsFromOperations752 updates all project settings records from their operations_access_level753Gitlab::BackgroundMigration::BatchingStrategies::BaseStrategy#next_batch754 #next_batch755 raises an error if not overridden by a subclass756Knapsack report was generated. Preview:757{758 "spec/lib/gitlab/background_migration/backfill_snippet_repositories_spec.rb": 185.50007194299997,759 "spec/migrations/remove_hipchat_service_records_spec.rb": 57.38206865600023,760 "spec/lib/gitlab/background_migration/fix_first_mentioned_in_commit_at_spec.rb": 55.545781302999785,761 "spec/migrations/set_default_job_token_scope_true_spec.rb": 43.37968151299992,762 "spec/migrations/20210511142748_schedule_drop_invalid_vulnerabilities2_spec.rb": 52.162110209000275,763 "spec/migrations/add_triggers_to_integrations_type_new_spec.rb": 52.772401432999686,764 "spec/migrations/clean_up_pending_builds_table_spec.rb": 54.885006041999986,765 "spec/migrations/associate_existing_dast_builds_with_variables_spec.rb": 52.410468846000185,766 "spec/migrations/schedule_security_setting_creation_spec.rb": 46.5664934259994,767 "spec/migrations/reset_job_token_scope_enabled_spec.rb": 48.48700744300004,768 "spec/migrations/20211126115449_encrypt_static_objects_external_storage_auth_token_spec.rb": 40.11263265599973,769 "spec/migrations/20210914095310_cleanup_orphan_project_access_tokens_spec.rb": 40.39581544500015,770 "spec/migrations/20210907013944_cleanup_bigint_conversion_for_ci_builds_metadata_spec.rb": 39.97101926300002,771 "spec/migrations/recreate_index_security_ci_builds_on_name_and_id_parser_features_spec.rb": 35.77750548299991,772 "spec/migrations/20211101222614_consume_remaining_user_namespace_jobs_spec.rb": 32.551726523999605,773 "spec/migrations/20211117084814_migrate_remaining_u2f_registrations_spec.rb": 31.985827946000427,774 "spec/migrations/20211130165043_backfill_sequence_column_for_sprints_table_spec.rb": 28.38011846200061,775 "spec/migrations/20220628012902_finalise_project_namespace_members_spec.rb": 20.46402741899965,776 "spec/lib/gitlab/background_migration/backfill_work_item_type_id_for_issues_spec.rb": 24.264218393999727,777 "spec/migrations/20220305223212_add_security_training_providers_spec.rb": 17.28973813600078,778 "spec/migrations/20220222192524_create_not_null_constraint_releases_tag_spec.rb": 17.515904914999737,779 "spec/migrations/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner_spec.rb": 20.143682257000364,780 "spec/migrations/20220322132242_update_pages_onboarding_state_spec.rb": 18.94989924499987,781 "spec/migrations/remove_not_null_contraint_on_title_from_sprints_spec.rb": 17.135393589999694,782 "spec/lib/gitlab/background_migration/fix_duplicate_project_name_and_path_spec.rb": 14.963250505999895,783 "spec/lib/gitlab/background_migration/backfill_project_settings_spec.rb": 14.987110779999966,784 "spec/migrations/20220520040416_schedule_set_legacy_open_source_license_available_for_non_public_projects_spec.rb": 17.992434830999628,785 "spec/migrations/20220416054011_schedule_backfill_project_member_namespace_id_spec.rb": 12.914989746000174,786 "spec/migrations/20220505044348_fix_automatic_iterations_cadences_start_date_spec.rb": 10.69719623399942,787 "spec/lib/gitlab/background_migration/reset_too_many_tags_skipped_registry_imports_spec.rb": 10.892411175999769,788 "spec/lib/gitlab/background_migration/populate_operation_visibility_permissions_from_operations_spec.rb": 4.6747810220003885,789 "spec/lib/gitlab/background_migration/batching_strategies/base_strategy_spec.rb": 4.0993831429996135790}791Knapsack global time execution for tests: 18m 45s792Finished in 20 minutes 21 seconds (files took 1 minute 16.65 seconds to load)793102 examples, 0 failures794RSpec exited with 0.795No examples to retry, congrats!797Not uploading cache ruby-gems-debian-bullseye-ruby-2.7-10 due to policy798Not uploading cache gitaly-ruby-gems-debian-bullseye-ruby-2.7-10 due to policy800Uploading artifacts...801coverage/: found 5 matching files and directories 802crystalball/: found 2 matching files and directories 803WARNING: deprecations/: no matching files. Ensure that the artifact path is relative to the working directory 804knapsack/: found 3 matching files and directories 805rspec/: found 8 matching files and directories 806WARNING: tmp/capybara/: no matching files. Ensure that the artifact path is relative to the working directory 807log/*.log: found 15 matching files and directories 808WARNING: Upload request redirected location=https://gitlab.com/api/v4/jobs/2673336890/artifacts?artifact_format=zip&artifact_type=archive&expire_in=31d new-url=https://gitlab.com809WARNING: Retrying... context=artifacts-uploader error=request redirected810Uploading artifacts as "archive" to coordinator... 201 Created id=2673336890 responseStatus=201 Created token=4xCXwf5x811Uploading artifacts...812rspec/junit_rspec.xml: found 1 matching files and directories 813WARNING: Upload request redirected location=https://gitlab.com/api/v4/jobs/2673336890/artifacts?artifact_format=gzip&artifact_type=junit&expire_in=31d new-url=https://gitlab.com814WARNING: Retrying... context=artifacts-uploader error=request redirected815Uploading artifacts as "junit" to coordinator... 201 Created id=2673336890 responseStatus=201 Created token=4xCXwf5x817Job succeeded