Commit Graph

383 Commits

Author SHA1 Message Date
Douwe Maan 577f2fb47a Save and use actual diff base commit for MR diff highlighting 2016-01-20 18:44:27 +01:00
Douwe Maan 4f44455626 Merge branch 'master' into user-ldap-email
# Conflicts:
#	db/schema.rb
2016-01-19 18:30:59 +01:00
Douwe Maan 98e1a5b634 Allow LDAP users to change their email if it was not set by the LDAP server 2016-01-19 16:25:38 +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
Kirilll Zaycev e80113593c Raise hook url limit 2016-01-15 00:35:12 +03:00
Grzegorz Bizon 662f4b9e1d Add artifacts metadata uploader filed
Artifacts metadata field will be used to store a filename of gzipped
file containing metadata definition for given artifacts archive.
2016-01-14 12:48:14 +01:00
Robert Speicher 6ae39c2cd1 Remove alert_type attribute from BroadcastMessage 2016-01-13 11:34:57 -05:00
Yorick Peterse 2367160015 Make the metrics sampler interval configurable 2016-01-13 12:29:48 +01:00
Yorick Peterse 8fdc00bd4c Remove InfluxDB username/password
InfluxDB over UDP doesn't use authentication, thus there's no need for
these settings.
2016-01-06 17:49:56 +01:00
Andriy Dyadyura f7ba38c073 markdown fixes 2016-01-05 10:45:18 +01:00
Valery Sizov 8b18449125 remove public field from namespace and refactoring 2016-01-04 16:00:29 +02: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
Gabriel Mazetto a3469d914a reCAPTCHA is configurable through Admin Settings, no reload needed. 2015-12-28 18:50:29 -02:00
Yorick Peterse 4d925f2147 Move InfluxDB settings to ApplicationSetting 2015-12-28 18:00:32 +01:00
Gabriel Mazetto 31fb2b7702 Grace period support for TFA 2015-12-24 19:01:30 -02:00
Gabriel Mazetto 33964469b3 WIP require two factor authentication 2015-12-24 19:00:18 -02:00
Valery Sizov b6de0d2830 Emoji picker: better alias handling 2015-12-24 11:28:55 +02:00
Drew Blessing be41d84fb0 Allow account unlock via email 2015-12-14 15:35:02 -06:00
Grzegorz Bizon 2ec93abed7 Merge branch 'master' into ci/persist-registration-token
* master: (66 commits)
  Fix runners admin view
  Fix migrations
  Rename mention of gitlab-git-http-server to gitlab-workhorse
  Bump Redis requirement to 2.8 for Sidekiq 4 requirements
  Fix wording on runner setup page
  add details on how to change saml button label
  Fix tests
  Move awards back to gray panel and few improvements to sidebar
  Few UI improvements to new sidebar implementation
  Fix tests for new issuable sidebar
  Update changelog
  Implement new sidebar for merge request page
  Make edit link on issuable sidebar works
  Redesign issue page for new sidebar
  Move awards css to separate file
  Implement issuable sidebar partial
  Update CHANGELOG
  Clarify cache behavior
  Run builds from projects with enabled CI
  Use Gitlab::Git instead of Ci::Git
  ...

Conflicts:
	db/schema.rb
2015-12-14 12:26:40 +01:00
Kamil Trzcinski 91cdb08d5f Rename columns and rename migrations 2015-12-11 18:02:09 +01:00
Kamil Trzcinski e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00
Grzegorz Bizon 4a32b07d9e Add `runners_registration_token` to ApplicationSettings 2015-12-11 10:39:39 +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
Zeger-Jan van de Weg cfc95b8287 Fix schema 2015-12-07 10:14:37 +01:00
Andrew Tomaka 1c53dc28b5 Notify user if they cannot create projects 2015-12-05 11:32:08 -05:00
Valery Sizov 40ff1318d2 Rails update to 4.2.4 2015-11-25 18:18:44 +02:00
Dmitriy Zaporozhets 68d4ab2381 Merge branch 'emoji_votes' into 'master'
Award Emoji

This it first iteration of award emoji feature.
We have plan to extend emoji picker by the next release.

For now, you can add award by clicking to the emoji picker or posting a regular comment with emoji like "👍" and any other. You can post not only emoji that listed in the emoji picker.

See merge request !1825
2015-11-19 21:34:38 +00:00
Yorick Peterse e4ae8b1385 Updated DB schema with new issues/projects indexes 2015-11-19 11:48:50 +01:00
Yorick Peterse a42d469ab2 Merge branch 'atom-feed-latest-update' into 'master'
Improve performance of user profiles, finding groups, and finding projects

This MR improves the following:

* Rendering of profile pages and Atom feeds
* Finding groups (using GroupsFinder & friends)
* Finding projects (using ProjectsFinder & friends)

Initially this MR was intended to only improve rendering of Atom feeds, but over time other fixes were introduced as well as the same code was the cause of all these problems.

See merge request !1790
2015-11-19 10:05:53 +00:00
Valery Sizov a2912074be satisfy rubocop 2015-11-19 01:31:15 +02:00
Valery Sizov fa2ed94fe9 fix schema 2015-11-19 01:26:00 +02:00
Valery Sizov fdd5a8f2e1 addressing comments 2015-11-19 01:26:00 +02:00
Valery Sizov fd2c0fe446 award emoji 2015-11-19 01:25:27 +02:00
Yorick Peterse ee2739e606 Added an index on namespaces.public 2015-11-18 17:24:51 +01:00
Douwe Maan 531177757e Add import_error to project. 2015-11-18 12:00:48 +01:00
Marin Jankovski 84c71e5d82 Add unique to oid index for lfs object. 2015-11-16 15:59:15 +01:00
Marin Jankovski f445d3d1f3 unique is for indexes. 2015-11-16 15:36:14 +01:00
Marin Jankovski 14032d8eb1 Add support for git lfs. 2015-11-16 12:39:13 +01:00
Kamil Trzcinski d0e3e823a2 Implement Build Artifacts
- Offloads uploading to GitLab Workhorse
- Use /authorize request for fast uploading
- Added backup recipes for artifacts
- Support download acceleration using X-Sendfile
2015-11-10 12:51:50 +01:00
Dmitriy Zaporozhets 354b69dde2
Merge remote-tracking branch 'origin/release-notes'
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-10 10:20:22 +01:00
Kamil Trzcinski b18671a1b2 Enable shared runners for all new projects 2015-11-05 17:02:02 +01:00
Valery Sizov 6051c28fc0 Allow groups to appear in the search results if the group owner allows it 2015-11-05 13:18:51 +02:00
Dmitriy Zaporozhets 1c4d1c3bd6
Add release model
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-11-05 11:03:02 +01:00
Yorick Peterse 7fc95d805d Added index on services.template
This column is queried when creating a new project, without an index
this query would lead to a sequence scan.
2015-10-29 12:09:25 +01:00
Kamil Trzcinski 01c7769c75 Add projects path index
Fixes performance regression introduced by MR1649
2015-10-26 20:21:26 +01:00
Jacob Vosmaer 122f02bc39 Remove the contents of the satellites dir 2015-10-23 17:39:22 +02:00
Kamil Trzcinski 0b25d837b8 Fail builds that also have empty string 2015-10-23 13:33:44 +02:00
Kamil Trzcinski f9f6724f55 Added extra index for faster enumeration of CI builds 2015-10-20 19:41:45 +02:00