Commit Graph
233 Commits
Author SHA1 Message Date
Rémy Coutable e79b867d2b Ensure empty recipients are rejected in BuildsEmailService
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-04-06 16:14:51 +02:00
Yorick Peterse 84b0ab7766 Added & use Gitlab::Routing for URL helpers
Rails' "url_helpers" method creates an anonymous Module (which a bunch
of methods) on every call. By caching the output of this method in a
dedicated method we can shave off about 10 seconds of loading time for
an issue with around 200 comments.
2016-04-01 11:13:48 +02:00
Stan Hu 2fa20f2d4f Handle nil descriptions in Slack issue messages
Closes #14676
2016-03-28 04:15:41 -07:00
James Lopez fc610c182e add SHA256 to secure_compare 2016-03-08 15:57:45 +01:00
James Lopez ecb1c59665 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into fix/token-timing-attack 2016-03-08 15:55:04 +01:00
Rubén Dávila eb068b0fff Add commit message to JIRA's notification payload. 2016-03-03 09:55:53 -05:00
James Lopez 70623cd423 fix token issue - timing attack 2016-03-02 12:18:43 +01:00
Dmitriy Zaporozhets e7364050b0 Revert "Merge branch 'issue_5854' into 'master' "
This reverts merge request !2992
2016-02-29 17:30:41 +00:00
Rubén Dávila 496b9c0761 Add commit message to JIRA's notification payload. 2016-02-26 20:11:34 -05:00
Rémy Coutable 1de9513790 Use project.web_url instead deprecated repository.homepage in PushoverService 2016-02-16 13:03:00 +01:00
Yorick Peterse b4ee6f57b9 Greatly improve external_issue_tracker performance
This greatly improves the performance of Project#external_issue_tracker
by moving most of the fields queried in Ruby to the database and letting
the database handle all logic. Prior to this change the process of
finding an external issue tracker was along the lines of the following:

1. Load all project services into memory.
2. Reduce the list to only services where "issue_tracker?" returns true
3. Reduce the list from step 2 to service where "default?" returns false
4. Find the first service where "activated?" returns true

This has to two big problems:

1. Loading all services into memory only to reduce the list down to a
   single item later on is a waste of memory (and slow timing wise).
2. Calling Array#select followed by Array#reject followed by Array#find
   allocates extra objects when this really isn't needed.

To work around this the following service fields have been moved to the
database (instead of being hardcoded):

* category
* default

This in turn means we can get the external issue tracker using the
following query:

    SELECT *
    FROM services
    WHERE active IS TRUE
    AND default IS FALSE
    AND category = 'issue_tracker'
    AND project_id = XXX
    LIMIT 1

This coupled with memoizing the result (just as before this commit)
greatly reduces the time it takes for Project#external_issue_tracker to
complete. The exact reduction depends on one's environment, but locally
the execution time is reduced from roughly 230 ms to only 2 ms (= a
reduction of almost 180x).

Fixes gitlab-org/gitlab-ce#10771
2016-01-19 14:03:20 +01:00
Douwe Maan c7d9e7806a Merge branch 'fix/reference_filter_uri_decode_error_for_master' into 'master'
Fix #9963 reference_filter "Encoding::CompatibilityError" bug with some complex URL;

https://github.com/gitlabhq/gitlabhq/pull/9964

@DouweM

See merge request !2383
2016-01-13 14:21:32 +00:00
Landon 4819de1e70 Mention channel/key bug in irkerd docs
Per this issue: https://gitlab.com/esr/irker/issues/2

A documentation update was added to irkerd (https://gitlab.com/esr/irker/commit/190808c37d4ab5f0f16fe35352ff36863c2732d5) but the bug is still there. Making a note of it here could save someone a lot of hassle. 

This could probably be worded better if someone else wants to take a stab at it.
2016-01-12 15:54:09 -07:00
Jason Lee 932a247f5f Use CGI.escape instead of URI.escape, because URI is obsoleted.
ref: https://github.com/ruby/ruby/commit/238b979f1789f95262a267d8df6239806f2859cc
2016-01-12 18:20:03 +08:00
Robert Speicher 4de89291a3 Merge branch 'fix_jira_shortterm' into 'master'
Do not call API if there is no API URL

Fixes #5878 

CE users may not be interested in the new JIRA features. In this case,
we should detect they haven't set an API URL and fallback to the
behavior pre-8.3. This patch does that very easily.

There are planned improvements to JIRA in future releases such as
gitlab-org/gitlab-ce#5541 which will make this more configurable.

See merge request !2341
2016-01-10 22:12:10 +00:00
Stan Hu 7403df6ca7 Merge branch 'suppress-allow-failure-builds' into 'master'
Suppress e-mails on failed builds if allow_failure is set

Every time I push to GitLab, I get > 2 emails saying a spec failed when I don't care about the benchmarks and others that have `allow_failure` set to `true`.

@ayufan mentioned creating a summary e-mail to prevent getting one e-mail per build, but the latter might actually be desirable. For example, I do want to know if Rubocop errors fail right away.

See merge request !2178
2016-01-08 17:31:35 +00:00
Achilleas Pipinellis d09f1a4443 Remove useless assignment to variable 2016-01-08 15:22:42 +01:00
Achilleas Pipinellis fc7b14a534 Remove reference to EE from JIRA service model 2016-01-08 13:21:40 +01:00
Drew Blessing f7fdcb95da Do not call API if there is no API URL 2016-01-07 16:23:42 -06:00
Stan Hu 69209612e1 Suppress e-mails on failed builds if allow_failure is set
Every time I push to GitLab, I get > 2 emails saying a spec failed when
I don't care about benchmarks and other specs that have `allow_failure` set to `true`.
2016-01-07 10:45:39 -08:00
Stan Hu 79c0e7212a Annotate models 2016-01-06 13:09:55 +00:00
Mike Wyatt bb6b793c55 Don't log backtrace in Asana service 2016-01-04 11:19:39 -04: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 9e7a88f089 Better handling of errors in Asana service
[ci skip]
2015-12-30 00:52:56 -04:00
Mike Wyatt 7b98d0e1a2 Update Asana service documentation 2015-12-30 00:51:05 -04:00
Mike Wyatt 6eb273a11c Restore colon in Asana comment 2015-12-30 00:50:44 -04:00
Mike Wyatt e8080fc8fb Fix error in Asana service 2015-12-29 16:00:36 -04:00
Mike Wyatt 12ec1e3c40 Update Asana service to work with Personal Access Token, lessen number of requests to Asana API 2015-12-29 15:39:58 -04:00
Mike Wyatt 2cd2c54bd1 Update Asana field descriptions 2015-12-29 15:37:48 -04:00
Kamil Trzcinski a495b9bc18 Deprecate GitLabCiService making it to always be inactive 2015-12-22 00:28:38 +01:00
Drew Blessing f177aaa5fa Backport JIRA service 2015-12-18 14:19:48 -06:00
Mike Wyatt b45ee2c314 better support for referencing and closing issues in asana_service.rb 2015-12-16 10:08:05 -04:00
Gabriel Mazetto 9072098215 Fixed CiServices validation 2015-12-15 17:37:23 -02:00
Gabriel Mazetto b5291f9599 Fixed Rubocop offenses 2015-12-15 00:53:52 -02:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Kamil Trzcinski 8b4cdc50fc Fix indentation and BuildsEmailService 2015-12-11 18:01:57 +01:00
Kamil Trzcinski 71e6a93db9 Change default values 2015-12-11 13:28:40 +01:00
Kamil Trzcinski dc4e2744ba Fix issue tracker service 2015-12-10 17:21:06 +01:00
Kamil Trzcinski 80f8074d01 Migrate SlackService and HipChat service 2015-12-10 16:04:08 +01:00
Kamil Trzcinski d5c91bb9a6 Migrate CI WebHooks and Emails to new tables 2015-12-10 16:04:08 +01:00
Kamil Trzcinski 2988e1fbf5 Migrate CI::Services and CI::WebHooks to Services and WebHooks 2015-12-10 16:04:08 +01:00
Robert Speicher d5ea93469b Add custom UrlValidator 2015-12-07 16:57:26 -05:00
Valery Sizov 162cd0099c fix deprecation messages in tests 2015-12-03 10:33:43 +02:00
Valery Sizov f1504e1ad5 test fix 2015-11-30 18:03:07 +02:00
Valery Sizov e92ceb7b57 fix specs 2015-11-30 16:12:31 +02:00
Valery SizovandValery Sizov 7f214cee74 Migrate mailers to ActiveJob 2015-11-26 17:03:43 +02:00
Kamil Trzcinski 57e974c03b Fix 500 when using CI
- Fix for Ci::Build state machine, allowing to process builds without the project
- Forcefully update builds that didn't want to update with state machine
- Fix saving GitLabCiService as Admin Template
2015-11-23 13:51:41 +01:00
Stan Hu ad1f451f24 Fix Drone web hook URL not being updated 2015-11-20 08:13:25 -08:00
Dmitriy Zaporozhets 3cebe9e780 Refactor duplciate code for groups_controller.rb and slack_service/note_message.rb
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-17 11:03:18 +01:00
Dmitriy Zaporozhets a237999f00 Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-13 19:22:46 +01:00