We see in #27387 that a call to `polymorphic_path` will cause duplicate
SELECT route calls for each merge request in a milestone. This happens
because calling `project.namespace.becomes(Namespace)` will instantiate
a new instance of a Namespace for each merge request, which causes a N+1
query on the routes table. This change caches the state of the route by
the specific class and ID, which dramatically eliminates duplicate work.
* upstream/master: (197 commits)
Add text to break up diagrams
Implement review comments from @DouweM for !10467.
Fix rubocop offence
Linking to edit file directly
Optimise trace handling code to use streaming instead of full read
Use config.toml to configure Gitaly
Fix indexes in container repositories table
Recent search history for issues
Fix rubocop
Use change direction in spec
Use be_pending
Improve trigger_schedule.rb
Implement a offset calculation on cron_parser_spec
Clean up trigger_schedule_worker_spec.rb
Improve instantiate recursion in cron_parser.rb
Fix unnecessary changes in schema.rb
Add empty line in cron_parser.rb
Use parenthesis for respond_to :ref
Define next_time as let in trigger_schedule_spec
Remove next_run_at: nil from trigger_schedule_spec
...
... when the user is destroyed.
1. Normally, for a given awardable and award emoji name, a user is only allowed
to create a single award emoji.
2. This validation needs to be removed for ghost users, since:
- User A and User B have created award emoji - with the same name and against
the same awardable
- User A is deleted. Their award emoji is moved to the ghost user
- User B is deleted. Their award emoji needs to be moved to the ghost user.
However, this breaks the uniqueness validation, since the ghost user is
only allowed to have one award emoji of a given name for a given awardable
fix changelog MR reference
add non-HEAD builds finder and add `created` pipelines to scope
add spec for auto-cancel non-HEAD pipelines and refactor create_pipeline_service_spec
more refactoring for spec
adds option for auto-cancel into CI/CD settings
fix spec to new configuration
fix rubocop
fix schema.rb
fix schema.rb
replace Gitlab 9.0 with 9.1 in doc
change wording on pipeline settings
added auto_canceled_by field as identifier of autocancel subject
remove unnecessary index
replace service with retry_lock
replace auto_cancel_pending_pipelines boolean setting with integer (and enum in model)
fix schema.rb
fix schema.rb
remove projekt attribute and clean up spec
clean up spec withcouple of shared examples
added spec for "It does not cancel current pipeline" scenario
add some specs to auto-cancel
add spec for another branch pipelines