<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/lib/api, branch zj-grape-keys</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>GrapeDSL for Keys endpoint</title>
<updated>2016-10-01T09:11:41+00:00</updated>
<author>
<name>Z.J. van de Weg</name>
<email>zegerjan@gitlab.com</email>
</author>
<published>2016-09-13T18:55:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=dd088d14bb51e9c0baee013b9d3b21a12a768051'/>
<id>dd088d14bb51e9c0baee013b9d3b21a12a768051</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '15356-filters-should-change-issue-counts' into 'master'</title>
<updated>2016-09-30T11:11:04+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>robert@gitlab.com</email>
</author>
<published>2016-09-30T11:11:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=6591b594d4907be0c235a9c05e40ac5bbb995d94'/>
<id>6591b594d4907be0c235a9c05e40ac5bbb995d94</id>
<content type='text'>

Take filters in account in issuable counters

## What does this MR do?

This merge request ensure we display issuable counters that take in account all the selected filters, solving #15356.

## Are there points in the code the reviewer needs to double check?

There was an issue (#22414) in the original implementation (!4960) when more than one label was selected because calling `#count` when the ActiveRecordRelation contains a `.group` returns an OrderedHash. This merge request relies on [how Kaminari handle this case](https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/models/active_record_relation_methods.rb#L24-L30).

A few things to note:
- The `COUNT` query issued by Kaminari for the pagination is now cached because it's already run by `ApplicationHelper#state_filters_text_for`, so in the end we issue one less SQL query than before;
- In the case when more than one label are selected, the `COUNT` queries return an OrderedHash in the form `{ ISSUABLE_ID =&gt; COUNT_OF_SELECTED_FILTERS }` on which `#count` is called: this drawback is already in place (for instance when loading https://gitlab.com/gitlab-org/gitlab-ce/issues?scope=all&amp;state=all&amp;utf8=%E2%9C%93&amp;label_name%5B%5D=bug&amp;label_name%5B%5D=regression) since that's how Kaminari solves this, **the difference is that now we do that two more times for the two states that are not currently selected**. I will let the ~Performance team decide if that's something acceptable or not, otherwise we will have to find another solution...
- The queries that count the # of issuable are a bit more complex than before, from:

    ```
   (0.6ms)  SELECT COUNT(*) FROM "issues" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = $1 AND ("issues"."state" IN ('opened','reopened'))  [["project_id", 2]]
   (0.2ms)  SELECT COUNT(*) FROM "issues" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = $1 AND ("issues"."state" IN ('closed'))  [["project_id", 2]]
   (0.2ms)  SELECT COUNT(*) FROM "issues" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = $1  [["project_id", 2]]
    ```

    to

    ```
   (0.7ms)  SELECT COUNT(*) AS count_all, "issues"."id" AS issues_id FROM "issues" INNER JOIN "label_links" ON "label_links"."target_id" = "issues"."id" AND "label_links"."target_type" = $1 INNER JOIN "labels" ON "labels"."id" = "label_links"."label_id" WHERE "issues"."deleted_at" IS NULL AND ("issues"."state" IN ('opened','reopened')) AND "issues"."project_id" = 2 AND "labels"."title" IN ('bug', 'discussion') AND "labels"."project_id" = 2 GROUP BY "issues"."id" HAVING COUNT(DISTINCT labels.title) = 2  [["target_type", "Issue"]]
   (0.5ms)  SELECT COUNT(*) AS count_all, "issues"."id" AS issues_id FROM "issues" INNER JOIN "label_links" ON "label_links"."target_id" = "issues"."id" AND "label_links"."target_type" = $1 INNER JOIN "labels" ON "labels"."id" = "label_links"."label_id" WHERE "issues"."deleted_at" IS NULL AND ("issues"."state" IN ('closed')) AND "issues"."project_id" = 2 AND "labels"."title" IN ('bug', 'discussion') AND "labels"."project_id" = 2 GROUP BY "issues"."id" HAVING COUNT(DISTINCT labels.title) = 2  [["target_type", "Issue"]]
   (0.5ms)  SELECT COUNT(*) AS count_all, "issues"."id" AS issues_id FROM "issues" INNER JOIN "label_links" ON "label_links"."target_id" = "issues"."id" AND "label_links"."target_type" = $1 INNER JOIN "labels" ON "labels"."id" = "label_links"."label_id" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = 2 AND "labels"."title" IN ('bug', 'discussion') AND "labels"."project_id" = 2 GROUP BY "issues"."id" HAVING COUNT(DISTINCT labels.title) = 2  [["target_type", "Issue"]]
    ```
- We could cache the counters for a few minutes? The key could be `PROJECT_ID-ISSUABLE_TYPE-PARAMS`.

A few possible arguments in favor of "it's an acceptable solution":
- most of the time people filter with a single label =&gt; no performance problem here
- when filtering with more than one label, usually the result set is reduced, limiting the performance issues 

## What are the relevant issue numbers?

Closes #15356

See merge request !6496</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Take filters in account in issuable counters

## What does this MR do?

This merge request ensure we display issuable counters that take in account all the selected filters, solving #15356.

## Are there points in the code the reviewer needs to double check?

There was an issue (#22414) in the original implementation (!4960) when more than one label was selected because calling `#count` when the ActiveRecordRelation contains a `.group` returns an OrderedHash. This merge request relies on [how Kaminari handle this case](https://github.com/amatsuda/kaminari/blob/master/lib/kaminari/models/active_record_relation_methods.rb#L24-L30).

A few things to note:
- The `COUNT` query issued by Kaminari for the pagination is now cached because it's already run by `ApplicationHelper#state_filters_text_for`, so in the end we issue one less SQL query than before;
- In the case when more than one label are selected, the `COUNT` queries return an OrderedHash in the form `{ ISSUABLE_ID =&gt; COUNT_OF_SELECTED_FILTERS }` on which `#count` is called: this drawback is already in place (for instance when loading https://gitlab.com/gitlab-org/gitlab-ce/issues?scope=all&amp;state=all&amp;utf8=%E2%9C%93&amp;label_name%5B%5D=bug&amp;label_name%5B%5D=regression) since that's how Kaminari solves this, **the difference is that now we do that two more times for the two states that are not currently selected**. I will let the ~Performance team decide if that's something acceptable or not, otherwise we will have to find another solution...
- The queries that count the # of issuable are a bit more complex than before, from:

    ```
   (0.6ms)  SELECT COUNT(*) FROM "issues" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = $1 AND ("issues"."state" IN ('opened','reopened'))  [["project_id", 2]]
   (0.2ms)  SELECT COUNT(*) FROM "issues" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = $1 AND ("issues"."state" IN ('closed'))  [["project_id", 2]]
   (0.2ms)  SELECT COUNT(*) FROM "issues" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = $1  [["project_id", 2]]
    ```

    to

    ```
   (0.7ms)  SELECT COUNT(*) AS count_all, "issues"."id" AS issues_id FROM "issues" INNER JOIN "label_links" ON "label_links"."target_id" = "issues"."id" AND "label_links"."target_type" = $1 INNER JOIN "labels" ON "labels"."id" = "label_links"."label_id" WHERE "issues"."deleted_at" IS NULL AND ("issues"."state" IN ('opened','reopened')) AND "issues"."project_id" = 2 AND "labels"."title" IN ('bug', 'discussion') AND "labels"."project_id" = 2 GROUP BY "issues"."id" HAVING COUNT(DISTINCT labels.title) = 2  [["target_type", "Issue"]]
   (0.5ms)  SELECT COUNT(*) AS count_all, "issues"."id" AS issues_id FROM "issues" INNER JOIN "label_links" ON "label_links"."target_id" = "issues"."id" AND "label_links"."target_type" = $1 INNER JOIN "labels" ON "labels"."id" = "label_links"."label_id" WHERE "issues"."deleted_at" IS NULL AND ("issues"."state" IN ('closed')) AND "issues"."project_id" = 2 AND "labels"."title" IN ('bug', 'discussion') AND "labels"."project_id" = 2 GROUP BY "issues"."id" HAVING COUNT(DISTINCT labels.title) = 2  [["target_type", "Issue"]]
   (0.5ms)  SELECT COUNT(*) AS count_all, "issues"."id" AS issues_id FROM "issues" INNER JOIN "label_links" ON "label_links"."target_id" = "issues"."id" AND "label_links"."target_type" = $1 INNER JOIN "labels" ON "labels"."id" = "label_links"."label_id" WHERE "issues"."deleted_at" IS NULL AND "issues"."project_id" = 2 AND "labels"."title" IN ('bug', 'discussion') AND "labels"."project_id" = 2 GROUP BY "issues"."id" HAVING COUNT(DISTINCT labels.title) = 2  [["target_type", "Issue"]]
    ```
- We could cache the counters for a few minutes? The key could be `PROJECT_ID-ISSUABLE_TYPE-PARAMS`.

A few possible arguments in favor of "it's an acceptable solution":
- most of the time people filter with a single label =&gt; no performance problem here
- when filtering with more than one label, usually the result set is reduced, limiting the performance issues 

## What are the relevant issue numbers?

Closes #15356

See merge request !6496</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'koding-setting-api' into 'master'</title>
<updated>2016-09-30T11:06:08+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>robert@gitlab.com</email>
</author>
<published>2016-09-30T11:06:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=4f92f29e703cba47b835285041cbd40063958716'/>
<id>4f92f29e703cba47b835285041cbd40063958716</id>
<content type='text'>

Expose the Koding application settings in the API

## Why was this MR needed?

When saving the GitLab application secrets in Koding, and authorising your admin user to have access to the UI, we want to let Koding enable the integration, and populate the url in GitLab for the user.

## What are the relevant issue numbers?

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22705

See merge request !6555</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Expose the Koding application settings in the API

## Why was this MR needed?

When saving the GitLab application secrets in Koding, and authorising your admin user to have access to the UI, we want to let Koding enable the integration, and populate the url in GitLab for the user.

## What are the relevant issue numbers?

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/22705

See merge request !6555</pre>
</div>
</content>
</entry>
<entry>
<title>Small improvements thanks to Robert's feedback</title>
<updated>2016-09-30T10:02:54+00:00</updated>
<author>
<name>Rémy Coutable</name>
<email>remy@rymai.me</email>
</author>
<published>2016-09-29T14:55:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=56259155d5a0ecfbbafb7319651495582504cfb8'/>
<id>56259155d5a0ecfbbafb7319651495582504cfb8</id>
<content type='text'>
Signed-off-by: Rémy Coutable &lt;remy@rymai.me&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rémy Coutable &lt;remy@rymai.me&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'rc-new-access-requests-finder' into 'master'</title>
<updated>2016-09-30T07:52:43+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2016-09-30T07:52:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=db00b495d2099e869f50694a0c156632e5b77561'/>
<id>db00b495d2099e869f50694a0c156632e5b77561</id>
<content type='text'>

New `AccessRequestsFinder`

Part of #21979.

## Does this MR meet the acceptance criteria?

- [x] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !6268</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

New `AccessRequestsFinder`

Part of #21979.

## Does this MR meet the acceptance criteria?

- [x] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !6268</pre>
</div>
</content>
</entry>
<entry>
<title>Expose the Koding application settings in the API</title>
<updated>2016-09-29T16:12:52+00:00</updated>
<author>
<name>DJ Mountney</name>
<email>david@twkie.net</email>
</author>
<published>2016-09-28T00:56:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=59157c0423d34c1f20c446548df540d103bda939'/>
<id>59157c0423d34c1f20c446548df540d103bda939</id>
<content type='text'>
This will allow the Koding app to enable the integration itself once is has authorized an admin user using the application secrets.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will allow the Koding app to enable the integration itself once is has authorized an admin user using the application secrets.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'issue_22382' into 'master'</title>
<updated>2016-09-29T13:04:16+00:00</updated>
<author>
<name>Rémy Coutable</name>
<email>remy@rymai.me</email>
</author>
<published>2016-09-29T13:04:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f6a1a21f6f808738b3caccca1b1233303649f898'/>
<id>f6a1a21f6f808738b3caccca1b1233303649f898</id>
<content type='text'>

Expose project share expiration_date field on API

closes #22382

See merge request !6484</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Expose project share expiration_date field on API

closes #22382

See merge request !6484</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '22367-add-pipeline-id-build' into 'master'</title>
<updated>2016-09-29T08:46:48+00:00</updated>
<author>
<name>Rémy Coutable</name>
<email>remy@rymai.me</email>
</author>
<published>2016-09-29T08:46:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=dbfcccaf7754d4501dc253b4409fc9f026248e67'/>
<id>dbfcccaf7754d4501dc253b4409fc9f026248e67</id>
<content type='text'>

Expose pipeline data in builds API

Exposes pipeline data in builds API, as suggested by #22367.
The fields exposed were 'id', 'status', 'ref', and 'sha'.

Closes #22367

See merge request !6502</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Expose pipeline data in builds API

Exposes pipeline data in builds API, as suggested by #22367.
The fields exposed were 'id', 'status', 'ref', and 'sha'.

Closes #22367

See merge request !6502</pre>
</div>
</content>
</entry>
<entry>
<title>expose pipeline data in builds API</title>
<updated>2016-09-29T02:58:16+00:00</updated>
<author>
<name>Guilherme Salazar</name>
<email>gmesalazar@gmail.com</email>
</author>
<published>2016-09-23T23:43:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e80e4cb8b97a3865b7e3c551a856a53d98cccf75'/>
<id>e80e4cb8b97a3865b7e3c551a856a53d98cccf75</id>
<content type='text'>
add pipeline ref, sha, and status to the build API response

add tests of build API (pipeline data)

change API documentation for builds API

log change to builds API in CHANGELOG

CHANGELOG: add reference to pull request and contributor's name
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add pipeline ref, sha, and status to the build API response

add tests of build API (pipeline data)

change API documentation for builds API

log change to builds API in CHANGELOG

CHANGELOG: add reference to pull request and contributor's name
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle LFS token creation and retrieval in the same method, and in the same Redis connection.</title>
<updated>2016-09-28T17:13:48+00:00</updated>
<author>
<name>Patricio Cano</name>
<email>suprnova32@gmail.com</email>
</author>
<published>2016-09-28T16:02:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=2772109ac15bed2bd199294f8d770f49a749b4bd'/>
<id>2772109ac15bed2bd199294f8d770f49a749b4bd</id>
<content type='text'>
Reset expiry time of token, if token is retrieved again before it expires.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reset expiry time of token, if token is retrieved again before it expires.
</pre>
</div>
</content>
</entry>
</feed>
