Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Merge requests
  • !1495

Attempt to fix random CI failures

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Pablo Brasero requested to merge github/fork/pablobm/fix-random-ci-failures into master Dec 14, 2019
  • Overview 19
  • Commits 1
  • Pipelines 0
  • Changes 1

We get frequent random CI failures with errors on feature specs, like the following:

Failures:

  1) Search admin searches with an unknown filter
     Failure/Error: DatabaseCleaner.clean

     ActiveRecord::StatementInvalid:
       PG::TRDeadlockDetected: ERROR:  deadlock detected
       DETAIL:  Process 12270 waits for AccessExclusiveLock on relation 16412 of database 16386; blocked by process 12192.
       Process 12192 waits for AccessShareLock on relation 16400 of database 16386; blocked by process 12270.
       HINT:  See server log for query details.
       : TRUNCATE TABLE "public"."blog_posts", "public"."series", "public"."countries", "public"."log_entries", "public"."payments", "public"."product_meta_tags", "public"."customers", "public"."products", "public"."orders", "public"."line_items" RESTART IDENTITY CASCADE;
     # ./spec/support/database_cleaner.rb:19:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # PG::TRDeadlockDetected:
     #   ERROR:  deadlock detected
     #   DETAIL:  Process 12270 waits for AccessExclusiveLock on relation 16412 of database 16386; blocked by process 12192.
     #   Process 12192 waits for AccessShareLock on relation 16400 of database 16386; blocked by process 12270.
     #   HINT:  See server log for query details.
     #   ./spec/support/database_cleaner.rb:19:in `block (2 levels) in <top (required)>'

Finished in 29.41 seconds (files took 3.65 seconds to load)
418 examples, 1 failure

This may or may not be related to DatabaseCleaner. As an attempt to fix it, I'm trying this configuration, copied straight from their documentation at https://github.com/DatabaseCleaner/database_cleaner/blob/v1.7.0/README.markdown

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/pablobm/fix-random-ci-failures