[rails5] ./spec/lib/gitlab/database/subquery_spec.rb is failing
https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/100014876
1) Gitlab::Database::Subquery.self_join allows you to delete_all rows with WHERE and LIMIT
Failure/Error: described_class.self_join(Event.where('id < ?', events[5]).recent.limit(2)).delete_all
ActiveRecord::StatementInvalid:
PG::SyntaxError: ERROR: syntax error at or near ")"
LINE 1: ...HERE (id < 156) ORDER BY "events"."id" DESC LIMIT ) t2 ON "e...
^
: DELETE FROM "events" WHERE "events"."id" IN (SELECT "events"."id" FROM "events" INNER JOIN (SELECT "events".* FROM "events" WHERE (id < 156) ORDER BY "events"."id" DESC LIMIT ) t2 ON "events"."id" = t2."id")
# ./spec/lib/gitlab/database/subquery_spec.rb:13:in `block (4 levels) in <top (required)>'
# ./spec/lib/gitlab/database/subquery_spec.rb:12:in `block (3 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# PG::SyntaxError:
# ERROR: syntax error at or near ")"
# LINE 1: ...HERE (id < 156) ORDER BY "events"."id" DESC LIMIT ) t2 ON "e...
# ^
# ./spec/lib/gitlab/database/subquery_spec.rb:13:in `block (4 levels) in <top (required)>'
Finished in 22 minutes 2 seconds (files took 16.8 seconds to load)
1433 examples, 1 failure, 5 pending
Failed examples:
rspec ./spec/lib/gitlab/database/subquery_spec.rb:9 # Gitlab::Database::Subquery.self_join allows you to delete_all rows with WHERE and LIMIT
reproducible locally with BUNDLE_GEMFILE=Gemfile.rails5 RAILS5=1 bundle exec rspec ./spec/lib/gitlab/database/subquery_spec.rb