Commit Graph
19752 Commits
Author SHA1 Message Date
Yorick Peterse b5f8161dae Eager load project associations for notes
This ensures that when viewing an issue each note already has the
associated project, project members, group and group members available.
Since this information is requres for every note this results in quite
the reduction of SQL queries being executed.
2015-10-15 12:05:01 +02:00
Yorick Peterse 8237da0d4a Eager load note projects when viewing issues 2015-10-15 12:05:01 +02:00
Yorick Peterse d4832b0341 Added rack-lineprof for development
This can be used to measure the time (roughly) spent on a per line
basis. This can also be used to measure timings for views, for example
by adding the following to a URL:

   ?lineprof=app/views/projects/notes/_note

rack-lineprof is only enabled when:

1. The application runs in development mode
2. The used Ruby is MRI
3. The environment variable ENABLE_LINEPROF is set to a non-empty value
2015-10-15 12:05:01 +02:00
Yorick Peterse 7971ed5dac Added active_record_query_trace
This can be used to track down where queries originate from, regardless
of whether they're caused by N+1 problems or not. This can be enabled by
setting the environment variable ENABLE_QUERY_TRACE to a non-empty value
(e.g. "true").
2015-10-15 12:05:01 +02:00
Yorick Peterse fa3d7db390 Added Bullet to the Gemfile
This can be used to resolve N+1 query problems. Bullet is disabled by
default and can be enabled by starting Rails with the environment
variable ENABLE_BULLET set to a non empty value (e.g. "true").
2015-10-15 12:05:01 +02:00
Yorick Peterse 39fcd445fa Use note.author for issue comment avatars
This removes the need for running a query to find the User object again
based on the supplied Email address.
2015-10-15 12:05:01 +02:00
Yorick Peterse 1554786c6a Eager load various issue/note associations
This ensures we don't end up running N+1 queries for the objects in the
affected collections.
2015-10-15 12:05:01 +02:00
Yorick Peterse ff8f7fb0a1 Re-use User for avatars in link_to_member 2015-10-15 12:05:01 +02:00
Yorick Peterse 9496356367 Re-use User objects for avatar_icon where possible
This removes the need for running an extra SQL query in these cases.
2015-10-15 12:05:01 +02:00
Yorick Peterse 693e63f523 Allow avatar_icon to operate on a User
If the User object is already known before calling this method being
able to re-use said object can save us an extra SQL query.
2015-10-15 12:05:01 +02:00
Dmitriy Zaporozhets fb7785628a Merge branch 'rs-update-uglifier' into 'master'
Update uglifier to ~> 2.7.2

Fixes a security vulnerability:

- https://github.com/lautis/uglifier/pull/86
- https://github.com/mishoo/UglifyJS2/issues/751
- https://zyan.scripts.mit.edu/blog/backdooring-js/

See merge request !1590
2015-10-15 08:21:18 +00:00
Douwe Maan e2045f5e68 Merge branch 'rs-issues_sentence' into 'master'
Simplify the `issues_sentence` helper



See merge request !1598
2015-10-15 07:27:53 +00:00
Douwe Maan 7ad6852363 Merge branch 'rs-mr-tabs-scroll' into 'master'
Prevent a JS error in MergeRequestTabs

When `window.location.hash` is pointing to a note, e.g. `#note_1234`,
`scrollToElement` would throw an error because a selector such as
`.commits #note_1234` doesn't exist, so `offset()` returned `undefined`.

This error would prevent subsequent calls from running, which caused the
loading spinner to never be hidden.

Now we ensure the selector returns a valid element before trying to
scroll to it.

This is the proper fix for !1553.

See merge request !1597
2015-10-15 07:26:39 +00:00
Robert Speicher 976400c1e6 Merge branch 'incoming-email-config' into 'master'
Make Reply by email easier to configure

Builds on !1566.

Omnibus companion MR: gitlab-org/omnibus-gitlab!510 (cc @marin)

See merge request !1580
2015-10-14 20:38:36 +00:00
Robert Speicher 459b882131 Shut up, Rubocop
[ci skip]
2015-10-14 16:31:54 -04:00
Robert Speicher 9750de4943 Simplify the issues_sentence helper 2015-10-14 16:30:19 -04:00
Robert Speicher 123669a551 Merge branch 'simplify-cross-references' into 'master'
Simplify code around (cross)-references

See merge request !1568
2015-10-14 20:10:34 +00:00
Robert Speicher fc0d92746d Prevent a JS error in MergeRequestTabs
When `window.location.hash` is pointing to a note, e.g. `#note_1234`,
`scrollToElement` would throw an error because a selector such as
`.commits #note_1234` doesn't exist, so `offset()` returned `undefined`.

This error would prevent subsequent calls from running, which caused the
loading spinner to never be hidden.

Now we ensure the selector returns a valid element before trying to
scroll to it.
2015-10-14 15:01:25 -04:00
Kamil Trzciński a3a80eac11 Merge branch 'show_pending_warning' into 'master'
Show warning when build is pending and there are not runners

This change is based on: !1530.

This resolves #2967.



See merge request !1573
2015-10-14 18:57:05 +00:00
Kamil Trzciński 45c0b74dc4 Merge branch 'predefined_build_variables' into 'master'
Add a few predefined variables to CI builds

This adds CI_BUILD_TAG, CI_BUILD_STAGE, CI_BUILD_NAME and CI_BUILD_TRIGGERED to build environment.

This change is based on: !1530 

See merge request !1572
2015-10-14 18:55:59 +00:00
Valery Sizov 0b9273a283 Merge branch 'uploads_path_fix' into 'master'
Fix: Images cannot show when projects' path was changed

Fixes #1443

See merge request !1521
2015-10-14 18:02:23 +00:00
Valery Sizov ffb99edc26 Merge branch 'revert_service_passwd' into 'master'
Revert "Improve invalidation of stored service password if the endpoint URL is changed"

This reverts commit b463975480.

See merge request !1595
2015-10-14 17:48:41 +00:00
Valery Sizov b83a18a55c Revert "Improve invalidation of stored service password if the endpoint URL is changed"
This reverts commit b463975480.
2015-10-14 19:21:27 +03:00
Valery Sizov 2fb02f9252 Merge branch 'fix/improve_reset_service_password' into 'master'
Improve invalidation of stored service password if the endpoint URL is changed

A number of issues were found in !1490 and !1558 (triggered by support request 7395)

* It is not possible to set a new URL and a password at the same time (new password is ignored)
* An error occurs on the Service Templates admin pages (prop_updated? was referencing the service's project, which is not defined for templates)
* Passwords are reset on every save in Service Templates admin pages

This should fix these 3 issues by respectively:
* Differentiating a property that has been assigned a new value (regardless of the new value) and a property that has been assigned a new value that is different from the old one
* Providing an alternate implementation to detected updated properties, not relying on the service's project
* Filtering an empty password parameter passed to the Service Templates admin page like on the project service page

See merge request !1583
2015-10-14 16:01:35 +00:00
Valery Sizov 8f584d5f2c Fix: Images cannot show when projects' path was changed 2015-10-14 18:50:35 +03:00
Valery Sizov a2f0a3650b Merge remote-tracking branch 'origin/cernvcs_hide_passwrd' 2015-10-14 18:40:58 +03:00
Kamil Trzcinski d9e2232f63 Fix warning sign 2015-10-14 17:29:18 +02:00
Kamil Trzcinski 16bfd9d31a Fix specs 2015-10-14 17:29:18 +02:00
Kamil Trzcinski 7af4f5215e Show warning if build doesn't have runners with specified tags or runners didn't connect recently
Slightly refactor runner status detection: moving it to Runner class

Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
2015-10-14 17:29:18 +02:00
Kamil Trzcinski 5807419519 Use tag? instead of tag to indicate that this is boolean 2015-10-14 17:28:17 +02:00
Kamil Trzcinski 7b5ab3ded5 Added CI_BUILD_TAG, _STAGE, _NAME and _TRIGGERED to CI builds 2015-10-14 17:28:17 +02:00
Kamil Trzcinski 2d0fcb4de2 Fix spinach tests introduced by 07101cfab6 2015-10-14 17:27:29 +02:00
Valery Sizov 6c1faf4b33 Merge remote-tracking branch 'origin/inified_404_error' 2015-10-14 18:21:27 +03:00
Kamil Trzciński 3b93d37e78 Merge branch 'fix-retry-and-cancel' into 'master'
Fix retry and cancel for build

This fixes some regressions introduced by Commit Status API

See merge request !1586
2015-10-14 13:40:33 +00:00
Alex Lossent b463975480 Improve invalidation of stored service password if the endpoint URL is changed
It now allows to specify a password at the same time as the new URL, and works
on the service template admin pages.
2015-10-14 15:27:59 +02:00
Douwe Maan 07101cfab6 Merge branch 'fix_issue_2906' into 'master'
+ and Titleize New Project button on dashboard

Hello there. Its my first merge request in open source world. So please be tolerant to me if i do something wrong.

I try to fix https://gitlab.com/gitlab-org/gitlab-ce/issues/2906

See merge request !1564
2015-10-14 12:14:31 +00:00
Valery Sizov 4117d9b310 Merge branch 'feature/api_hide_service_password' of gitlab.com:cernvcs/gitlab-ce 2015-10-14 14:15:34 +03:00
Kamil Trzcinski 33c9d6e45c Fix retry and cancel for build 2015-10-14 12:56:52 +02:00
Douwe Maan 276b3a7bc2 Make Mentionable#cross_reference_exists? private. 2015-10-14 09:27:39 +02:00
Douwe Maan 613aa1cb87 Add defaults for incoming_email ssl and start_tls. 2015-10-14 07:21:15 +00:00
Robert Speicher 0fbb544c50 Update uglifier to ~> 2.7.2 2015-10-14 02:39:59 -04:00
Robert Speicher 530f0d71f5 Shut up, Rubocop 2015-10-14 01:07:58 -04:00
Robert Speicher 82da19cecd Merge branch 'mailroom-arbitration' into 'master'
Enable arbitration in MailRoom

Fixes #2870.

See merge request !1566
2015-10-13 22:26:05 +00:00
Dmitriy Zaporozhets 52983a84b9 Merge branch 'stanhu/gitlab-ce-wiki-add-new-page-in-pages-tab' 2015-10-13 20:32:06 +02:00
Dmitriy Zaporozhets 1a57fbc437 Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq 2015-10-13 20:31:11 +02:00
Dmitriy Zaporozhets 989928eca3 Merge branch 'gfm-commit-size' 2015-10-13 20:30:57 +02:00
Stan Hu ea2008df93 Merge pull request #9723 from sue445/tweak_api_doc
Tweak api doc
2015-10-13 10:17:23 -07:00
Stan Hu e0072892e8 Merge branch 'add-wip-to-mr-hook-attrs' into 'master'
merge_request: add work_in_progress to MR hooks



See merge request !1443
2015-10-13 17:12:51 +00:00
Valery Sizov 8346dde052 Only render 404 page from /public 2015-10-13 20:12:34 +03:00
Douwe Maan 135ec3242d Reduce font size of commit references to not stand out as much 2015-10-13 18:41:29 +02:00