Skip to content

Unquarantine and create project with refind

Jennifer Li requested to merge jennli-merge_requests_spec-fix into master

What does this MR do and why?

Resolves flakiness in spec/requests/api/merge_requests_spec.rb as reported in Multiple failures RSpec tests ActiveRecord::Rec... (#418757 - closed) and was quarantined in incident: gitlab-org/quality/engineering-productivity/master-broken-incidents#3097 (closed) in rspec integration pg14 4/12

1) API::MergeRequests GET /projects/:id/merge_requests/:merge_request_iid/merge_ref returns the generated ID from the merge service in case of success
     Failure/Error: connection.public_send(...)

     ActiveRecord::InvalidForeignKey:
       PG::ForeignKeyViolation: ERROR:  insert or update on table "internal_ids" violates foreign key constraint "fk_rails_f7d46b66c6"
       DETAIL:  Key (project_id)=(806) is not present in table "projects

The fix was discussed in !127057 (comment 1480432360)

Re: #418757 (closed)

Test performance impact:

  • before: "spec/requests/api/merge_requests_spec.rb": 714.0921269240007

  • after: "spec/requests/api/merge_requests_spec.rb": 405.3930360739996

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jennifer Li

Merge request reports

Loading