Commit Graph
3639 Commits
Author SHA1 Message Date
Douwe Maan 8de1f7159c Merge branch 'mikew1/gitlab-ce-better-asana-refs' into 'master'
Better support for referencing and closing issues in asana_service.rb (by @mikew1)



See merge request !2302
2016-01-05 16:10:16 +00:00
Douwe Maan 0bab4788ef Satisfy Rubocop 2016-01-05 16:31:05 +01:00
Douwe Maan 9b1270280a Merge branch 'rs-abuse-reports-refactor' into 'master'
Abuse Report refactors

- Redirect back to user profile after report
- "Tell, Don't Ask" for sending report notifications

See merge request !2293
2016-01-05 14:11:15 +00:00
Douwe Maan 2479af4d5a Merge branch 'pr-9938' into 'master'
Merge pull request GH-9938 from huacnlee/hotfix/note_mail_with_notification

Hotfix note mail with notification

See merge request !2288
2016-01-05 14:00:13 +00:00
Douwe Maan a7c424515c Merge branch 'rs-relative-links-to-root' into 'master'
Support a single directory traversal in RelativeLinkFilter

Prior, if we were viewing a blob at
`https://example.com/namespace/project/blob/master/doc/some-file.md` and
it contained a relative link such as `[README](../README.md)`, the
resulting link when viewing the blob would be:
`https://example.com/namespace/project/blob/README.md` which omits the
`master` ref, resulting in a 404.

Fixes https://gitlab.com/gitlab-org/release-tools/issues/3

See merge request !2247
2016-01-05 13:32:25 +00:00
Dmitriy Zaporozhets aa3c7219e3 Merge branch 'fix-api-lookup-with-usernames-with-dots' of https://gitlab.com/stanhu/gitlab-ce 2016-01-05 10:43:29 +01:00
Dmitriy Zaporozhets e6713cd945 Merge branch 'improved-leave-project' into 'master'
Adds settings menu to the top for editting and leaving projects

@creamzy @skyruler @dzaporozhets 
Menu contents depends on user's rights.

Fixes #4221


![Screen_Shot_2015-12-23_at_10.02.47_PM](/uploads/daeaef937bf9d9f4db7ccb674e344ac1/Screen_Shot_2015-12-23_at_10.02.47_PM.png)
![Screen_Shot_2015-12-23_at_10.02.41_PM](/uploads/58eb4eea7d640f01d7f05c2a408a2c04/Screen_Shot_2015-12-23_at_10.02.41_PM.png)
![Screen_Shot_2015-12-23_at_10.02.55_PM](/uploads/4b2ae027a13efcbad3eb81b04f134c4f/Screen_Shot_2015-12-23_at_10.02.55_PM.png)
![Screen_Shot_2015-12-23_at_10.04.47_PM](/uploads/bd5d9d8ddd72d16d74c32c6c1f569776/Screen_Shot_2015-12-23_at_10.04.47_PM.png)


See merge request !2195
2016-01-05 09:34:13 +00:00
Dmitriy Zaporozhets 9914893954 Merge branch 'metrics-tuning' into 'master'
Tuning of metrics data to store

This removes data we don't really need, as well as making sure we don't overload any cache stores or databases.

See merge request !2265
2016-01-05 09:32:19 +00:00
Robert Speicher 46a220ae3c Add AbuseReport#notify
Tell, Don't Ask.
2016-01-04 18:59:42 -05:00
Robert Speicher 01248d2051 Make AbuseReportMailer responsible for knowing if it should deliver 2016-01-04 18:59:25 -05:00
Stan Hu 93096247d8 Don't notify users twice if they are both project watchers and subscribers
Closes #4708
2016-01-04 15:01:52 -08:00
Robert Speicher 6f4ea679d9 Merge branch 'show-all-builds-by-default' into 'master'
Show all builds by default in the builds page

Fixes #4240 

See merge request !2243
2016-01-04 18:42:37 +00:00
Douwe MaanandRobert Speicher 12ce1cbfcf Merge pull request GH-9938 from huacnlee/hotfix/note_mail_with_notification
Hotfix note mail with notification
2016-01-04 13:33:58 -05:00
Dmitriy Zaporozhets e586492e48 Merge branch 'rs-issue-201' into 'master'
Prevent duplicate "username has already been taken" validation message

Closes #201 - two-year-old bug, woo! 💥 🎉

See merge request !2279
2016-01-04 17:20:38 +00:00
Stan Hu 561acdebf8 Merge branch 'extra-system-hooks' into 'master'
Added system hooks messages for renaming and transferring a project

This is work in progress but I wanted to get some feedback on it in case there is something I've missed or a better way to do it.

As the title says when a project is renamed or transferred to another group a system hook message is generated.

Currently adds a couple of extra properties to the standard project system hooks messages.

old_path_with_namespace - The old path of the project so we can see what has been renamed / transferred
changed_at - The time that change took place

My main concern is if there is a better way of doing this than passing the extra_data variable into the system hook.  Would it be better to extend the project model with these 2 items as transient properties as I doubt they would need to be saved to the database?  The other 

I've also seen, but can't find, someone talking about the emails sent when a project is renamed or transferred doesn't reference the original project path so if you have similarly named projects then you might not know what has been moved.  I think the extra_data (or however it is best to implement this) would allow the extra information to be sent in emails.

Closes [System hooks for project transfer and repository rename](http://feedback.gitlab.com/forums/176466-general/suggestions/6006233-system-hooks-for-project-transfer-and-repository-r)


See merge request !611
2016-01-04 15:39:52 +00:00
Jacob Schatz 6180560318 rempves tests for "you have master access" text 2016-01-04 10:36:53 -05:00
Valery Sizov 8b18449125 remove public field from namespace and refactoring 2016-01-04 16:00:29 +02:00
Steve Norman 79ec7f2897 Added system hooks messages for renaming and transferring a project 2016-01-04 13:48:00 +00:00
Yorick Peterse 8de491a68f Fix Rubocop styling in AR subscriber specs 2016-01-04 14:21:39 +01:00
Douglas Barbosa Alexandre 567dc62b6d Show 'All' tab by default in the builds page 2016-01-04 10:21:10 -02:00
Yorick Peterse 2ee8f55599 Automatically prefix transaction series names
This ensures Rails and Sidekiq transactions are split into the series
"rails_transactions" and "sidekiq_transactions" respectively.
2016-01-04 13:17:02 +01:00
Yorick Peterse 2ea464bb27 Use separate series for Rails/Sidekiq sample stats
This removes the need for any tags to differentiate between Sidekiq and
Rails statistics while still being able to separate the two.
2016-01-04 12:45:31 +01:00
Yorick Peterse 825b46f8a3 Track total method call times per transaction
This makes it easier to see where time is spent without having to
aggregate all the individual points in the method_calls series.
2016-01-04 12:19:45 +01:00
Yorick Peterse 66a997a914 Track total query/view timings in transactions 2016-01-04 12:14:36 +01:00
Yorick Peterse 96075be6f4 Ability to increment custom transaction values
This will be used to store/increment the total query/view rendering
timings on a per transaction basis. This in turn can greatly reduce the
amount of metrics stored.
2016-01-04 11:37:46 +01:00
Stan Hu 086cfc8685 Fix API project lookups when querying with a namespace with dots
Attempting to use the /projects/:id API by specifying :id in
"namespace/project" format would always result in a 404 if the namespace
contained a dot.

The reason? From http://guides.rubyonrails.org/routing.html#specifying-constraints:

"By default the :id parameter doesn't accept dots - this is because the dot is
used as a separator for formatted routes. If you need to use a dot within an
:id add a constraint which overrides this - for example id: /[^\/]+/ allows
anything except a slash."

Closes https://github.com/gitlabhq/gitlabhq/issues/9573
2016-01-03 15:08:44 -08:00
Robert Speicher fd178c1e7d Prevent duplicate "username has already been taken" validation message
Closes #201 - two-year-old bug, woo! 💥 🎉
2016-01-02 20:03:28 -05:00
Mike Wyatt cf4ccdda27 Merge remote-tracking branch 'upstream/master' into better-asana-refs
* upstream/master: (307 commits)
  Update CHANGELOG
  spinach fix
  Updated allocations Gem to version 1.0.3
  Removed various default metrics tags
  Update CHANGELOG
  Fix "I see current user as the first user" step
  Swap Author and Assignee Selectors on issuable index view
  Update CHANGELOG
  Make sure that is no pending migrations in Gitlab::CurrentSettings
  Added additional config environmental variables to help Debian packaging
  We don't use whenever anymore. Lets remove the schedule file
  Fix project transfer e-mail sending incorrect paths in e-mail notification
  Update CHANGELOG
  Use Gitlab::CurrentSettings for InfluxDB
  Write to InfluxDB directly via UDP
  Strip newlines from obfuscated SQL
  Add hotfix that allows to access build artifacts created before 8.3
  note votes methids implementation
  When reCAPTCHA is disabled, allow registrations to go through without a code
  Downcased user or email search for avatar_icon.
  ...
2015-12-31 18:45:55 -04:00
Mike Wyatt 571df5f44b Use execute in Asana specs 2015-12-31 18:29:00 -04:00
Mike Wyatt 90029a5caa Actually test the posted comment in Asana service 2015-12-31 18:27:34 -04:00
Yorick Peterse cafc784ee1 Removed tracking of hostnames for metrics
This isn't hugely useful and mostly wastes InfluxDB space. We can re-add
this whenever needed (but only once we really need it).
2015-12-31 17:55:10 +01:00
Yorick Peterse bd9f86bb8a Use separate series for Rails/Sidekiq transactions
This removes the need for tagging all metrics with a "process_type" tag.
2015-12-31 17:52:51 +01:00
Yorick Peterse 55ed6e1c96 Cache InfluxDB settings after the first use
This ensures we don't need to load anything from either PostgreSQL or
the Rails cache whenever creating new InfluxDB connections.
2015-12-31 17:47:07 +01:00
Yorick Peterse a6c60127e3 Removed tracking of raw SQL queries
This particular setup had 3 problems:

1. Storing SQL queries as tags is very inefficient as InfluxDB ends up
   indexing every query (and they can get pretty large). Storing these
   as values instead means we can't always display the SQL as easily.
2. We already instrument ActiveRecord query methods, thus we already
   have timing information about database queries.
3. SQL obfuscation is difficult to get right and I'd rather not expose
   sensitive data by accident.
2015-12-31 17:14:02 +01:00
Yorick Peterse 054df415f9 Optimize CSS expressions produced by Nokogiri
Nokogiri produces inefficient XPath expressions when given CSS
expressions such as "a.gfm". Luckily these expressions can be optimized
quite easily while still achieving the same results.

In the two cases where this optimization is applied the run time has
been reduced from around 170 ms to around 15 ms.
2015-12-31 15:46:47 +01:00
Yorick Peterse c936e4e3c8 Removed various default metrics tags
While it's useful to keep track of the different versions (Ruby, GitLab,
etc) doing so for every point wastes disk space and possibly also RAM
(which InfluxDB is all to eager to gobble up). If we want to see the
performance differences between different GitLab versions simply looking
at the performance since the last release date should suffice.
2015-12-31 11:26:04 +01:00
Robert Speicher d9d2e8a3e8 Support a single directory traversal in RelativeLinkFilter
Prior, if we were viewing a blob at
`https://example.com/namespace/project/blob/master/doc/some-file.md` and
it contained a relative link such as `[README](../README.md)`, the
resulting link when viewing the blob would be:
`https://example.com/namespace/project/blob/README.md` which omits the
`master` ref, resulting in a 404.
2015-12-30 15:36:59 -05:00
Mike Wyatt d67f697d9e Merge remote-tracking branch 'origin/master' into better-asana-refs
* origin/master:
  Use lazy reference extractor to get issue's MRs
  Banzai::XFilter -> Banzai::Filter::XFilter
  Move Markdown/reference logic from Gitlab::Markdown to Banzai
2015-12-30 00:33:15 -04:00
Mike Wyatt 4c1f1c2c91 Update Asana specs 2015-12-29 15:40:50 -04:00
Valery Sizov eeba266e3d Merge branch 'upvote_count_to_api' into 'master'
Revert upvotes and downvotes params back to MR API

issue https://gitlab.com/gitlab-org/gitlab-ce/issues/3672

See merge request !2212
2015-12-29 16:07:12 +00:00
Yorick Peterse 620e7bb3d6 Write to InfluxDB directly via UDP
This removes the need for Sidekiq and any overhead/problems introduced
by TCP. There are a few things to take into account:

1. When writing data to InfluxDB you may still get an error if the
   server becomes unavailable during the write. Because of this we're
   catching all exceptions and just ignore them (for now).
2. Writing via UDP apparently requires the timestamp to be in
   nanoseconds. Without this data either isn't written properly.
3. Due to the restrictions on UDP buffer sizes we're writing metrics one
   by one, instead of writing all of them at once.
2015-12-29 14:53:45 +01:00
Yorick Peterse 03478e6d5b Strip newlines from obfuscated SQL
Newlines aren't really needed and they may mess with InfluxDB's line
protocol.
2015-12-29 13:40:08 +01:00
Robert Speicher f0ecd69be5 Merge branch 'fix-spelling-mistake' into 'master'
Fix spelling mistake, thanks Connor.

[ci skip]

See merge request !2227
2015-12-29 00:13:16 +00:00
Jacob Schatz d985d08a19 adds proper it for multi line. adds find with correct id for button. 2015-12-28 17:37:03 -05:00
Jacob Schatz c6c96708b5 Merge branch 'master' into improved-leave-project 2015-12-28 17:08:12 -05:00
Yorick Peterse ed214a11ca Handle missing settings table for metrics
This ensures we can still boot, even when the "application_settings"
table doesn't exist.
2015-12-28 22:38:34 +01:00
Jacob Schatz 8ee6abaaf4 fixes tests failing 2015-12-28 14:45:23 -05:00
Sytse Sijbrandij 4465e2eca0 Fix spelling mistake, thanks Connor. 2015-12-28 17:08:15 +01:00
Dmitriy Zaporozhets 540eb0a9af Merge branch 'influxdb' into 'master'
Storing of application metrics in InfluxDB

This adds support for tracking metrics in InfluxDB, which in turn can be visualized using Grafana. For more information see #2936.

See merge request !2042
2015-12-28 13:42:15 +00:00
Yorick Peterse db7bbadf95 Fixed styling of MetricsWorker specs 2015-12-28 11:34:11 +01:00