gitlab-org--gitlab-foss/lib
Rémy Coutable 50124864e3 Merge branch 'artifacts-from-ref-and-build-name-api' into 'master'
Simpler two queries than one JOIN with subquery

This is a follow up from !5347

Originally it was:

``` ruby
pipeline = pipelines.latest_successful_for(ref)
builds.where(pipeline: pipeline).latest.with_artifacts
```

However MySQL would complain that we can't use `IN` against a subquery which has `LIMIT`. Using `INNER JOIN` would be a workaround, however, doing that is too complicated in current version of Rails.

So let's just use two queries in this case.

Closes #14419

See merge request !5388
2016-07-22 08:46:04 +00:00
..
api Merge branch 'artifacts-from-ref-and-build-name-api' into 'master' 2016-07-22 08:46:04 +00:00
assets
backup Refactor repository paths handling to allow multiple git mount points 2016-06-29 22:30:31 -04:00
banzai Retrieve rendered HTML from cache in one request 2016-07-21 21:17:25 +02:00
ci Improve code design 2016-07-19 14:58:17 +02:00
container_registry Make rubocop happy 2016-07-15 18:05:39 +02:00
gitlab Merge branch 'discussion-model' into 'master' 2016-07-21 17:56:23 +00:00
json_web_token Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
omni_auth
rouge/formatters use %(...) and %[...] in favor of %<...> 2016-07-14 22:43:49 -07:00
support Defend against 'Host' header injection 2016-07-12 19:50:20 +02:00
tasks Merge branch 'migration-downtime-tags' into 'master' 2016-07-20 17:03:04 +00:00
banzai.rb Object renderer read_multi rendered entries from Cache 2016-07-12 14:35:29 +02:00
disable_email_interceptor.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
event_filter.rb Revert "Fix merge conflicts - squashed commit" 2016-06-03 11:10:17 +02:00
extracts_path.rb
file_size_validator.rb
file_streamer.rb
gitlab.rb Update `Gitlab.com?` to support staging 2016-06-27 15:10:36 -04:00
gt_one_coercion.rb
repository_cache.rb
static_model.rb
unfold_form.rb
uploaded_file.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
version_check.rb