Commit graph

39595 commits

Author SHA1 Message Date
James Lopez
1f701cb5e2 added staging events and spec 2016-11-17 08:22:55 +01:00
James Lopez
f8acc7ea77 fixing spec failures 2016-11-17 08:22:55 +01:00
James Lopez
d99cec7f55 review events - spec and logic 2016-11-17 08:22:55 +01:00
James Lopez
ebd5ced7eb Added test events specs and logic. Also fixed some SQL and refactored the pipeline worker spec. 2016-11-17 08:22:55 +01:00
James Lopez
52e2729bf4 add pipeline id to merge request metrics table. Also, updated the pipeline worker to populate this field. 2016-11-17 08:22:55 +01:00
James Lopez
1a4ff5d720 Added code events spec and logic. Also fixed SQL issues and refactored the code a bit. 2016-11-17 08:22:55 +01:00
James Lopez
72660d58af plan events and spec working. Also added some TODOs to the code. 2016-11-17 08:22:54 +01:00
James Lopez
3b5d947730 commit events and spec 2016-11-17 08:22:54 +01:00
James Lopez
1d6068a1c3 fix specs - issue events working 2016-11-17 08:22:54 +01:00
James Lopez
c545968ece fix timestamp diff and spec 2016-11-17 08:22:54 +01:00
James Lopez
847d2796cf fixed spec and SQL query 2016-11-17 08:22:54 +01:00
James Lopez
470e39d64f WIP - refactored some arel queries 2016-11-17 08:22:54 +01:00
James Lopez
ec7db295d2 Started refactoring stuff to add events to cycle analytics
- Refactored cycle analytics class to extract DB logic
- Reuse logic in new events fetcher
- Started adding cycle analytics events class and spec (still not functional)
2016-11-17 08:22:54 +01:00
Sean McGivern
60306053a2 Merge branch '23034-setup-test-env-in-prepare-stage' into 'master'
tests: Move rake assets:precompile and cloning gitlab-{shell,test} to the prepare stage

Related to 

See merge request 
2016-11-17 01:17:41 +00:00
Kamil Trzciński
b9c8a3d22a Merge branch 'fix/trace-patch-updated-at' into 'master'
Update the updated_at of a build while patching the trace

## What does this MR do?

Fixes build patching trace. It should update the `updated_at` field of a build to make sure it will not be removed by `stuck_ci_builds_worker`.

## Are there points in the code the reviewer needs to double check?

Construction of a test for the bug.

## Why was this MR needed?

Please read  for a reference.

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Fixes 

See merge request 
2016-11-16 23:26:13 +00:00
Annabel Dunstone Gray
4fd9a644cb Merge branch 'related-mr-labels' into 'master'
Added colored labels to related MR list.

## What does this MR do?
Added colored labels to related MR list.

## Are there points in the code the reviewer needs to double check?
Yes, I think haml can be better.

## Why was this MR needed?
There was an issue for this  

## Screenshots (if relevant)
![Screen_Shot_2016-11-15_at_21.04.24](/uploads/b601f33f23cdc3318d01279e17deb096/Screen_Shot_2016-11-15_at_21.04.24.png)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
Fixes 

See merge request 
2016-11-16 22:55:39 +00:00
Alfredo Sumaran
633eca8e5c Merge branch 'explicitly-disable-eslint-inline' into 'master'
explicitly disable eslint inline

## What does this MR do?

Explicitly disables eslint inline.

I.E. `/* eslint-disable */` => `/* eslint-disable max-len, no-new, ... */`

I used the script from https://gitlab.com/lbennett/eslint-dsblr.

## Are there points in the code the reviewer needs to double check?

## Why was this MR needed?

It will help refactor out eslint issues for older files.

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request 
2016-11-16 22:36:08 +00:00
Nick Thomas
6e7019901e tests: Move rake assets:precompile and cloning gitlab-{shell,test} to the prepare stage 2016-11-16 22:06:07 +00:00
Sean McGivern
4d59a9e768 Merge branch 'fix-failing-user-without-projects-specs' into 'master'
Fix some failing specs due to missing access_requestable trait

See merge request 
2016-11-16 22:01:05 +00:00
Sean McGivern
f9616f1529 Merge branch '24496-fix-internal-api-project-lookup' into 'master'
Fix POST /internal/allowed to cope with gitlab-shell v4.0.0 project paths

Closes 

See merge request 
2016-11-16 20:49:30 +00:00
Nick Thomas
606afe2e81 Fix some failing specs due to missing access_requestable trait 2016-11-16 19:19:22 +00:00
Didem Acet
e633688f39 Fix SCSS linter errors. 2016-11-16 21:07:10 +02:00
Rémy Coutable
d1afb845b1 Merge branch 'fix-shibboleth-auth-with-no-uid' into 'master'
fix shibboleth misconfigurations resulting in authentication bypass

This merge request fixes  where a misconfigured Shibboleth `HTTP_UID` or `HTTP_EPPN` could result in users being logged into an account that did not belong to them.

See merge request 
2016-11-16 17:28:56 +00:00
Didem Acet
39754c6c05 Added colored labels to related MR list. 2016-11-16 19:21:32 +02:00
Rémy Coutable
2e1fe59e37 Merge branch 'patch-5' into 'master'
Fix issue where "Without projects" filter admin area shows 0 users incorrectly. Before this fix, if any outstanding group or project invitations exist the count show as 0.

Fixes 

See merge request 
2016-11-16 16:58:32 +00:00
Robert Speicher
b5d3c3caa8 Merge branch '23824-activity-page-does-not-show-commits-comments' into 'master'
Allow commit note to be visible if repo is visible

## What does this MR do?

It enforces the `:download_code` permission in `Event#visible_to_user?` for commit notes.

Closes 

See merge request 
2016-11-16 16:55:33 +00:00
Fatih Acet
a65f83c6de Merge branch 'user-dropdown-multiple-requests-fix' into 'master'
Stopped multiple requests with dropdowns

## What does this MR do?

Fixes an issue where the user dropdown would send 2 requests when the user opens the dropdown.

## What are the relevant issue numbers?

Closes 

See merge request 
2016-11-16 16:54:50 +00:00
Fatih Acet
579383efba Merge branch 'issue-boards-counter-border-fix' into 'master'
Fixed issue boards counter border when unauthorized

## What does this MR do?

When the user is unauthorized & view issue boards, the border on the counter will not be the whole way around. This fixes that. 

## Screenshots (if relevant)

![Screen_Shot_2016-11-16_at_13.03.36](/uploads/54d97f7f4114044aad3bdc78961a31c8/Screen_Shot_2016-11-16_at_13.03.36.png)

## What are the relevant issue numbers?

Closes 

See merge request 
2016-11-16 16:33:46 +00:00
Douwe Maan
4e63411daa Merge branch 'adam-build-missing-services-when-necessary' into 'master'
Defer saving project services to the database if there are no user changes

## What does this MR do?

It defers saving project services to the database as long as it is possible. It creates a project service when creating a project only if this project service has an active template. After that project services are saved on the first edit.

## Are there points in the code the reviewer needs to double check?

- tests that used `build_missing_services` before the change
- number of queries executed

## Why was this MR needed?

Motivation in 

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Fixes 

See merge request 
2016-11-16 16:27:54 +00:00
Sean McGivern
891465ba8c Merge branch '23117-search-for-a-filename-in-a-project' into 'master'
Search for a filename in a project

Closes 

See merge request 
2016-11-16 15:32:18 +00:00
Phil Hughes
3e33647514 Stopped multiple requests with dropdowns
Opening the user dropdown currently sends 2 requests. This has been changed so only one is sent

Closes 
2016-11-16 14:56:50 +00:00
Robert Speicher
28d9645926 Merge branch '21992-disable-access-requests-by-default' into 'master'
Disable the "request access" functionality by default for new groups and projects

Currently this feature is enabled by default, and additional action is required to disable it.

Closes  
Closes 

See merge request 
2016-11-16 14:50:45 +00:00
Rémy Coutable
d47fca53db
Allow commit note to be visible if repo is visible
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-16 15:35:15 +01:00
Nick Thomas
1c994dbc05 Fix POST /internal/allowed to cope with gitlab-shell v4.0.0 project paths
gitlab-shell v3.6.6 would give project paths like so:

* namespace/project

gitlab-shell v4.0.0 can give project paths like so:

* /namespace1/namespace2/project
* /namespace/project
* /path/to/repository/storage/namespace1/namespace2/project
* /path/to/repository/storage/namespace/project
2016-11-16 14:30:56 +00:00
Achilleas Pipinellis
3255401e06 Merge branch 'ux-guide-link-update-contributing' into 'master'
Fix UX Guide link on Contributing.md

Current link on the CONTRIBUTING.md page was to the old UI Guide. This should be updated to the new link.

See merge request 
2016-11-16 14:23:34 +00:00
Dmitriy Zaporozhets
e38acad435 Merge branch 'move-snippet-discover-spinach-test-to-rspec' into 'master'
Move 'Explore Snippets' Spinach feature to Rspec

## What does this MR do?
It moves the `features/snippets/discover.feature` Spinach test to a Rspec feature.

## Are there points in the code the reviewer needs to double check?
The original feature was called 'Discover Snippets', but the UI no longer reflects this wording. The new Rspec feature is called 'Explore Snippets' to reflect UI/Controller/View naming in use.

## Why was this MR needed?
As part of deprecating the Spinach test suite.

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [-] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [-] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [-] API support added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


See merge request 
2016-11-16 14:15:41 +00:00
Sean McGivern
f7d30c2073 Merge branch 'fix-merge-request-screen-deleted-source-branch' into 'master'
Do not create a MergeRequestDiff record when source branch is deleted

Fixes  
Fixes 

See merge request 
2016-11-16 14:14:00 +00:00
Sean McGivern
506f6bce3c Merge branch 'rs-issue-24527' into 'master'
Limit labels returned for a specific project as an administrator

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

See merge request 
2016-11-16 14:10:05 +00:00
Dmitriy Zaporozhets
bf06a0732e Merge branch 'setter-for-key' into 'master'
Use setter for key instead AR callback

## What does this MR do?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- n/a [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- n/a API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6763

See merge request 
2016-11-16 14:08:26 +00:00
Sean McGivern
1263708d81 Merge branch 'fix_labels_api_adding_missing_parameter' into 'master'
fix labels API adding missing parameter (current_user)

See merge request 
2016-11-16 13:57:42 +00:00
Yorick Peterse
ed70f29ffd Merge branch '24506-fix-timing-out-migration' into 'master'
Fix a badly-performing migration

See merge request 
2016-11-16 13:39:00 +00:00
Dmitriy Zaporozhets
6bf8739574 Merge branch 'move-snippet-search-spinach-test-to-rspec' into 'master'
Move 'Search Snippets' Spinach feature to Rspec

## What does this MR do?
Moves the Spinach feature `features/snippet_search.feature` to an RSpec feature `spec/features/snippets/search_snippets_spec.rb`.

## Are there points in the code the reviewer needs to double check?

The search results page URL was being visited directly in the original Spinach test, using an encoded search query and specific parameters to trigger the snippet searches. I have changed the RSpect feature to fill in the search box on the snippets dashboard page to retrieve results to cover the missing test coverage on the search box and to avoid the feature test from relying on the implementation details of the search URL structure.

## Why was this MR needed?

As part of deprecating the Spinach test suite.

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [-] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [-] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [-] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?



See merge request 
2016-11-16 13:35:08 +00:00
Achilleas Pipinellis
b7aae9a6cd Merge branch 'doc/sentinel' into 'master'
Improved redis sentinel documentation

## What does this MR do?
Updates Redis Sentinel documentation (most Omnibus stuff).

## Are there points in the code the reviewer needs to double check?
Grammar / Documentation

## Why was this MR needed?
After this https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/1000 get merged, people will need to follow new instructions.

## Checklist

- Documentation follows Sentinel best-practices:
  - [x] Suggests amount of sentinel nodes
  - [x] Suggests amount of redis nodes
  - [x] Suggests quorum value according to recomended amount of sentinel nodes
  - [x] Describes how to define quorum according to best-practices
  - [x] Lists ports and firewall checklist
- [x] Following Documentation bring us to a working environment
- [ ] Documentation is clear and have no gramatical issue

## What are the relevant issue numbers?

gitlab-org/omnibus-gitlab#1565

See merge request 
2016-11-16 13:16:26 +00:00
Robert Speicher
c44474150c Limit labels returned for a specific project as an administrator
Prior, an administrator viewing a project's Labels page would see _all_
labels from every project they had access to, rather than only the
labels of that specific project (if any).

This was not an information disclosure, as admins have access to
everything, but it was a performance issue.
2016-11-16 15:04:51 +02:00
Phil Hughes
02a2f3138d Fixed issue boards counter border when unauthorized
When unauthorized the border on the counter in issue boards didn't span the whole way around

Closes 
2016-11-16 13:04:29 +00:00
Achilleas Pipinellis
d5dc44f058 Minor edits in Redis HA source install
[ci skip]
2016-11-16 13:59:52 +01:00
Achilleas Pipinellis
0f951737af Remove experimental heading and move note at the top
[ci skip]
2016-11-16 13:56:31 +01:00
Achilleas Pipinellis
a9f7ce47f9 Merge branch 'doc/sentinel' of gitlab.com:gitlab-org/gitlab-ce into doc/sentinel 2016-11-16 13:51:00 +01:00
Gabriel Mazetto
95f6cf339a Improved documentation on HA sentinel part and Redis replication troubleshooting. 2016-11-16 13:34:57 +01:00
Gabriel Mazetto
e26d8e0272 Updated password examples and improved omnibus troubleshooting 2016-11-16 13:34:57 +01:00