GitLab FOSS merge requestshttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests2018-12-19T12:27:11Zhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14753WIP: Use Gitaly's RepositoryService.HasLocalBranches RPC2018-12-19T12:27:11Zusername-removed-367626WIP: Use Gitaly's RepositoryService.HasLocalBranches RPC## What does this MR do?
Use Gitaly's RepositoryService.HasLocalBranches RPC
## Are there points in the code the reviewer needs to double check?
No
## Why was this MR needed?
https://gitlab.com/gitlab-org/gitaly/issues/630
## Does ...## What does this MR do?
Use Gitaly's RepositoryService.HasLocalBranches RPC
## Are there points in the code the reviewer needs to double check?
No
## Why was this MR needed?
https://gitlab.com/gitlab-org/gitaly/issues/630
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [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/gitaly/issues/63010.1James RamsayJames Ramsayhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14740Include GitLab full name with username in Slack messages2017-10-24T23:58:00ZStan HuInclude GitLab full name with username in Slack messagesWe used to include the first and last name of the user, but !6624 modified this to include only the username. Let's compromise and add both in the form of `First Last (username)`.
Closes #38865We used to include the first and last name of the user, but !6624 modified this to include only the username. Let's compromise and add both in the form of `First Last (username)`.
Closes #3886510.1Robert SpeicherRobert Speicherhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14733Improve pgloader documentation2018-06-04T21:32:43ZStan HuImprove pgloader documentationFixes a typo and revises a few sentences for grammar.
Also add more troubleshooting and sample output.
/cc: @rdavila, @godfat, @lbotFixes a typo and revises a few sentences for grammar.
Also add more troubleshooting and sample output.
/cc: @rdavila, @godfat, @lbot10.1Achilleas PipinellisAchilleas Pipinellishttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14731WIP: Rewrite the GitHub importer to perform work in parallel and greatly impr...2017-11-13T05:36:31Zyorickpeterse-stagingWIP: Rewrite the GitHub importer to perform work in parallel and greatly improve performance## What does this MR do?
This MR rewrites the GitHub importer from scratch so it's _much_ faster and performs work in parallel. This MR is still a WIP, I'll update the body properly once we get closer to a final state.
## TODO
*...## What does this MR do?
This MR rewrites the GitHub importer from scratch so it's _much_ faster and performs work in parallel. This MR is still a WIP, I'll update the body properly once we get closer to a final state.
## TODO
* [ ] Use a separate class for importing issue comments
* [ ] Import issue comments using a worker (1 job per comment)
* [ ] Issue and comment workers should reschedule themselves in the future if we hit a rate limit, the reschedule time will simply be the reset time of the rate limit (so if our rate limit resets in 10 seconds that means we schedule jobs for 10 seconds in the future)
* [ ] Make the parallel importing schedule a job to check for progress, instead of blocking the thread in a `sleep` call
* [ ] Make sure any stuck importer jobs don't mess with a running GitHub import
* [ ] Import releases
* [ ] Test all the things
* [ ] Add tests for `User.by_any_email`
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)10.1yorickpeterse-stagingyorickpeterse-staginghttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14729Fetch the merged branches at once2017-11-03T05:09:44Zusername-removed-423915Fetch the merged branches at once## What does this MR do?
Fetch the merged branches at once, instead of checking it one by one in the view. We don't cache this yet because this would already much improve the performance.
## Are there points in the code the reviewe...## What does this MR do?
Fetch the merged branches at once, instead of checking it one by one in the view. We don't cache this yet because this would already much improve the performance.
## Are there points in the code the reviewer needs to double check?
Previously we could be checking with ~Gitaly, but with this change we would be using `git` command line. Could this kill the filesystem?
## Why was this MR needed?
A naive test against a particularly large repository:
``` ruby
begin
now = Time.now
branches.map{ |b| repository.merged_to_root_ref?(b.name) }
Time.now - now
end # 8.265830782
```
Around 10 times faster:
``` ruby
begin
now = Time.now
repository.merged_branches(branches.map(&:name))
Time.now - now
end # 0.807405397
```
This should make the branches page usable.
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by Backend
## What are the relevant issue numbers?
This is a follow up from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14678#note_4254801910.1username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14728Fixed default group sort option2017-10-24T23:58:09ZPhil Hughesme@iamphill.comFixed default group sort option## What does this MR do?
Fixes default group sorting option. Previously it was blank which caused the sort button to have no label.
## What are the relevant issue numbers?
Closes #38808## What does this MR do?
Fixes default group sorting option. Previously it was blank which caused the sort button to have no label.
## What are the relevant issue numbers?
Closes #3880810.1https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14724Make sure that every job has a stage assigned2017-11-13T05:35:26ZGrzegorz BizonMake sure that every job has a stage assigned## What does this MR do?
This MR is needed to ensure that every CI/CD job has a stage assigned. Jobs for pages deployments and external commit statuses in particular.
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entr...## What does this MR do?
This MR is needed to ensure that every CI/CD job has a stage assigned. Jobs for pages deployments and external commit statuses in particular.
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] Tests added for this feature/bug
- [ ] Has been reviewed by Backend
## What are the relevant issue numbers?
See #3875610.1https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14718Prevent creating multiple ApplicationSetting by forcing it to always have id=12017-10-25T00:05:54ZKamil TrzcińśkiPrevent creating multiple ApplicationSetting by forcing it to always have id=1## What does this MR do?
This approach prevents writing duplicates. We force that every new object created to have `id` set to 1 which is primary key for the table.
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](...## What does this MR do?
This approach prevents writing duplicates. We force that every new object created to have `id` set to 1 which is primary key for the table.
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/34728
cc @stanhu @nick.thomas @yorickpeterse10.1Kamil TrzcińśkiKamil Trzcińśkihttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14713Pass git object dir attributes as relative paths to Gitaly2017-10-25T00:07:24Zusername-removed-506061Pass git object dir attributes as relative paths to Gitaly## What does this MR do?
Reference https://gitlab.com/gitlab-org/gitaly/issues/629
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## Screenshots (if relevant)
## Does this MR...## What does this MR do?
Reference https://gitlab.com/gitlab-org/gitaly/issues/629
## 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?
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?10.1username-removed-506061username-removed-506061https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14712Add docs for GKE integration2017-10-25T00:07:35ZAchilleas PipinellisAdd docs for GKE integration## What does this MR do?
Adds docs for the new GKE cluster integration https://gitlab.com/gitlab-org/gitlab-ce/issues/35954.## What does this MR do?
Adds docs for the new GKE cluster integration https://gitlab.com/gitlab-org/gitlab-ce/issues/35954.10.1Achilleas PipinellisAchilleas Pipinellishttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14711Converted a bunch of JS into exported modules2017-10-06T09:52:40ZPhil Hughesme@iamphill.comConverted a bunch of JS into exported modules## What does this MR do?
Converts a bunch of different JS classes into exported modules & then imports them where they are required.## What does this MR do?
Converts a bunch of different JS classes into exported modules & then imports them where they are required.10.1https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14709Convert AbuseReports class to a module2017-10-24T23:58:01ZPhil Hughesme@iamphill.comConvert AbuseReports class to a module## What does this MR do?
Converts the AbuseReports JS class into a module to directly import instead of being inside the global `gl` object.## What does this MR do?
Converts the AbuseReports JS class into a module to directly import instead of being inside the global `gl` object.10.1https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14708WIP: Add request rate limits2017-11-18T10:12:13Zusername-removed-1144264WIP: Add request rate limits## What does this MR do?
Adds configurable rate limits for authenticated web requests (per user), authenticated API requests (per user), and unauthenticated requests (per IP).
## Are there points in the code the reviewer needs to doubl...## What does this MR do?
Adds configurable rate limits for authenticated web requests (per user), authenticated API requests (per user), and unauthenticated requests (per IP).
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
To mitigate excessive requests from abusive clients.
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/3005310.1Douwe MaanDouwe Maanhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14673Check if user can commit2017-10-08T15:45:43ZJacob SchatzCheck if user can commit## What does this MR do?
Checks for permissions before editing a file in the repo editor and leading user to a fork situation.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## Sc...## What does this MR do?
Checks for permissions before editing a file in the repo editor and leading user to a fork situation.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
## Screenshots (if relevant)
![cooooldude](/uploads/6b1ce165fea965579f7450bf5871eb12/cooooldude.gif)
## Does this MR meet the acceptance criteria?
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Fixes: #3835710.1Jacob SchatzJacob Schatzhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14669Simplify project page2017-10-25T00:07:09ZAnnabel GraySimplify project page![Screen_Shot_2017-10-05_at_2.43.05_PM](/uploads/05b6b45cac791edf164958391b08b94f/Screen_Shot_2017-10-05_at_2.43.05_PM.png)
![Screen_Shot_2017-10-05_at_2.43.09_PM](/uploads/d6054f6b3e4e9caa871b258668ae4cf4/Screen_Shot_2017-10-05_at_2....![Screen_Shot_2017-10-05_at_2.43.05_PM](/uploads/05b6b45cac791edf164958391b08b94f/Screen_Shot_2017-10-05_at_2.43.05_PM.png)
![Screen_Shot_2017-10-05_at_2.43.09_PM](/uploads/d6054f6b3e4e9caa871b258668ae4cf4/Screen_Shot_2017-10-05_at_2.43.09_PM.png)
![Screen_Shot_2017-10-05_at_2.43.14_PM](/uploads/ee6627af0973d81cf333a3b3ba8efb90/Screen_Shot_2017-10-05_at_2.43.14_PM.png)
![Screen_Shot_2017-10-05_at_2.43.18_PM](/uploads/4238367eebc799fcf2a88f14179ab8c6/Screen_Shot_2017-10-05_at_2.43.18_PM.png)
Closes #37399
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/3883910.1Phil Hughesme@iamphill.comPhil Hughesme@iamphill.comhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14665Add create merge checkbox.2017-10-25T00:07:56ZJacob SchatzAdd create merge checkbox.## What does this MR do?
Adds a checkbox to start a new MR from a branch.
Merge https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14586 first. This relies upon it.
## Are there points in the code the reviewer needs to double ...## What does this MR do?
Adds a checkbox to start a new MR from a branch.
Merge https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14586 first. This relies upon it.
## Are there points in the code the reviewer needs to double check?
## Why was this MR needed?
https://gitlab.com/gitlab-org/gitlab-ce/issues/38626
## Screenshots (if relevant)
![Screen_Shot_2017-10-03_at_3.17.57_PM](/uploads/28930baff392cb102a86accf98a0bcec/Screen_Shot_2017-10-03_at_3.17.57_PM.png)
![cooooldude](/uploads/e61193833846bc3bbc0edfb964d100d6/cooooldude.gif)
## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [x] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [x] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/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] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Fixes #3862610.1username-removed-892863contact@ericeastwood.comusername-removed-892863contact@ericeastwood.comhttps://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14661Add sort runners on admin runners2017-10-25T00:07:13Zusername-removed-100770Add sort runners on admin runners## What does this MR do?
Add sort runners by last contacted on admin runners.
## Are there points in the code the reviewer needs to double check?
No.
## Why was this MR needed?
> Admins want to clean up inactive ones from dozens of ...## What does this MR do?
Add sort runners by last contacted on admin runners.
## Are there points in the code the reviewer needs to double check?
No.
## Why was this MR needed?
> Admins want to clean up inactive ones from dozens of the registered runners. For that, sort runners by 'Last contacted' on admin runners would be helpful.
(from #38720)
## Screenshots (if relevant)
![sort-contacted-on-admin-runners](/uploads/b9f1283fc6dc8b6d68a3a90a5bc88582/sort-contacted-on-admin-runners.png)
## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [n/a] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html)
- [n/a] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #3872010.1username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14653Replaces `tag: true` into `:tag` in the specs2017-10-24T23:58:08Zusername-removed-331646intrip@gmail.comReplaces `tag: true` into `:tag` in the specs## What does this MR do?
- Replaces all the explicit include metadata syntax in the specs `tag:true` into the implicit one `:tag`.
- Added a cop to prevent future errors and handle autocorrection.
## Are there points in the code t...## What does this MR do?
- Replaces all the explicit include metadata syntax in the specs `tag:true` into the implicit one `:tag`.
- Added a cop to prevent future errors and handle autocorrection.
## 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 entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html)
- [ ] API support added
- [x] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [x] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/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] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #3755210.1username-removed-128633username-removed-128633https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14652Migrate Workhorse Send{Diff,Patch} to Gitaly2017-10-25T00:00:27Zusername-removed-506061Migrate Workhorse Send{Diff,Patch} to Gitaly~Conversation: https://gitlab.com/gitlab-org/gitaly/issues/528 and https://gitlab.com/gitlab-org/gitaly/issues/529
Related to https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/200
## What does this MR do?
## Are ther...~Conversation: https://gitlab.com/gitlab-org/gitaly/issues/528 and https://gitlab.com/gitlab-org/gitaly/issues/529
Related to https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/200
## What does this MR do?
## 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?
- [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary
- [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html)
- [ ] API support added
- [ ] Tests added for this feature/bug
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] Conform by the [merge request performance guides](https://docs.gitlab.com/ee/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?10.1username-removed-506061username-removed-506061https://staging.gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14643Remove never-used appearances.updated_by column2017-10-05T11:47:22ZGregory StarkRemove never-used appearances.updated_by columnRemove the `appearances.updated_by` column which appears to have been added to schema.rb but was never added in a migration. This has caused inconsistencies between developer and customer databases and caused schema.rb to vary from one s...Remove the `appearances.updated_by` column which appears to have been added to schema.rb but was never added in a migration. This has caused inconsistencies between developer and customer databases and caused schema.rb to vary from one state and the other over time.
In commit 40104eea the appearances
table was added with the updated_by column but the
`20160222153918_create_appearances_ce.rb` migration in commit 9a2869ab4674b8a6b94ec206660e083a00d4db37
never added the updated_by column. As a result the schema.rb has flipped back and
forth several times since as different developers have checked in
schemas with or without this column....
It's not used so let's remove it once and for all.
```
stark@tweedle:~/gitlab/gdk/gitlab-development-kit/gitlab$ bundle exec rake db:rollback
== 20171002160123 RemoveNeverUsedUpdatedBy: reverting =========================
-- add_column(:appearances, :updated_by, :integer)
-> 0.0089s
== 20171002160123 RemoveNeverUsedUpdatedBy: reverted (0.0090s) ================
stark@tweedle:~/gitlab/gdk/gitlab-development-kit/gitlab$ bundle exec rake db:migrate
== 20171002160123 RemoveNeverUsedUpdatedBy: migrating =========================
-- column_exists?(:appearances, :updated_by)
-> 0.0016s
-- remove_column(:appearances, :updated_by)
-> 0.0190s
== 20171002160123 RemoveNeverUsedUpdatedBy: migrated (0.0208s) ================
```
## Database Checklist
When adding migrations:
- [x] Updated `db/schema.rb`
- [x] Added a `down` method so the migration can be reverted
- [x] Added the output of the migration(s) to the MR body
- [x] Added the execution time of the migration(s) to the MR body
- [ ] Added tests for the migration in `spec/migrations` if necessary (e.g. when
migrating data)
- [ ] Made sure the migration won't interfere with a running GitLab cluster,
for example by disabling transactions for long running migrations
When adding or modifying queries to improve performance:
- [ ] Included the raw SQL queries of the relevant queries
- [ ] Included the output of `EXPLAIN ANALYZE` and execution timings of the
relevant queries
- [ ] Added tests for the relevant changes
When adding indexes:
- [ ] Described the need for these indexes in the MR body
- [ ] Made sure existing indexes can not be reused instead
When adding foreign keys to existing tables:
- [ ] Included a migration to remove orphaned rows in the source table
- [ ] Removed any instances of `dependent: ...` that may no longer be necessary
When adding tables:
- [ ] Ordered columns based on their type sizes in descending order
- [ ] Added foreign keys if necessary
- [ ] Added indexes if necessary
When removing columns, tables, indexes or other structures:
- [ ] Removed these in a post-deployment migration
- [ ] Made sure the application no longer uses (or ignores) these structures
## General Checklist
- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added, if necessary
- [ ] [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
- Review
- [ ] Has been reviewed by UX
- [ ] Has been reviewed by Frontend
- [ ] Has been reviewed by Backend
- [ ] Has been reviewed by Database
- [ ] 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)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)10.1Gregory StarkGregory Stark