Failure in api/2_plan/epics_milestone_dates_spec.rb | Plan Epics milestone dates API changes epic dates when updating milestones
### Full description Plan Epics milestone dates API changes epic dates when updating milestones ### File path ./qa/specs/features/ee/api/2_plan/epics_milestone_dates_spec.rb ### Stack trace ``` Failure/Error: @group_id = Resource::Group.fabricate_via_api!.id QA::Resource::ApiFabricator::InternalServerError: Failed to GET http://gitlab-gitaly-cluster.test/api/v4/groups/gitlab-qa-sandbox-group%2Fqa-test-2021-01-14-00-18-47-9ecea361730ec062?private_token=[****] - (500): `{"message":"500 Internal Server Error"}`. ``` First happened in https://gitlab.com/gitlab-org/gitlab-qa-mirror/-/jobs/962046181. ### Local testing findings Fails locally with this error in the development logs: ``` Gitlab::GitalyClient::TooManyInvocationsError (GitalyClient#call called 31 times from single request. Potential n+1? The following call site called into Gitaly 10 times: lib/gitlab/gitaly_client.rb:171:in `execute' lib/gitlab/gitaly_client/call.rb:18:in `block in call' lib/gitlab/gitaly_client/call.rb:55:in `recording_request' lib/gitlab/gitaly_client/call.rb:17:in `call' lib/gitlab/gitaly_client.rb:167:in `call' lib/gitlab/gitaly_client/ref_service.rb:39:in `default_branch_name' lib/gitlab/git/repository.rb:90:in `root_ref' app/models/repository.rb:516:in `root_ref' lib/gitlab/repository_cache_adapter.rb:92:in `block (2 levels) in cache_method_asymmetrically' lib/gitlab/repository_cache.rb:44:in `fetch_without_caching_false' lib/gitlab/repository_cache_adapter.rb:187:in `block (2 levels) in cache_method_output_asymmetrically' lib/gitlab/safe_request_store.rb:12:in `fetch' lib/gitlab/repository_cache.rb:25:in `fetch' lib/gitlab/repository_cache_adapter.rb:186:in `block in cache_method_output_asymmetrically' lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize' lib/gitlab/repository_cache_adapter.rb:200:in `block in memoize_method_output' lib/gitlab/repository_cache_adapter.rb:209:in `no_repository_fallback' lib/gitlab/repository_cache_adapter.rb:199:in `memoize_method_output' lib/gitlab/repository_cache_adapter.rb:185:in `cache_method_output_asymmetrically' lib/gitlab/repository_cache_adapter.rb:91:in `block in cache_method_asymmetrically' app/models/concerns/has_repository.rb:74:in `default_branch' lib/gitlab/json.rb:110:in `dump' lib/gitlab/json.rb:110:in `adapter_dump' lib/gitlab/json.rb:42:in `dump' lib/gitlab/json.rb:193:in `call' ee/lib/gitlab/ip_address_state.rb:10:in `with' lib/api/api_guard.rb:213:in `call' lib/gitlab/jira/middleware.rb:19:in `call' ): ``` To reproduce on GDK: 1. In the gdk directory run `gdk restart` 1. Tail the logs in the `gitlab` directory with `tail -f log/development.log` 1. Then in the `gitlab/qa` directory run (update address if necessary) ``` bundle exec bin/qa Test::Instance::All http://192.168.254.28:3000/ -- qa/specs/features/ee/api/2_plan/epics_milestone_dates_spec.rb ``` If the test is run again, it passes until `gdk restart` is run again.
issue