Commit Graph
3845 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets ab4ea3720c Merge branch 'rs-archive-cache-worker-cron' into 'master'
Move RepositoryArchiveCacheWorker to sidekiq-cron

Closes #15105

See merge request !3663
2016-04-13 12:53:01 +00:00
Dmitriy Zaporozhets 59c735bd1e Merge branch 'rs-gitlab-com-check' into 'master'
Add `Gitlab.com?` method

To be used as a feature flag for GitLab.com-only features, such as
welcome emails.

We will be careful to only use this to disable features or functionality
that do not make sense for any installations that aren't GitLab.com. We
will not use this to restrict features from other installations or keep
them "exclusive" to GitLab.com.

See merge request !3682
2016-04-13 12:27:17 +00:00
Rémy Coutable cf306b17bf Merge branch 'api-group-leaking' into 'master'
API: Return 404 if user does not have access to group

Closes #15185 

After !3587 is merged, I'll update this one to also fix the return code of the tests in !3587.

See merge request !3683
2016-04-13 11:32:25 +00:00
Rémy Coutable 861e685e18 Merge branch 'api-move-issues' into 'master'
API: Ability to move an issue

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14741

See merge request !3593
2016-04-13 10:55:12 +00:00
Robert Schilling 2b036025d6 Update tests for moving issues via API 2016-04-13 11:31:50 +02:00
Robert Schilling 482f67edb4 API: Ability to move an issue 2016-04-13 11:23:42 +02:00
Yorick Peterse 3240ecfbef Added ability to add custom tags to transactions
One use case for this is manually setting the "action" tag for Grape API
calls. Due to Grape running blocks there are no human readable method
names that can be used for the "action" tag, thus we have to set these
manually on a case by case basis.
2016-04-13 11:22:37 +02:00
Robert Schilling b2f48d8c46 API: Return 404 if user does not have access to group 2016-04-13 11:11:09 +02:00
Rémy Coutable fc9e1be1fd Merge branch 'api-group-visibility' into 'master'
API: Ability to update a group

This makes it much easier to update a group after introducing the group visibility.

* Closes #14991 

See merge request !3587
2016-04-13 08:23:29 +00:00
Robert Speicher 2e13f6c326 Add Gitlab.com? method
To be used as a feature flag for GitLab.com-only features, such as
welcome emails.

We will be careful to only use this to disable features or functionality
that do not make sense for any installations that aren't GitLab.com. We
will not use this to restrict features from other installations or keep
them "exclusive" to GitLab.com.
2016-04-12 17:30:11 -04:00
Robert Speicher 6f4b4fd901 Merge branch 'fix_emojis_not_showing_in_autocomplete' into 'master'
Fix emoji aliases not showing in autocomplete

closes #14948 

See merge request !3595
2016-04-12 17:38:21 +00:00
Robert Schilling 5fb572417e Fix minor issues according development guidelines 2016-04-12 19:08:35 +02:00
Douwe Maan 4516f40dfe Merge branch 'decouple-member-notification' into 'master'
Decouple membership and notifications

This allow you to have notification setting per project even if you are member of group. 
It also creates background for having notification settings in project you are not member of. 


- [x] Make it work
- [x] Migrations
- [x] CHANGELOG
- [x] More tests
- [x] API

For #3359 

After this merge request there is still some work to be done: 

* create migration that remove duplicates in notification settings table and create uniq index (8.8 probably)
* remove notification_level field from Member model in 9.0
* make proper API for notification settings
* use `MemberCreateService` instead of Member#after_create callback for creating notification settings (after #14709) 
* maybe more tests 


Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

See merge request !3421
2016-04-12 16:39:40 +00:00
Robert Speicher d75ec6cd46 Merge branch 'fix-missing-saml-error-handling' into 'master'
Add proper nil and error handling to SAML login process

While writing the feature that would allow certain Omniauth providers to be marked as external I noticed that there is a scenario where the `gl_user` method can return `nil` and if this is not properly checked, it will lead to exceptions that will cause 500 errors. It is quite easy to land in this scenario, so I added `nil` checks.

I also noticed that the `saml` method in the `omniauth_callbacks_controller.rb` file lacked a `rescue` for `Gitlab::OAuth::SignupDisabledError`, which can happen if the default configuration from `1_settings.rb` is applied. So I also added this check.

See merge request !3609
2016-04-12 15:46:39 +00:00
Robert Speicher cba2c437e5 Move RepositoryArchiveCacheWorker to sidekiq-cron
Closes #15105
2016-04-12 11:12:05 -04:00
Rémy Coutable e322b993e7 Merge branch 'api-delete-note' into 'master'
Delete notes via API

Supports deleting issues, snippets, and merge requests via the API.

* Closes #14944
* Closes #14845 
* Closes #6060 

@zj I did not see that you assigned yourself in #6060. Hopefully, you did not start yet.

@rymai In #6060 this is targeted for 8.7 release. Could you review that and maybe this still lands in 8.7. 


See merge request !3557
2016-04-12 14:34:50 +00:00
Rémy Coutable a5512099ce Merge branch 'api-get-tag' into 'master'
API: Ability to retrieve a single tag

* Closes #14330

/cc @dblessing

See merge request !3577
2016-04-12 14:04:40 +00:00
Robert Schilling d0cdc2ee73 API: Ability to update a group 2016-04-12 15:47:20 +02:00
Robert Schilling dc39c8372d Adapt tests to new testing guidelines 2016-04-12 15:43:29 +02:00
Zeger-Jan van de Weg 6dbcb880cc Allow a project member to leave the projected through the API 2016-04-12 14:30:42 +02:00
Robert Schilling 9aefaa41ab Fix code review issues 2016-04-12 14:24:05 +02:00
Robert Schilling ba21c00f01 Delete notes via API 2016-04-12 14:24:05 +02:00
Robert Schilling f81352f531 Fix minor styling issues from code review 2016-04-12 14:12:30 +02:00
Rémy Coutable 734df1bb50 Merge branch 'api-fix-milestone-iid-filter' into 'master'
API: Add iid filter to milestones

This was documented in the API docs but it was never working because the iid filter was never applied to the milestones. The tests were working by accident because the were checking the first element, which was by accident the request element. 

* Closes https://github.com/gitlabhq/gitlabhq/issues/10122

See merge request !3588
2016-04-12 11:23:12 +00:00
Robert Schilling 20d4ca4cc3 API: Ability to retrieve a single tag 2016-04-12 12:38:59 +02:00
Robert Schilling 9d03e8fd5c API: Add iid filter to milestones 2016-04-12 12:37:16 +02:00
Robert Schilling 10080ce362 API: Expose updated_at for notes 2016-04-12 12:32:34 +02:00
Rémy Coutable 8cb41f1989 Merge branch 'api-labels-info' into 'master'
API: Expose open_issues_count, closed_issues_count, open_merge_requests_count on labels

Partly fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/13238

See merge request !3569
2016-04-12 09:21:00 +00:00
Patricio Cano 05a611a091 Better control flow and added guard clause. 2016-04-11 17:25:18 -05:00
Yorick Peterse 935f913165 Instrument Banzai code 2016-04-11 17:43:12 +02:00
Douglas Barbosa Alexandre 9a44d6977a Merge branch 'master' into decouple-member-notification 2016-04-11 10:34:49 -03:00
Yorick Peterse 7eed4608fe Fixed stubbing for Gitlab::Metrics specs
If the measure method uses Transaction.current directly the SQL
subscriber (Subscribers::ActiveRecord) will add timings of queries
triggered by DB cleaner.
2016-04-11 14:29:38 +02:00
Yorick Peterse d9110a7eca Track call counts in Gitlab::Metrics.measure_block 2016-04-11 13:27:52 +02:00
Yorick Peterse 16926a676b Store block timings as transaction values
This makes it easier to query, simplifies the code, and makes it
possible to figure out what transaction the data belongs to (simply
because it's now stored _in_ the transaction).

This new setup keeps track of both the real/wall time _and_ CPU time
spent in a block, both measured using milliseconds (to keep all units
the same).
2016-04-11 13:09:36 +02:00
Arinde Eniola 1d1ca8b9c2 fix emoji aliases not showing in autocomplete 2016-04-09 13:29:37 +01:00
Robert Speicher 93571c4335 Merge branch 'redis-connection-pool' into 'master'
Redis connection pool

Split from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3232

Having an easily accessible Redis connection pool allows us to do more
cool stuff with Redis in GitLab (instead of having to go through e.g.
the Rails cache).

See merge request !3521
2016-04-08 22:26:53 +00:00
Yorick Peterse 833808d737 Merge branch 'instrument-rails-cache' into 'master'
Instrument Rails cache code

See merge request !3619
2016-04-08 20:52:21 +00:00
Douglas Barbosa Alexandre 7afeace354 Merge branch 'master' into decouple-member-notification 2016-04-08 15:48:09 -03:00
Yorick Peterse 940b27ecc1 Merge branch 'metrics-timestamp-precision' into 'master'
Use more accurate timestamps for InfluxDB.

See merge request !3617
2016-04-08 15:58:11 +00:00
Yorick Peterse c56f702ec3 Instrument Rails cache code
This allows us to track how much time of a transaction is spent in
dealing with cached data.
2016-04-08 17:54:52 +02:00
Yorick Peterse aa7cddc4fc Use more accurate timestamps for InfluxDB.
This changes the timestamp of metrics to be more accurate/unique by
using Time#to_f combined with a small random jitter value. This
combination hopefully reduces the amount of collisions, though there's
no way to fully prevent any from occurring.

Fixes gitlab-com/operations#175
2016-04-08 16:39:44 +02:00
Robert Schilling fb2fde9d62 API: Expose subscribed? on issues 2016-04-08 15:53:04 +02:00
Patricio Cano 1d2429af9b Add missing proper nil and error handling to SAML login process. 2016-04-07 16:45:33 -05:00
Jacob Vosmaer cf669551f6 Put CACHE_NAMESPACE in the Gitlab::Redis module 2016-04-07 15:42:07 +02:00
Rémy Coutable 92897d7683 Merge branch 'api-filter-milestone' into 'master'
API: Ability to filter milestones by state

Ability to filter milestones by `active` and `closed` state.

* Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14931

See merge request !3566
2016-04-07 08:45:35 +00:00
Rémy Coutable 8eae7b1088 Merge branch 'feature/expose-builds-badge' into 'master'
Expose badges

This MR exposes badge somewhere in visible place.

![expose_badges](/uploads/d2e290d3013d1ef2b1bdeebbbe2c5d8b/expose_badges.png)

Closes #13801

See merge request !3326
2016-04-07 08:40:15 +00:00
Robert Schilling f5fdf20d76 Merge branch 'master' of github.com:gitlabhq/gitlabhq 2016-04-07 08:21:04 +02:00
Robert Speicher 936be025cd Merge branch 'saml-external-groups' into 'master'
Allow SAML to identify external users and set them as such

Related to #4009

Fixes #14577

This allows SAML to retrieve group information form the `SAML Response`
and match that to a setting that will flag all matching users as external.

See merge request !3530
2016-04-07 00:35:08 +00:00
Robert Speicher 730625f022 Merge branch 'patch/fix-markdown-preview-wikis' into 'master'
Wiki preview URL converting problem [via Markdown]

Current implementation when rendering the preview, thinks relative links are for project repository files.

We are creating a new preview route that will define correct context data to render for wikis instead.

Fixes #2380, #1184

See merge request !3461
2016-04-07 00:17:21 +00:00
Patricio Cano 8110e75309 Implemented suggested fixes 2016-04-06 18:12:25 -05:00