Commit Graph

57485 Commits

Author SHA1 Message Date
Shinya Maeda ace7d7a2b5 Add changelog 2017-08-04 18:19:35 +09:00
Shinya Maeda 0c75e23fab fix 2017-08-04 18:14:48 +09:00
Phil Hughes 93e96c3fcf Merge branch '34904-specific-async-script-loading-by-using-a-page-variable' into 'master'
Resolve "Specific Async Script Loading by using a Page Variable"

Closes #34904

See merge request !12759
2017-08-03 20:31:53 +00:00
Tim Zallmann dab08be606 Resolve "Specific Async Script Loading by using a Page Variable" 2017-08-03 20:31:53 +00:00
Sean McGivern db271a6b05 Merge branch 'tc-no-todo-service-select-mysql' into 'master'
Avoid plucking Todo ids in TodoService - take 2

See merge request !11415
2017-08-03 18:46:49 +00:00
Annabel Dunstone Gray 00a02d14ac Merge branch 'winh-dropdown-mixin' into 'master'
Use mixin for new dropdown style

See merge request !13274
2017-08-03 17:54:12 +00:00
Winnie Hellmann 8b7f4a6a2c Use mixin for new dropdown style 2017-08-03 17:54:12 +00:00
Sean McGivern 080cd74a37 Merge branch 'dev.referable-inspect' into 'master'
implement #inspect for all Referables

See merge request !13285
2017-08-03 17:28:59 +00:00
Rémy Coutable 9751349dac Merge branch '3686_make_tarball_download_url' into 'master'
fix #3686 make tarball download url to end with extension

Closes #3686

See merge request !13178
2017-08-03 16:44:49 +00:00
haseeb 4974f1ef86 fix #3686 make tarball download url to end with extension 2017-08-03 16:44:48 +00:00
Rémy Coutable 29f1fa8250 Merge branch 'use-rspec-support-helper' into 'master'
Don't include EmailHelpers manually, pick with rspec

See merge request !13257
2017-08-03 16:42:02 +00:00
Rémy Coutable 2209e35f92 Merge branch '35133_strip_newlines_from_ssh_keys' into 'master'
fix #35133 strip new lines from ssh keys

Closes #35133

See merge request !13234
2017-08-03 16:39:10 +00:00
haseeb ae99f05b05 fix #35133 strip new lines from ssh keys 2017-08-03 16:39:10 +00:00
Sean McGivern 118dcff035 Merge branch 'reorganise-issues-indexes-for-sorting' into 'master'
Re-organise "issues" indexes for faster ordering

See merge request !13278
2017-08-03 16:27:27 +00:00
Filipa Lacerda 57aa5d6314 Merge branch 'fix-oauth-checkboxes' into 'master'
Fixed sign-in restrictions buttons not toggling active state

Closes #35882

See merge request !13270
2017-08-03 16:03:23 +00:00
Robert Speicher 8f9b658e3a Merge branch 'feature/migrate-count-commits-to-gitaly' into 'master'
Migrate Gitlab::Git::Repository#count_commits to Gitaly

Closes gitaly#415

See merge request !13121
2017-08-03 15:25:03 +00:00
Rémy Coutable 2a73be5161 Merge branch 'merge-request-commits-background-migration' into 'master'
Merge request commits background migration

See merge request !12685
2017-08-03 14:41:58 +00:00
Toon Claes a488fc0add Add workaround for UPDATE with subquery when using MySQL
When trying to run an UPDATE, this query is ran:

```sql
UPDATE `todos`
INNER JOIN `projects` ON `projects`.`id` = `todos`.`project_id`
SET `todos`.`state` = 'done'
WHERE `todos`.`user_id` = 4
  AND (`todos`.`state` IN ('pending'))
  AND (EXISTS
         (SELECT 1
          FROM `project_authorizations`
          WHERE `project_authorizations`.`user_id` = 4
            AND (project_authorizations.project_id = projects.id))
       OR projects.visibility_level IN (10,
                                        20))
  AND `projects`.`id` IN
    (SELECT `todos`.`project_id`
     FROM `todos`
     WHERE `todos`.`user_id` = 4
       AND (`todos`.`state` IN ('pending')))
  AND (`todos`.`state` != 'done')
```

But MySQL does not like the subquery used to filter on
`projects.id IN (SELECT ...`

Because the subquery queries from the same table:

> Error: You can’t specify target table ‘todos’ for update in FROM clause

So as workaround, wrap it in another subquery, where the original
subquery is aliased using the `AS` statement.

Mostly inspired by https://stackoverflow.com/a/43610081/89376
2017-08-03 16:31:05 +02:00
Toon Claes a723cba574 Avoid plucking Todo ids and use sub-queries instead
TodoService should not call `.select(&:id)` on todos, because this is
bad performance. So instead use sub-queries, which will result in a
single SQL query to the database.

https://docs.gitlab.com/ee/development/sql.html#plucking-ids
2017-08-03 16:31:05 +02:00
Achilleas Pipinellis c39daf937b Merge branch 'patch-1' into 'master'
Move API "basic usage" to be more visible

See merge request !13171
2017-08-03 14:08:22 +00:00
Achilleas Pipinellis 2a77db9cff Merge branch 'abuango-imap-doc-fix' into 'master'
Update reply_by_email_postfix_setup.md, included starting courier-authdaemon after installation.

See merge request !13218
2017-08-03 14:07:17 +00:00
Abubakar Ango fbdfafe6ed Update reply_by_email_postfix_setup.md, included starting courier-authdaemon after installation. 2017-08-03 14:07:16 +00:00
Lin Jen-Shin bb5f79d43e Don't include EmailHelpers manually, pick with rspec
`:mailer` is needed to pick it easily, while
`type: :mailer` is needed for picking it automatically for
tests located in spec/mailers/*_spec.rb

It's a bit complicated in spec/services/notification_service_spec.rb
but we'll leave it alone for now.
2017-08-03 21:55:48 +08:00
Clement Ho b0464fa4e1 Merge branch '35232-next-unresolved' into 'master'
fix Jump to next discussion

Closes #35232

See merge request !13076
2017-08-03 13:32:58 +00:00
Yorick Peterse 9b3f0569fa
Re-organise "issues" indexes for faster ordering
By adding various composite indexes we can reduce the time spent
retrieving issue lists. Because of the way these indexes are built
column wise we can also remove some standalone indexes, keeping the
total number of indexes in check.
2017-08-03 15:20:59 +02:00
Annabel Dunstone Gray 2f05a6a44c Merge branch 'winh-project-page-dropdown-style' into 'master'
Make dropdown style on project page consistent

Closes #35778

See merge request !13193
2017-08-03 13:11:17 +00:00
Winnie Hellmann a7102fb790 Make dropdown style on project page consistent 2017-08-03 13:11:17 +00:00
Sean McGivern 27d34789c9 Merge branch '28472-ignore-auto-generated-mails' into 'master'
Don't send rejection mails for all auto-generated mails

Closes #28472

See merge request !13254
2017-08-03 12:41:16 +00:00
Sean McGivern f2d50af917 Migrate MR commits and diffs to new tables
Previously, we stored these as serialised fields - `st_{commits,diffs}` - on the
`merge_request_diffs` table. These now have their own tables -
`merge_request_diff_{commits,diffs}` - with a column for each attribute of the
serialised data.

Add a background migration to go through the existing MR diffs and migrate them
to the new format. Ignore any contents that cannot be displayed. Assuming that
we have 5 million rows to migrate, and each batch of 2,500 rows can be
completed in 5 minutes, this will take about 7 days to migrate everything.
2017-08-03 13:20:26 +01:00
Rémy Coutable 23c502b434 Merge branch 'fix-gitaly-install' into 'master'
Ensure we run installation Rake tasks in a clean env in TestEnv

Closes #35859

See merge request !13249
2017-08-03 11:36:41 +00:00
Lin Jen-Shin 86e1f41b83 Check against "Auto-Submitted: no" instead
This would be much more accurate. We assume this is an
auto-generated email if such header is provided, and
the value is not "no". It could also be: "auto-generated",
"auto-replied", or other values from extension. It seems
that only "no" could mean that this is sent by a human.

See: https://tools.ietf.org/html/rfc3834
2017-08-03 19:29:18 +08:00
Phil Hughes 42feb55f20
Fixed sign-in restrictions buttons not toggling active state
Closes #35882
2017-08-03 12:08:10 +01:00
Sean McGivern 1018ab0516 Merge branch 'dm-api-current-user' into 'master'
Do not validate CSRF token in API unless needed

Closes #35705

See merge request !13256
2017-08-03 10:47:03 +00:00
Rémy Coutable f105a85744 Merge branch 'gitaly-test-mtime-check' into 'master'
Remove test gitaly when older than version file

See merge request !13250
2017-08-03 10:15:09 +00:00
Jacob Vosmaer (GitLab) 06165fa0af Remove test gitaly when older than version file 2017-08-03 10:15:08 +00:00
Filipa Lacerda beaa0723b8 Merge branch 'sidebar-fly-out-sub-nav' into 'master'
Fly-out dropdown menu in new sidebar

Closes #34026

See merge request !12938
2017-08-03 09:33:00 +00:00
Filipa Lacerda 9d905e684d Merge branch 'pawel/fix_link_to_prometheus_docs-33921' into 'master'
Fix Prometheus application settings help link to point to Prometheus help page

Closes #33921

See merge request !13258
2017-08-03 08:43:59 +00:00
Douwe Maan dc412b4869 Merge branch '35869-disable-the-Rails/Delegate-cop' into 'master'
Disable the Rails/Delegate cop

Closes #35869

See merge request !13267
2017-08-03 07:51:47 +00:00
Rémy Coutable f15e7642c1 Merge branch 'rs-empty_project-default' into 'master'
Empty project factory by default

See merge request !13260
2017-08-03 07:32:17 +00:00
Rémy Coutable 7ace475ae2
Disable the Rails/Delegate cop
See https://gitlab.com/gitlab-org/gitlab-ce/issues/35869 for the
rationale.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-03 08:52:47 +02:00
Stan Hu 43c015472b Merge branch 'project-foreign-keys-without-errors' into 'master'
Change project FK migration to skip existing FKs

Closes #35243

See merge request !13235
2017-08-03 00:33:55 +00:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Robert Speicher e2c3dca371 Remove `:empty_project` factory, implement `:repository` trait 2017-08-02 15:43:24 -04:00
Robert Speicher 64d6a48b56 Remove documentation about `:empty_project` since we're removing it 2017-08-02 15:26:16 -04:00
Robert Speicher cf39d282a3 Use `:empty_project` where possible in features/steps 2017-08-02 15:25:52 -04:00
Pawel Chojnacki 93e5e8e724 Fix Prometheus help link to lead to proper Prometheus help page 2017-08-02 20:51:39 +02:00
Rémy Coutable 532ad2e56e Don't call load_tasks as this would load the tasks twice
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-02 19:02:01 +02:00
Rémy Coutable 6a29d3a487 Ensure we run installation Rake tasks in a clean env in TestEnv
If we call `system('rake', 'taks_name')`, `ENV['RUBYOPT']` is set to
`'-rbundler/setup'` but some tasks (e.g. `gitlab:gitaly:install` need
a clean env since they install their own Gem bundle.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-02 19:02:01 +02:00
Lin Jen-Shin f097e4dbcd Don't send rejection mails for all auto-generated mails
Also make it easier to have mailer helper
2017-08-03 00:40:10 +08:00
Douwe Maan 14644d40e0 Do not validate CSRF token in API unless needed 2017-08-02 18:20:31 +02:00