Commit Graph

4058 Commits

Author SHA1 Message Date
Robert Speicher 1fd0668bce Merge branch 'sh-show-all-slack-names' into 'master'
Include GitLab full name with username in Slack messages

Closes #38865

See merge request gitlab-org/gitlab-ce!14740
2017-10-09 08:52:20 +00:00
Rubén Dávila 4aa2deb478 Fix error with GPG signature updater when commit was deleted 2017-10-07 10:47:53 -05:00
Jacopo 0ce6785851 Replaces `tag: true` into `:tag` in the specs
Replaces all the explicit include metadata syntax in the specs (tag:
true) into the implicit one (:tag).
Added a cop to prevent future errors and handle autocorrection.
2017-10-07 13:57:54 +02:00
Douwe Maan 546b18b903 Merge branch 'tc-geo-read-only-idea' into 'master'
Create idea of read-only database

Closes #37534

See merge request gitlab-org/gitlab-ce!14688
2017-10-07 11:01:21 +00:00
Bob Van Landuyt f90b27da77 Find forks within users/namespaces using fork memberships 2017-10-07 11:46:23 +02:00
Bob Van Landuyt e8ca579d88 Add a project forks spec helper
The helper creates a fork of a project with all provided attributes,
but skipping the creation of the repository on disk.
2017-10-07 11:46:23 +02:00
Bob Van Landuyt 70716a1292 Allow creating merge requests across forks of a project 2017-10-07 11:46:23 +02:00
Bob Van Landuyt d328007214 Create a fork network when forking a project
When no fork network exists for the source projects, we create a new
one with the correct source
2017-10-07 11:46:23 +02:00
Bob Van Landuyt 20727db170 Add a model for `fork_networks`
The fork network will keep track of the root project as long as it's
present.
2017-10-07 11:46:22 +02:00
Kamil Trzciński 5ee20b6375 Merge branch 'master' into '37970-ci-sections-tracking'
# Conflicts:
#   db/schema.rb
2017-10-07 08:07:33 +00:00
Felipe Artur b54203f0ad Commenting on image diffs 2017-10-07 04:25:17 +00:00
Winnie Hellmann 265b1a3b72 Show confirmation modal before deleting account 2017-10-06 20:40:41 +00:00
Toon Claes d13669716a Create idea of read-only database
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.

Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.

Closes gitlab-org/gitlab-ce#37534.
2017-10-06 22:37:40 +02:00
Stan Hu 7500097970 Include GitLab full name with username in Slack messages
We used to include the first and last name of the user, but !6624 modified
this to include only the username. Let's compromise and add both in the form
of `First Last (username)`.

Closes #38865
2017-10-06 13:02:28 -07:00
Shinya Maeda 830c770a53 Merge branch 'master' into feature/sm/35954-create-kubernetes-cluster-on-gke-from-k8s-service 2017-10-07 00:27:15 +09:00
Douwe Maan dd42cb5f8f Merge branch '36829-gpg-commit-not-verified-if-signed-with-a-subkey' into 'master'
Add support for GPG subkeys in signature verification

Closes #36829

See merge request gitlab-org/gitlab-ce!14517
2017-10-06 13:36:20 +00:00
Shinya Maeda 91e530df24 Merge branch 'master' into feature/sm/35954-create-kubernetes-cluster-on-gke-from-k8s-service 2017-10-06 21:29:03 +09:00
Alessio Caiazza c0cfc9ebd2
Extract `Ci::Build#parse_trace_sections!` into a service 2017-10-06 12:33:10 +02:00
Grzegorz Bizon 6cd7ce3324 Merge branch 'backstage/gb/move-some-pipelines-code-from-ee-to-ee' into 'master'
Move to CE some EE pipelines-related code that belongs to CE

Closes gitlab-ee#3616

See merge request gitlab-org/gitlab-ce!14699
2017-10-06 10:08:00 +00:00
Nick Thomas ce87f42dc9 Merge branch '34102-online-view-of-artifacts-fe' into 'master'
Add external link for online artifacts

Closes #34102

See merge request gitlab-org/gitlab-ce!14399
2017-10-05 15:03:17 +00:00
Douwe Maan cd60a02ad9 Merge branch 'zj-gitaly-namespace-service' into 'master'
Gitaly namespace service enabled for GitLab

See merge request gitlab-org/gitlab-ce!14274
2017-10-05 15:01:52 +00:00
Alessio Caiazza 91f8e734fe
Add CI build trace sections extractor 2017-10-05 15:42:25 +02:00
Rubén Dávila dd139e65b5 Invalidate GpgSignatures associated to GpgKeySubkeys when revoking the GpgKey 2017-10-05 08:26:02 -05:00
Rubén Dávila 866ef2bb2e Add more specs to cover subkeys scenarios 2017-10-05 08:25:27 -05:00
Rubén Dávila b27549df97 Add some basic specs and refactor model and validations 2017-10-05 08:25:27 -05:00
Zeger-Jan van de Weg d1dd115356
Update test to use the new API 2017-10-05 15:14:44 +02:00
Zeger-Jan van de Weg f879c58706
Fix namespace deletion tests 2017-10-05 15:01:26 +02:00
Kamil Trzcinski aba71835f3 Merge remote-tracking branch 'origin/master' into feature/sm/35954-create-kubernetes-cluster-on-gke-from-k8s-service 2017-10-05 14:27:42 +02:00
Zeger-Jan van de Weg 4656283c5c
Gitaly namespace service enabled for GitLab 2017-10-05 14:11:32 +02:00
Shinya Maeda b229637b08 fetch_kubernetes_token_service_spec. Fix static analysys. 2017-10-05 20:26:07 +09:00
Bob Van Landuyt b3acd5459c Use `alias_attribute` & `alias_method` to define parent-methods 2017-10-05 13:12:40 +02:00
Douwe Maan 782c017ca0 Make sure spec expectations are in their own paragraphs 2017-10-05 12:58:21 +02:00
Douwe Maan 0c0c2ecd99 Merge branch 'master' into digitalmoksha/gitlab-ce-feature/verify_secondary_emails
# Conflicts:
#	app/controllers/admin/users_controller.rb
#	app/controllers/confirmations_controller.rb
#	app/controllers/profiles/emails_controller.rb
#	app/models/user.rb
#	app/services/emails/base_service.rb
#	app/services/emails/destroy_service.rb
#	app/views/devise/mailer/confirmation_instructions.html.haml
#	lib/api/users.rb
#	spec/services/emails/destroy_service_spec.rb
2017-10-05 12:48:22 +02:00
Grzegorz Bizon f3ec51beba Add a additional scope related to alive CI/CD statuses 2017-10-05 11:30:21 +02:00
Grzegorz Bizon 1ca4f282a4 Add specs for methods that count pipeline seeds size 2017-10-05 11:28:39 +02:00
Bob Van Landuyt 951abe2b2e Load counts everywhere we render a group tree 2017-10-05 11:11:21 +02:00
Bob Van Landuyt 57bd3bb34a Force parents to be preloaded for building a hierarchy 2017-10-05 11:10:57 +02:00
Shinya Maeda 88cc9d5294 Merge branch 'master' into feature/sm/35954-create-kubernetes-cluster-on-gke-from-k8s-service 2017-10-05 14:49:16 +09:00
Bob Van Landuyt 167fd71348 Always preload all elements in a hierarchy to avoid extra queries. 2017-10-04 22:49:42 +02:00
Bob Van Landuyt ef043063f9 Clean up public/private api of `GroupDescendant`
So only methods that are used elsewhere are public.
2017-10-04 22:49:42 +02:00
Bob Van Landuyt cd85c22faa Rename hierarchies to descendants where applicable 2017-10-04 22:49:42 +02:00
Bob Van Landuyt 22aa034427 Rename `GroupHierarchy` to `GroupDescendant` 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 3299a970e0 Handle all cases for merging a hierarchy
The possible cases are:
 - [Array, Array]
 - [Array, Hash]
 - [Array, GroupHierarchy]
 - [Hash,Hash]
 - [Hash, GroupHierarchy]
 - [GroupHierarchy, GroupHierarchy]
2017-10-04 22:49:41 +02:00
Bob Van Landuyt bb5187bb2a Handle case where 2 matches in the same tree are found 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 518216c062 Merge group hierarchies when parents are shared 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 438a0773dc Add a concern to build hierarchies of groups 2017-10-04 22:46:49 +02:00
Kamil Trzcinski bee5c08094 Fix Rubocop failures 2017-10-04 21:13:01 +02:00
Kamil Trzcinski 54831bd44b Updated messages and notices 2017-10-04 21:10:08 +02:00
Zeger-Jan van de Weg d5486807ba
Incorporate feedback 2017-10-04 21:01:27 +02:00
Eric Eastwood decf044369 Merge branch 'master' into 34102-online-view-of-artifacts-fe 2017-10-04 10:56:03 -05:00
Shinya Maeda a644f4b829 Add spec/models/gcp/cluster_spec.rb 2017-10-04 22:40:12 +09:00
Jacob Vosmaer 147e2b21be Let fetch_ref pull from Gitaly instead of from disk 2017-10-04 12:57:41 +02:00
Douwe Maan f0b4fe2fc2 Merge branch 'fix-ssh-key-mutation' into 'master'
Ensure key fingerprints are generated correctly when modified

See merge request gitlab-org/gitlab-ce!14663
2017-10-04 08:06:49 +00:00
Douwe Maan c6e5a77e51 Merge branch 'gitaly-delete-branch' into 'master'
Implement OperationService.UserDeleteBranch Gitaly RPC

See merge request gitlab-org/gitlab-ce!14603
2017-10-04 07:34:33 +00:00
Douwe Maan 2ee93c486c Merge branch '36876-mr-show-json-controller-perf-improvements' into 'master'
Reduce method calls while evaluating Projects::MergeRequestsController#show.json

See merge request gitlab-org/gitlab-ce!14285
2017-10-04 07:33:05 +00:00
Oswaldo Ferreira 1f54c9216f Reduce method calls while evaluating Projects::MergeRequestsController#show.json 2017-10-04 00:09:48 -03:00
Alejandro Rodríguez 79719cf003 Add OperationService.UserDeleteBranch Gitaly RPC 2017-10-03 21:06:34 -03:00
Nick Thomas eaa1ce4fbe
Ensure key fingerprints are generated correctly when modified 2017-10-03 18:45:01 +01:00
Jacob Vosmaer (GitLab) 5dd26d4e5a Hide Gollum inside Gitlab::Git::Wiki 2017-10-03 16:58:33 +00:00
Zeger-Jan van de Weg 8cbfe3aea6
Redirect to pages daemon 2017-10-03 12:34:24 +02:00
Kamil Trzciński b8e47d7263 Merge branch 'fix-kubectl-180' into 'master'
Fix broken certificate-authority-data with kubectl >= 1.8.0

Closes #38685

See merge request gitlab-org/gitlab-ce!14635
2017-10-03 08:57:12 +00:00
Sean McGivern 0ac06c89e9 Merge branch 'ff_port_from_ee' into 'master'
Move Fast-Forward Merge to CE

See merge request gitlab-org/gitlab-ce!14272
2017-10-03 08:24:31 +00:00
Alessio Caiazza 40c6128b39
Fix broken certificate-authority-data with kubectl >= 1.8.0 2017-10-03 09:10:40 +02:00
Robert Speicher 95f613837d Merge branch 'sh-fix-import-repos' into 'master'
Fix gitlab-rake gitlab:import:repos task

Closes #37682

See merge request gitlab-org/gitlab-ce!14597
2017-10-02 17:34:08 +00:00
Stan Hu bac2916030 Fix gitlab-rake gitlab:import:repos task
Because of a change in GitLab 9.5.4 to prevent users from assuming control of
a repository already on disk, the import task broke. Imports would fail with
the message, "There is already a repository with that name on disk".

This change skips the validation when the import is done from the
command-line.

Closes #37682
2017-10-02 08:51:37 -07:00
Dmitriy Zaporozhets f1b8d79f4a Merge branch 'fix/gpg/case-insensitive' into 'master'
Make GPG validation case insensitive

See merge request gitlab-org/gitlab-ce!14376
2017-10-02 15:37:04 +00:00
Valery Sizov a0ac2d932c Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ff_port_from_ee 2017-10-02 13:15:46 +03:00
Sean McGivern 0a69abdb28 Merge branch 'gitaly-add-branch' into 'master'
Implement OperationService.UserAddBranch Gitaly RPC

Closes gitaly#544

See merge request gitlab-org/gitlab-ce!14522
2017-10-02 09:27:23 +00:00
Douwe Maan a030dc4199 Merge branch 'remote_user' into 'master'
Add GL_USERNAME environment variable for hooks

See merge request gitlab-org/gitlab-ce!13264
2017-10-02 07:16:22 +00:00
Stan Hu 6188e449de Fix pushes to an empty repository not invalidating has_visible_content? cache
`Repository#has_visible_content?` used to rely on the cached count of local branches, but
since it is now an independently cached value it needs to be invalidated on its own.

Closes #38646
2017-10-01 22:14:11 -07:00
Alexandra ed3c25e429 spacing and small optimisations 2017-10-01 17:07:26 +02:00
Alejandro Rodríguez fa5f0164eb Implement OperationService.UserAddBranch Gitaly RPC 2017-09-30 00:58:56 -03:00
David Turner dbcf48af8b Add username as GL_USERNAME in hooks (http)
When calling pre-receive, post-receive, and update hooks, add the GitLab
username as the GL_USERNAME environment variable.

This patch only handles cases where pushes are over http, or via
the web interface.  Later, we will address the ssh case.
2017-09-29 18:12:03 -04:00
Tim Bishop a212391f0f Make GPG validation case insensitive.
In line with other changes in GitLab, make email address validation
properly case insensitive. The email address in the commit may be in
any case, so it needs downcasing to match the address stored in GitLab
for the user. Without this change the comparison fails and commits are
not marked as verified.

See #37009.
2017-09-29 20:30:58 +01:00
Jacob Vosmaer e5fecc3a37 Create repositories via Gitaly 2017-09-29 18:27:06 +02:00
Jacob Vosmaer (GitLab) 403712f06e Make Repository#has_visible_content more efficient 2017-09-29 13:08:44 +00:00
Ahmad Sherif 4f5be9ec7b Migrate Gitlab::Git::Repository#add_tag to Gitaly
Closes gitaly#601
2017-09-29 00:53:49 +02:00
Robert Speicher 07c3112ef5 Merge branch 'feature/migrate-repository-rm-tag-to-gitaly' into 'master'
Migrate Git::Repository#rm_tag to Gitaly

Closes gitaly#562

See merge request gitlab-org/gitlab-ce!14388
2017-09-28 22:43:37 +00:00
Eric Eastwood 3468ca835d Merge branch 'master' into ff_port_from_ee
Conflicts:
	app/models/project.rb
	db/schema.rb
2017-09-28 16:59:49 -05:00
Ahmad Sherif 3944e16b4b Migrate Git::Repository#rm_tag to Gitaly
Closes gitaly#562
2017-09-28 23:36:40 +02:00
Douwe Maan ae03a52f09 Merge branch 'hashed-storage-migration-path' into 'master'
Hashed storage migration path

Closes gitlab-ee#3118

See merge request gitlab-org/gitlab-ce!14067
2017-09-28 17:26:16 +00:00
Markus Koller e9eae3eb0d Support custom attributes on users 2017-09-28 16:49:42 +00:00
Gabriel Mazetto f4de14d71f
Add support to migrate existing projects to Hashed Storage async 2017-09-28 16:32:14 +01:00
Eric Eastwood 6f9a6d37a9 Merge branch 'master' into ff_port_from_ee 2017-09-26 16:24:54 -05:00
Tomasz Maczukin 48d9a72291
Fix locked shared runners problem 2017-09-25 16:23:13 +02:00
Brett Walker d97b577a1b must now set the devise default scope (since we now have an :email scope)
and rubocop fixes
2017-09-24 19:52:49 +02:00
Brett Walker d7d335c05b add primary email as a secondary email whenever the primary is changed 2017-09-23 15:26:04 +02:00
Brett Walker 665c7876fa added email.confirmed scope and fix email comparison 2017-09-23 15:26:04 +02:00
Brett Walker ed99c899a2 allow a verified secondary email to be use as the primary without
a reconfirmation
2017-09-23 15:26:04 +02:00
Brett Walker 442dbf6d4b when user verifies a secondary email, revalidate GPG signatures 2017-09-23 15:26:04 +02:00
Brett Walker a32f1dddf2 fixes for rubocop 2017-09-23 15:26:04 +02:00
Brett Walker 85d2bf778a when a primary email is replaced and added to the secondary emails list,
make sure it stays confirmed
2017-09-23 15:24:53 +02:00
Brett Walker 09726bdf44 small cleanup changes based on feedback 2017-09-23 15:24:53 +02:00
Brett Walker a9b3178697 Make GPG signature verification work with non-primary email (#36959) 2017-09-23 15:24:53 +02:00
Yorick Peterse b3566a0104
Stop using Sidekiq for updating Key#last_used_at
This makes things simpler as no scheduling is involved. Further we
remove the need for running a SELECT + UPDATE just to get the key and
update it, whereas we only need an UPDATE when setting last_used_at
directly in a request.

The added service class takes care of updating Key#last_used_at without
using Sidekiq. Further it makes sure we only try to obtain a Redis lease
if we're confident that we actually need to do so, instead of always
obtaining it. We also make sure to _only_ update last_used_at instead of
also updating updated_at.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36663
2017-09-20 14:24:14 +02:00
Valery Sizov 19a62632f7 Add spec for Project#merge_method
It should be deleted from EE side when doing CE->EE merge!
2017-09-20 13:31:39 +03:00
Grzegorz Bizon b49bd4d3bb Fix rewriting issue references with group milestones 2017-09-20 09:55:54 +00:00
Valery Sizov ffa2c5d41e Add spec for Repository#ff_merge (ported from EE) 2017-09-19 23:48:40 -05:00
Stan Hu d15109dc5e Merge branch '37894-handle-if-auto-devops-domain-is-not-set' into 'master'
Resolve "Handle if Auto DevOps domain is not set"

Closes #37894

See merge request gitlab-org/gitlab-ce!14319
2017-09-19 20:42:08 +00:00
Jacob Vosmaer (GitLab) 75509fac17 Prepare cherry-pick and revert for migration to Gitaly 2017-09-19 17:09:10 +00:00
Kamil Trzcinski 9bed20d2ae Add specs for warning message shown in Auto DevOps settings 2017-09-19 18:42:13 +02:00
bokebilly 3017697701 Add warning message if domain or cluster are not configured 2017-09-19 15:32:31 +02:00
Grzegorz Bizon d79ad28fcb Do not pass project path from YAML processor
Use project full path that can be received from a pipeline object
2017-09-18 14:29:43 +02:00
Rémy Coutable 2f594206e2 Merge branch 'operation-service-merge' into 'master'
Prepare Repository#merge for migration to Gitaly

Closes gitaly#559

See merge request gitlab-org/gitlab-ce!14154
2017-09-18 09:06:23 +00:00
haseeb cc2daa74d8 created services for keys 2017-09-15 15:35:24 +00:00
Jacob Vosmaer 902b5347dc Prepare Repository#merge for migration to Gitaly 2017-09-15 16:39:20 +02:00
Rémy Coutable 85c88f45e0 Merge branch 'projects-controller-show' into 'master'
SQL performance improvements for ProjectsController#show

See merge request gitlab-org/gitlab-ce!14226
2017-09-15 13:48:08 +00:00
Rémy Coutable 0cf694fbf3 Merge branch 'gitlab-git-user' into 'master'
Rename Gitlab::Git::Committer to User

See merge request gitlab-org/gitlab-ce!14254
2017-09-14 17:13:39 +00:00
Jacob Vosmaer 9e40baba1e Rename Gitlab::Git::Committer to User 2017-09-14 17:42:02 +02:00
Kamil Trzciński 4533c28840 Merge branch '37759-also-treat-newlines-as-separator' into 'master'
Treat newlines as separators for pipeline emails service

Closes #37759

See merge request gitlab-org/gitlab-ce!14250
2017-09-14 13:57:40 +00:00
Yorick Peterse 7219009993
Memoize the latest builds of a pipeline
This ensures that if a pipeline is present for the last commit on a
project's homepage we only run 1 query to get the builds, instead of
running 2 queries.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/36878#note_40073339
for more information.
2017-09-14 13:20:05 +02:00
Yorick Peterse 3e999684f9
Memoize pipelines for project download buttons
This adds Project#latest_successful_pipeline_for and
Project#latest_successful_pipeline_for_default_branch. The 2nd method
memoizes the result (taking nil values into account) to ensure the
underlying query isn't executed multiple times when viewing a project's
homepage.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/36878#note_40073607
for more information.
2017-09-14 13:20:05 +02:00
Lin Jen-Shin 5720bce113 Also treat newlines as separator, as people would do that
Before this fix, I don't know if those emails would work
having newlines in them.
2017-09-13 20:24:19 +08:00
Grzegorz Bizon 6fe19ce961 Fix job coverage specs 2017-09-13 13:35:18 +02:00
Grzegorz Bizon 718ece6d37 Fix build specs after using `set` instead of `let` 2017-09-13 13:35:18 +02:00
Grzegorz Bizon 2f6802cdc0 Fix syntax error in LFS objects specs 2017-09-13 13:35:18 +02:00
Grzegorz Bizon 01f37eb77b Optimize CI/CD build model specs 2017-09-13 13:35:18 +02:00
Grzegorz Bizon 6a4dd05190 Optimize a few simple spec files by using `set` 2017-09-13 13:35:18 +02:00
Grzegorz Bizon 937db37dda Optimize LFS objects specs 2017-09-13 13:35:18 +02:00
Robert Speicher e21c12375a Merge branch 'revert-2f46c3a8' into 'master'
Revert "Merge branch 'revert-f2421b2b' into 'master'"

See merge request !14190
2017-09-12 18:31:54 +00:00
Douwe Maan 91e90ae78b Merge branch 'housekeeping_settings' into 'master'
Allow to use same periods for housekeeping tasks

Closes #34981

See merge request !13711
2017-09-12 12:20:40 +00:00
Kamil Trzciński 2602cc0c36 Merge branch 'hide-read-registry-scope-when-registry-disabled' into 'master'
Hide read_registry scope when registry is disabled on instance

See merge request !13314
2017-09-12 09:57:48 +00:00
Annabel Dunstone Gray 9b177bb7c9 Revert "Merge branch 'revert-f2421b2b' into 'master'"
This reverts merge request !14148
2017-09-11 15:44:42 +00:00
Alex Lossent d96b0eac03 Allow to use same periods for housekeeping tasks
This enables skipping a lesser housekeeping task
(incremental or full repack) by consistently
scheduling a higher task (respectively full repack or gc)
with the same period.
Cf. #34981
2017-09-11 17:41:07 +02:00
Douwe Maan 5cc140b202 Merge branch 'user-recent-push' into 'master'
Rework how recent push events are retrieved

Closes #35990

See merge request !13995
2017-09-11 09:40:59 +00:00
Rubén Dávila 52a2423e37 Revert "Merge branch '35012-navigation-add-option-to-change-navigation-color-palette' into 'master'"
This reverts merge request !13619
2017-09-08 14:48:44 +00:00
Kamil Trzciński 4efd18d7e1 Merge branch '29943-environment-folder' into 'security-9-5'
Do not use `location.pathname` when accessing environments folders

See merge request !2147
2017-09-07 20:22:16 -04:00
Yorick Peterse 83355336dd
Rework how recent push events are retrieved
Whenever you push to a branch GitLab will show a button to create a
merge request (should one not exist already). The underlying code to
display this data was quite inefficient. For example, it involved
multiple slow queries just to figure out what the most recent push event
was.

This commit changes the way this data is retrieved so it's much faster.
This is achieved by caching the ID of the last push event on every push,
which is then retrieved when loading certain pages. Database queries are
only executed if necessary and the cached data is removed automatically
once a merge request has been created, or 2 hours after being stored.

A trade-off of this approach is that we _only_ track the last event.
Previously if you were to push to branch A and B then create a merge
request for branch B we'd still show the widget for branch A. As of this
commit this is no longer the case, instead we will only show the widget
for the branch you pushed to most recently. Once a merge request exists
the widget is no longer displayed. Alternative solutions are either too
complex and/or too slow, hence the decision was made to settle for this
trade-off.

Performance Impact
------------------

In the best case scenario (= a user didn't push anything for more than 2
hours) we perform a single Redis GET per page. Should there be cached
data we will run a single (and lightweight) SQL query to get the
event data from the database. If a merge request already exists we will
run an additional DEL to remove the cache key.

The difference in response timings can vary a bit per project. On
GitLab.com the 99th percentile of time spent in User#recent_push hovers
between 100 milliseconds and 1 second, while the mean hovers around 50
milliseconds. With the changes in this MR the expected time spent in
User#recent_push is expected to be reduced down to just a few
milliseconds.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/35990
2017-09-08 00:46:16 +02:00
Douwe Maan 22d6e69ecf Merge branch 'improve-share-locking-feature-for-subgroups' into 'master'
Improve "Share with group lock" feature for subgroups

Closes #30550

See merge request !13944
2017-09-07 18:29:47 +00:00
Kamil Trzciński 21b16c5a16 Merge branch '37158-autodevops-banner' into 'master'
Resolve "Banner to enable Auto DevOps at project level"

Closes #37158

See merge request !13991
2017-09-07 18:06:50 +00:00
Kamil Trzciński f88659d005 Merge branch 'zj-auto-devops-table' into 'master'
Implement the implied CI/CD config for AutoDevOps

Closes #34777

See merge request !13923
2017-09-07 17:28:30 +00:00
Kamil Trzcinski 129b4eb1de Merge branch 'zj/gitlab-ce-zj-auto-devops-table' into 37158-autodevops-banner 2017-09-07 18:47:08 +02:00
Douwe Maan 523a1c69ab Merge branch '23079-remove-default-scope-in-sortable' into 'master'
Removes default scope from sortable

Closes #23079

See merge request !13558
2017-09-07 16:15:32 +00:00
Kamil Trzcinski 12ddc28f84 Merge remote-tracking branch 'origin/master' into zj/gitlab-ce-zj-auto-devops-table 2017-09-07 18:03:20 +02:00
Sean McGivern f2421b2b97 Merge branch '35012-navigation-add-option-to-change-navigation-color-palette' into 'master'
Add option to change navigation color palette

Closes #35012

See merge request !13619
2017-09-07 15:56:00 +00:00
Sean McGivern 4ae8e20c9c Merge branch 'events-migration-cleanup' into 'master'
Finish migration to the new events setup

Closes #37241

See merge request !13932
2017-09-07 15:33:54 +00:00
Annabel Dunstone Gray 99dcf870dd Use indigo as default theme 2017-09-07 06:43:12 -07:00
Kamil Trzcinski 83c1bb688c Add has_auto_devops_implicitly_disabled 2017-09-07 15:08:51 +02:00
Tiago Botelho cfd475a45e Removes default scope from sortable 2017-09-07 13:01:59 +01:00
Michael Kozono 1feeea9c6a Refer to “Share with group lock” consistently 2017-09-06 12:07:21 -07:00
Michael Kozono a4b564b620 Refactor based on code review 2017-09-06 12:07:21 -07:00
Michael Kozono c2c6c4c69e Specify nested_groups specs 2017-09-06 12:07:20 -07:00
Michael Kozono 1cc7f4a45d Enable share_with_group_lock on subgroup
…when needed
2017-09-06 12:07:20 -07:00
Kamil Trzcinski cd8ea329f0 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into zj/gitlab-ce-zj-auto-devops-table 2017-09-06 21:00:47 +02:00
Kamil Trzcinski 632f6ba267 Add tests to cover all introduced changes 2017-09-06 21:00:34 +02:00
Annabel Dunstone Gray 7b567597ee Fix specs; start on light theme 2017-09-06 12:57:30 -05:00
Rubén Dávila 6c49a62800 Restore some changes from !9199 2017-09-06 12:54:09 -05:00
Kamil Trzcinski 82ed2a0909 Improve config source handling code 2017-09-06 18:57:07 +02:00
Sean McGivern 3441025126 Merge branch '35161_first_time_contributor_badge' into 'master'
First time contributor badge

Closes #35161

See merge request !13902
2017-09-06 16:52:54 +00:00
Yorick Peterse 235b105c91
Finish migration to the new events setup
This finishes the procedure for migrating events from the old format
into the new format. Code no longer uses the old setup and the database
tables used during the migration process are swapped, with the old table
being dropped.

While the database migration can be reversed this will 1) take a lot of
time as data has to be coped around 2) won't restore data in the
"events.data" column as we have no way of restoring this.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37241
2017-09-06 16:40:31 +02:00
Alexander Keramidas 4df54f2607 Profile updates from providers 2017-09-06 16:38:52 +03:00
Zeger-Jan van de Weg 8189347b49
Merge branch 'master' into zj-auto-devops-table 2017-09-06 15:16:38 +02:00
micael.bergeron 65bcd141c8 add controller spec
also fix some code styling issues
2017-09-06 09:00:57 -04:00
micael.bergeron 4130552b42 remove lint 2017-09-06 09:00:57 -04:00
micael.bergeron b44a1bcd0b rework the contributor badge
- only show in merge-requests
 - show as a little glyph
2017-09-06 09:00:57 -04:00
micael.bergeron 45b83ed99a round of fixes after code review 2017-09-06 09:00:57 -04:00
micael.bergeron 966b1128d8 WIP: refactor the first-contributor to Issuable
this will remove the need make N queries (per-note) at the
cost of having to mark notes with an attribute

this opens up the possibility for other special roles for notes
2017-09-06 09:00:57 -04:00
Sean McGivern b40941db14 Fix note resolution specs 2017-09-06 10:10:16 +01:00
Sean McGivern e8f29569bc Resolve outdated diff discussions on push 2017-09-06 10:08:03 +01:00
Zeger-Jan van de Weg 003bfac293
Incorporate another round of feedback 2017-09-06 09:26:47 +02:00
Rubén Dávila 66cfb901c0 Optimize SQL queries used in Groups::GroupMembersController#create
The following optimizations were performed:

- Add new association to GroupMember and ProjectMember

  This new association will allow us to check if a user is a member of a
  Project or Group through a single query instead of two.

- Optimize retrieving of Members when adding multiple Users
2017-09-05 15:54:07 -05:00
Sean McGivern 9bb056e0f1 Merge branch 'fuzzy-issue-search' into 'master'
Fuzzy search issues / merge requests

Closes #26835, #29994, and #20362

See merge request !13780
2017-09-05 15:48:39 +00:00
Alexis Reigel b62c1620ea drop backwards compatibility for valid_signature 2017-09-05 12:18:33 +02:00
Alexis Reigel 978252a3fa use new #verification_status 2017-09-05 12:18:33 +02:00
Alexis Reigel 98016ef7f3 add User##verified_email? method 2017-09-05 12:18:32 +02:00
Alexis Reigel 64855c8e30 match the committer's email against the gpg key
the updated verification of a gpg signature requires the committer's
email to also match the user's and the key's emails.
2017-09-05 12:18:31 +02:00
Kamil Trzciński 3d61421fb2 Merge branch 'fix/sm/35650-remove-createtriggerrequestservice-and-forbid-to-persist-variables-on-ci-triggerrequest' into 'master'
Removes `CreateTriggerRequestService` and add a blocker to prevent saving variables on `Ci::TriggerRequest`

Closes #35650

See merge request !13792
2017-09-05 09:49:55 +00:00
Shinya Maeda 38d9b4d77d Use script_failure. Add runner_system_failure. Improve spec. 2017-09-05 15:10:34 +09:00
Shinya Maeda e8e8ae4d7d Fix spec 2017-09-05 14:30:28 +09:00
Shinya Maeda 68f6c61cf6 - Allow runner API to pass failure_reason
- Fix spec
2017-09-05 14:30:28 +09:00
Shinya Maeda 1d7c039072 Fix enum lists 2017-09-05 14:30:28 +09:00
Shinya Maeda dcf09d1144 Implement `failure_reason` on `ci_builds` 2017-09-05 14:30:28 +09:00
Zeger-Jan van de Weg bcd70c4c46
Incorporate review 2017-09-04 15:44:46 +02:00
Shinya Maeda 5b88bd81f5 Move trigger_variables to presenter 2017-09-04 22:21:47 +09:00
Shinya Maeda fa6b9acaf9 trigger_variables should consider trigger_request existstance always 2017-09-04 21:55:26 +09:00
Shinya Maeda 3ae2038176 Remove ci_trigger_request_with_variables 2017-09-04 21:55:26 +09:00
Shinya Maeda d614c43105 Fix trigger_request.variables 2017-09-04 21:55:26 +09:00
Shinya Maeda cff104ec4b Fix spec 2017-09-04 21:55:26 +09:00
Shinya Maeda acc7497855 Revert autheticate! in Trigger API 2017-09-04 21:55:26 +09:00
Shinya Maeda 75130a41ba Remove CreateTriggerRequestService and forbit to save variables on Ci::TriggerRequest 2017-09-04 21:55:26 +09:00
Kamil Trzciński a0c13698f9 Merge branch 'feature/gb/kubernetes-only-pipeline-jobs' into 'master'
Check if Kubernetes is required when creating pipeline jobs

Closes #34785

See merge request !13849
2017-09-04 12:30:27 +00:00
Sean McGivern 4efdb451b5 Merge branch 'move-git-operation-service' into 'master'
Move GitOperationService to Gitlab::Git

See merge request !13984
2017-09-04 11:06:12 +00:00
Sean McGivern dabce2c571 Merge branch 'git-operation-service-to-git' into 'master'
Prepare GitOperationService for moving to Gitlab::Git

See merge request !13773
2017-09-04 10:56:26 +00:00
Grzegorz Bizon e23e86953d Merge branch 'master' into feature/gb/kubernetes-only-pipeline-jobs
* master: (469 commits)
2017-09-04 12:13:11 +02:00
Kamil Trzciński d449355f94 Merge branch 'feature/sm/33281-protected-runner-executes-jobs-on-protected-branch' into 'master'
Protected runner executes jobs on protected branch [Solution 1]

Closes #33281

See merge request !13194
2017-09-04 08:23:50 +00:00
Zeger-Jan van de Weg a315e6025c
Merge branch 'master' into zj-auto-devops-table 2017-09-04 09:28:46 +02:00
Jose Ivan Vargas b623807682 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2017-09-03 16:09:59 -05:00
Shinya Maeda 1b481342a0 Fix spec 2017-09-03 23:49:11 +09:00
Shinya Maeda eab938d505 Fix typo 2017-09-03 23:49:11 +09:00
Shinya Maeda ce7c0ac3db Add validation for protected attributes 2017-09-03 23:49:11 +09:00
Shinya Maeda 07f7a01b4d Improve spec. Add validation for accel_level on runner. 2017-09-03 23:49:10 +09:00
Shinya Maeda 2170eec662 Fix spec 2017-09-03 23:49:10 +09:00
Shinya Maeda 1024718e9f Refactor access_level to not_protected and ref_protected 2017-09-03 23:49:10 +09:00
Shinya Maeda 4b0e31ba64 Extend can_pick? 2017-09-03 23:49:10 +09:00
Shinya Maeda 1925bfd2a5 Fix spec 2017-09-03 23:49:10 +09:00
Shinya Maeda bbe967abeb Add the rest of specs 2017-09-03 23:49:10 +09:00
Shinya Maeda eda34b1a18 Add spec. Fix runner setting page. It worked. 2017-09-03 23:49:10 +09:00
Jacob Schatz 8100274518 Merge branch 'issue-discussions-refactor' into 'master'
Issue discussions Vue refactor

See merge request !12069
2017-09-02 11:55:18 +00:00
Robert Speicher 223849fa17 Merge branch '17849-allow-admin-to-restrict-min-key-length-and-techno' into 'master'
Add settings for minimum key strength and allowed key type

Closes #17849

See merge request !13712
2017-09-01 19:23:08 +00:00
Jacob Vosmaer 6cdaa27a53 Move GitOperationService to Gitlab::Git 2017-09-01 14:37:56 +02:00