GitLab FOSS merge requestshttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests2019-09-19T23:27:29Zhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6188Added soft wrap option to editor2019-09-19T23:27:29ZLuke "Jared" BennettAdded soft wrap option to editor## What does this MR do?
Adds a `Soft wrap` button to the editor, when clicked, it wraps the text in the editor and changes to `No wrap`, then when clicked, it unwraps the text in the editor.
This will also detect files with no extensi...## What does this MR do?
Adds a `Soft wrap` button to the editor, when clicked, it wraps the text in the editor and changes to `No wrap`, then when clicked, it unwraps the text in the editor.
This will also detect files with no extension, `.txt` or `.md` and proactively set the soft wrap. **Unless**, you explicitly toggle the soft wrap, then it will stop checking the file path and will stay with the users explicit preference.
## Are there points in the code the reviewer needs to double check?
We should talk about the `.txt` and `.md` thing, [I'm not sure if its a good approach](https://gitlab.com/gitlab-org/gitlab-ce/issues/18297#note_14918218).
## Why was this MR needed?
## Screenshots (if relevant)
https://youtu.be/8LW5nQsraSM
#### No wrap
![Screen_Shot_2016-09-02_at_19.54.54](/uploads/97f2d1b2d415d03fe1b0be0640ab12e0/Screen_Shot_2016-09-02_at_19.54.54.png)
#### Soft wrap
![Screen_Shot_2016-09-02_at_19.54.45](/uploads/5af425587ce7198e015cce58440971b9/Screen_Shot_2016-09-02_at_19.54.45.png)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] 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)
## What are the relevant issue numbers?
Closes #182978.13Luke "Jared" BennettLuke "Jared" Bennetthttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6730Try tmpfs for repository storage, etc2019-09-19T23:05:46ZNick ThomasTry tmpfs for repository storage, etc## What does this MR do?
Mounts a tmpfs share on /tmp/tests in .gitlab-ci.yml jobs, and cleans the repository directory after each suite
## Are there points in the code the reviewer needs to double check?
This represents increased RAM...## What does this MR do?
Mounts a tmpfs share on /tmp/tests in .gitlab-ci.yml jobs, and cleans the repository directory after each suite
## Are there points in the code the reviewer needs to double check?
This represents increased RAM usage in the jobs, and I don't know what the upper bound of that is. However, cleaning after each job should prevent it from being multiple GiB, or even > 100MiB, so I'm not too worried.
## Why was this MR needed?
Some tests make extensive use of filesystem access (e.g., `git_access_spec.rb` does 400Mib of writes). Reads are naturally cached by the filesystem, but a tmpfs can speed up writes quite well.
This MR saves perhaps 10% on that set of specs, and benefits will accrue to any spec that does `create(:project)`, etc.
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] 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)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Spawned from #230348.13yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6723Memoize ActiveRecord::Migrator.migrations in tests2019-09-19T23:05:46ZNick ThomasMemoize ActiveRecord::Migrator.migrations in tests## What does this MR do?
Monkey-patches ActiveRecord so that the list of migrations is only read once in a test run
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
This is free time off ...## What does this MR do?
Monkey-patches ActiveRecord so that the list of migrations is only read once in a test run
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
This is free time off every spec with no downside (that I can see). Saves 0.2-0.5 seconds per spec in my local testing (which I wouldn't overly trust).
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] 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)
- [ ] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Spawned off #230348.13yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6722Optimize the `award_user_list` helper spec2019-09-19T23:05:46ZRobert SpeicherOptimize the `award_user_list` helper specAccording to
https://gitlab.com/gitlab-org/gitlab-ce/issues/23034#note_16586657, each
test for this helper generated 1,833 queries.
Now we only generate stubbed records, and only as many as we need for
each test.
This also corrects a s...According to
https://gitlab.com/gitlab-org/gitlab-ce/issues/23034#note_16586657, each
test for this helper generated 1,833 queries.
Now we only generate stubbed records, and only as many as we need for
each test.
This also corrects a slight logic bug in the helper itself. When the
number of awards was greater than the limit (9 by default), _and_ the
current user was one of them, we actually included 10 names, including
"You", plus the remaining count. Now we return the correct number
regardless.8.13username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/7139Fix couple of GitHub importing bugs2019-09-19T22:41:34Zusername-removed-506061Fix couple of GitHub importing bugs## What does this MR do?
Fix a bug in GH comment importing and label applying for imported MRs.
## Are there points in the code the reviewer needs to double check?
N/A
## Why was this MR needed?
## Screenshots (if relevant)
...## What does this MR do?
Fix a bug in GH comment importing and label applying for imported MRs.
## Are there points in the code the reviewer needs to double check?
N/A
## Why was this MR needed?
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [ ] ~~API support added~~
- Tests
- [ ] ~~Added for this feature/bug~~
- [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] 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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?8.13username-removed-443319username-removed-443319https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/7003Modify GitHub importer to be retryable2019-09-19T22:41:34Zusername-removed-506061Modify GitHub importer to be retryable## What does this MR do?
It allows GitHub import jobs to be retired correctly, first by not failing when it encounters the imported repo on disk, and second by caching the last page processed of every resource being imported to continue ...## What does this MR do?
It allows GitHub import jobs to be retired correctly, first by not failing when it encounters the imported repo on disk, and second by caching the last page processed of every resource being imported to continue off that position on the next attempt.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [ ] ~~API support added~~
- Tests
- [ ] ~~Added for this feature/bug~~
- [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] 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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
#235338.13username-removed-443319username-removed-443319https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/7050Stop appending templates - Temporary fix2019-09-19T22:22:01ZLuke "Jared" BennettStop appending templates - Temporary fix## What does this MR do?
This is the temporary fix for #23315. This stops the templates appending to any existing text.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
Temporary fix for ...## What does this MR do?
This is the temporary fix for #23315. This stops the templates appending to any existing text.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
Temporary fix for #23315.
## Screenshots (if relevant)
![2016-10-21_21.58.55](/uploads/ba54d89fcb2fb9cf99ff24c8623ae413/2016-10-21_21.58.55.gif)
## Does this MR meet the acceptance criteria?
- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] 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)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?8.13https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6503reword title for issues_controller#show and issues_controller#edit2019-09-19T22:16:49Zusername-removed-528343reword title for issues_controller#show and issues_controller#edit## What does this MR do?
Changes the html page title for the show/edit pages for issues.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
Better quick glance usability for determining issues...## What does this MR do?
Changes the html page title for the show/edit pages for issues.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
Better quick glance usability for determining issues by browser tab.
## Screenshots (if relevant)
#### Before:
![Screen_Shot_2016-09-23_at_7.26.16_PM](/uploads/a050cabfac4b0767dada77ae1d0721ad/Screen_Shot_2016-09-23_at_7.26.16_PM.png)
#### After:
![Screen_Shot_2016-09-23_at_7.26.05_PM](/uploads/77d22d7db5909edf6a15b39ffe577731/Screen_Shot_2016-09-23_at_7.26.05_PM.png)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] 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)
## What are the relevant issue numbers?
#21712
Closes #217128.13Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6091Fix inconsistent highlighting of already selected activity nav-links2019-09-19T22:15:17Zusername-removed-408677Fix inconsistent highlighting of already selected activity nav-links## What does this MR do?
* Remove edge case where user could deselect an activity nav-link (which seems to be returning all the events)
* Explicitly add an `All` tab to return all the events
## Are there points in the code the r...## What does this MR do?
* Remove edge case where user could deselect an activity nav-link (which seems to be returning all the events)
* Explicitly add an `All` tab to return all the events
## Are there points in the code the reviewer needs to double check?
Shouldn't be
## Why was this MR needed?
Resolves existing UI inconsistency
## Screenshots (if relevant)
Before:
![4OzkoQVJYc](/uploads/fd2a7fdbde2159e875482ec7b828fe60/4OzkoQVJYc.gif)
After:
![E0lj8UhEUU](/uploads/7eb5155861eb79d72957de04c9f172c9/E0lj8UhEUU.gif)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
- [x] All builds are passing
- [x] 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)
## What are the relevant issue numbers?
* Closes #21631
* Closes #21452
8.13username-removed-502136username-removed-502136https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6838GrapeDSL for variables2019-09-19T22:10:46ZZeger-Jan van de Wegzegerjan@gitlab.comGrapeDSL for variables8.13username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6875Grapify todos API2019-09-19T22:10:46Zusername-removed-2900Grapify todos API## What does this MR do?
Add the Grape-DSL to the todos API.
## What are the relevant issue numbers?
Related to #22928## What does this MR do?
Add the Grape-DSL to the todos API.
## What are the relevant issue numbers?
Related to #229288.13username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/5717Resolve "Move `/licenses` api endpoint to `/templates/licenses`"2019-09-19T22:10:46Zusername-removed-427590Resolve "Move `/licenses` api endpoint to `/templates/licenses`"## What does this MR do?
It moves the `/licenses`, `/gitignores` and `/gitlab_ci_ymls` API endpoints under the `/templates` namespace
## Are there points in the code the reviewer needs to double check?
N/A
## Why was this MR needed?
...## What does this MR do?
It moves the `/licenses`, `/gitignores` and `/gitlab_ci_ymls` API endpoints under the `/templates` namespace
## Are there points in the code the reviewer needs to double check?
N/A
## Why was this MR needed?
In EE we now have somewhat ambiguous API endpoints. `/license` refers to the EE license while `/licenses` (plural) refers to license templates. @DouweM mentioned that we're adding .gitignore templates in #14106 so it may make sense to add a /templates namespace. Then, move the /license templates endpoint to be underneath, along with .gitignore endpoints.
## What are the relevant issue numbers?
#17541
## Screenshots (if relevant)
N/A
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [x] All builds are passing
- [x] 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)
Closes #175418.13username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6861Grapify system hooks API2019-09-19T22:10:46Zusername-removed-2900Grapify system hooks API## What does this MR do?
Add the Grape-DSL to the system-hook API.
## What are the relevant issue numbers?
Related to #22928## What does this MR do?
Add the Grape-DSL to the system-hook API.
## What are the relevant issue numbers?
Related to #229288.13username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6632GrapeDSL for Namespace endpoint2019-09-19T22:10:44ZZeger-Jan van de Wegzegerjan@gitlab.comGrapeDSL for Namespace endpointNo changelog item as it doesn't change behaviour
Cherry-picked from !6330No changelog item as it doesn't change behaviour
Cherry-picked from !63308.13Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6631GrapeDSL for Keys endpoint2019-09-19T22:10:44ZZeger-Jan van de Wegzegerjan@gitlab.comGrapeDSL for Keys endpointNo changelog item as it doesn't change behaviour
Cherry-picket from !6330No changelog item as it doesn't change behaviour
Cherry-picket from !63308.13username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6914Use GrapeDSL for commits2019-09-19T22:10:43ZZeger-Jan van de Wegzegerjan@gitlab.comUse GrapeDSL for commitscc @rspeicher @rymaicc @rspeicher @rymai8.13username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6876Grapify boards API2019-09-19T22:10:43Zusername-removed-2900Grapify boards API## What does this MR do?
Add the Grape-DSL to the boards API.
## What are the relevant issue numbers?
Related to #22928## What does this MR do?
Add the Grape-DSL to the boards API.
## What are the relevant issue numbers?
Related to #229288.13username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6629GrapeDSL for Award Emoji endpoints2019-09-19T22:10:43ZZeger-Jan van de Wegzegerjan@gitlab.comGrapeDSL for Award Emoji endpointsNo changelog item as it doesn't change behaviour
Cherry-picket from !6330No changelog item as it doesn't change behaviour
Cherry-picket from !63308.13Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6269API: Use Grape DSL to document access requests and members endpoints2019-09-19T22:10:42Zusername-removed-128633API: Use Grape DSL to document access requests and members endpointsPart of #21979, depends on gitlab-org/gitlab-ce!6267 and gitlab-org/gitlab-ce!6266.
## Does this MR meet the acceptance criteria?
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [ ] All builds are passing
- [ ] C...Part of #21979, depends on gitlab-org/gitlab-ce!6267 and gitlab-org/gitlab-ce!6266.
## Does this MR meet the acceptance criteria?
- [x] API support added
- Tests
- [x] Added for this feature/bug
- [ ] 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)8.13Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6599Memoize GitLab::Shell's secret token2019-09-19T22:07:07Zusername-removed-750569Memoize GitLab::Shell's secret token## What does this MR do?
`API::Helpers#secret_token` was reading the secret file on every invocation. This MR reads the file in the `gitlab_shell_secret_token.rb` initializer and saves it as a class variable at `Gitlab::Shell.secret_tok...## What does this MR do?
`API::Helpers#secret_token` was reading the secret file on every invocation. This MR reads the file in the `gitlab_shell_secret_token.rb` initializer and saves it as a class variable at `Gitlab::Shell.secret_token`
## Are there points in the code the reviewer needs to double check?
- I'm not sure if the use of `cattr_accessor` is the best approach, or if should be moved into the `class << self` block?
- Should `API::Helpers#secret_token` be removed in favor of using `Gitlab::Shell.secret_token`?
## Why was this MR needed?
Performance optimization.
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] 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)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/225108.13username-removed-128633username-removed-128633