gitlab-org--gitlab-foss/lib/api
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.rb Add Todos API 2016-07-01 10:49:34 +02:00
api_guard.rb
award_emoji.rb Fix not normalized emoji paths 2016-07-14 08:51:00 +02:00
branches.rb Simplify entities for branches and tags API 2016-07-19 13:41:32 +02:00
builds.rb Also fix the URL in the comment 2016-07-21 19:26:58 +08:00
commit_statuses.rb Replace parse_boolean with to_boolean 2016-07-20 08:55:44 +02:00
commits.rb
deploy_keys.rb Change `return`s for `next`s to please rubocop (behaviour is the same) 2016-07-20 13:39:34 -04:00
entities.rb Merge branch 'email-domain-blacklist' into 'master' 2016-07-20 20:26:00 +00:00
files.rb
group_members.rb Enable Style/SpaceAfterComma Rubocop cop 2016-06-29 15:23:44 +02:00
groups.rb
helpers.rb Replace parse_boolean with to_boolean 2016-07-20 08:55:44 +02:00
internal.rb Fix a bug where the project's repository path was returned instead of the wiki path 2016-07-15 21:31:26 -04:00
issues.rb API: Expose due_date for issues 2016-07-12 17:59:21 +02:00
keys.rb
labels.rb
license_templates.rb Rename Licenses API to License Templates API 2016-06-27 14:42:05 -05:00
merge_requests.rb Replace parse_boolean with to_boolean 2016-07-20 08:55:44 +02:00
milestones.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
namespaces.rb
notes.rb Sort API endpoints and implement feedback 2016-06-17 20:08:16 +02:00
project_hooks.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
project_members.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
project_snippets.rb
projects.rb Replace parse_boolean with to_boolean 2016-07-20 08:55:44 +02:00
repositories.rb
runners.rb Return the association and check it in controller instead: 2016-06-14 23:11:43 +08:00
services.rb Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
session.rb Improve Gitlab::Auth method names 2016-06-10 14:51:16 +02:00
settings.rb
sidekiq_metrics.rb Fixed Rubocop error 2016-06-17 11:16:25 -05:00
subscriptions.rb
system_hooks.rb
tags.rb Ensure that branch and tag names are given in API 2016-06-30 13:46:35 +02:00
templates.rb fixup! override content method 2016-06-20 14:48:28 -05:00
todos.rb Return the number of marked todos 2016-07-19 13:09:57 +02:00
triggers.rb
users.rb
variables.rb