Commit Graph

3314 Commits

Author SHA1 Message Date
Douwe Maan 8654b77158 Merge branch 'zj-fix-import-gitlab-export-form' into 'master'
Update form to properly set the path

Closes #36519

See merge request !13722
2017-08-22 13:57:33 +00:00
Grzegorz Bizon 2e91f18143 Merge branch 'master' into backstage/gb/rename-ci-cd-processing-sidekiq-queues
* master: (115 commits)
  Use event-based waiting in Gitlab::JobWaiter
  Make sure repository's removal work for legacy and hashed storages
  Use `@hashed` prefix for hashed paths on disk, to avoid collision with existing ones
  Refactor project and storage types
  Prevent using gitlab import task when hashed storage is enabled
  Some codestyle changes and fixes for GitLab pages
  Removed some useless code, codestyle changes and removed an index
  Fix repository reloading in some specs
  Changelog
  Moving away from the "extend" based factory to a more traditional one.
  Enable automatic hashed storage for new projects by application settings
  New storage is now "Hashed" instead of "UUID"
  Add UUID Storage to Project
  Move create_repository back to project model as we can use disk_path and share it
  Codestyle: move hooks to the same place and move dependent methods to private
  Use non-i18n values for setting new group-level issue/MR button text
  indexes external issue tracker
  copyedit
  indexes user/search/ from /user/index
  Correctly encode string params for Gitaly's TreeEntries RPC
  ...
2017-08-22 14:58:10 +02:00
Zeger-Jan van de Weg 539dee9673
Update form to properly set the path
Also includes a change in allowing uploaded files, as there was a
mismatch in object_id between classes, disallowing params[:file], which
is a UploadedFile, newly loaded. The params checked against the older
version.

Fixes gitlab-org/gitlab-ce#36519
2017-08-22 11:33:18 +02:00
Mike Greiling e9bd73e1e9 disable webpack.optimize.ModuleConcatenationPlugin during karma tests 2017-08-21 13:43:12 -05:00
Grzegorz Bizon 82056644d5 Adjust sidekiq queues weights in queues config file 2017-08-21 14:25:58 +02:00
Grzegorz Bizon ad12ee2a78 Assign some CI/CD workers to pipeline default queue 2017-08-21 14:24:05 +02:00
Grzegorz Bizon 8417507201 Assign all pipeline workers to specific queues 2017-08-21 14:02:20 +02:00
Grzegorz Bizon 48776f2786 Simplify pipeline sidekiq queues naming scheme 2017-08-21 13:49:57 +02:00
Kamil Trzciński 48404ada9c Merge branch 'zj-remove-ci-api-v1' into 'master'
Remove CI API v1

See merge request !13652
2017-08-21 11:44:30 +00:00
Grzegorz Bizon ce274fd61b Make it possible to check if worker uses a known queue 2017-08-21 13:32:00 +02:00
Tim Zallmann 76499825d6 Merge branch 'fix-broken-yarn-deps' into 'master'
Fix broken Yarn dependencies

Closes #33886 and #34944

See merge request !13614
2017-08-21 07:19:28 +00:00
Mike Greiling 7b26de7e8c remove superfluous users bundle 2017-08-18 17:02:12 -05:00
Zeger-Jan van de Weg 1ffd0c8562
Remove CI API v1
This API was mainly for internal usage, and has been moved to the
general API: APIv4. The endpoints have been deprecated since 9.0, and
won't see 10.0. :)
2017-08-18 11:47:03 +02:00
Mike Greiling b8458dc88e remove zopfli compression temporarily until a better solution is found 2017-08-18 03:10:34 -05:00
Michael Kozono a037a79130 Setup repositories settings properly 2017-08-17 16:00:07 -07:00
Michael Kozono 1c3a2bc389 Setup LDAP settings properly 2017-08-17 16:00:07 -07:00
Douwe Maan 834f1b30d5 Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	package.json
#	spec/support/features/reportable_note_shared_examples.rb
2017-08-17 14:01:31 +02:00
Robert Speicher ec34b2d051 Merge branch 'dm-gpg-signature-performance' into 'master'
Only create commit GPG signature when necessary

See merge request !13561
2017-08-16 18:34:55 +00:00
Douwe Maan ba7251fefd Only create commit GPG signature when necessary 2017-08-16 18:57:50 +02:00
Rémy Coutable 4e0ee10a72 Merge branch 'bvl-circuitbreaker-settings-to-avoid-failures' into 'master'
Circuitbreaker settings to avoid spec-failures

Closes #36324

See merge request !13519
2017-08-16 13:38:00 +00:00
Bob Van Landuyt 93d56eb2a5 Use better higher threshold settings for storage access in tests
`failure_count_threshold`: We should never need this, but we don't
want to block access in tests because of this.

`failure_wait_time`: Setting it to 0 now allows each storage attempt

`storage_timeout`: Try a bit longer to access storage on CI in case
the slow machines take a bit longer to spin up the process to perfom
the check
2017-08-16 14:15:50 +02:00
Bob Van Landuyt ee603a0089 Allow a `failure_wait_time` of 0 for storage access
This allows testing every storage attempt after a failure. Which could
be useful for tests
2017-08-16 14:15:50 +02:00
Rémy Coutable fcce6c3168 Merge branch 'rs-more-public-send-whitelists' into 'master'
Whitelist or fix additional `Gitlab/PublicSend` cop violations

See merge request !13467
2017-08-16 11:25:26 +00:00
Rémy Coutable 7b68bdce15 Merge branch 'rs-trailingwhitespace-cop' into 'master'
Enable Layout/TrailingWhitespace cop and auto-correct offenses

See merge request !13573
2017-08-16 10:27:46 +00:00
Stan Hu 7712e34a2a Merge branch '36405-fix-mysql-timestamp-columns' into 'master'
Make sure MySQL would not use CURRENT_TIMESTAMP as the default for timestamp columns

Closes #36405

See merge request !13560
2017-08-15 20:43:13 +00:00
Robert Speicher 4edfad9678 Enable Layout/TrailingWhitespace cop and auto-correct offenses 2017-08-15 13:44:37 -04:00
Jacob Schatz d8b166846d Merge branch '36152-enable-scope-hoisting-with-webpack' into 'master'
Resolve "Enable scope hoisting with webpack"

Closes #36152

See merge request !13374
2017-08-15 15:15:41 +00:00
Lin Jen-Shin d6515aa3e4 Make sure MySQL would not use CURRENT_TIMESTAMP
for timestamp columns magically. See:

https://gitlab.com/gitlab-org/gitlab-ce/issues/36405
2017-08-15 19:07:28 +08:00
Mike Greiling 60ed4aa568 enable webpack scope hoisting 2017-08-15 00:06:11 -05:00
Joshua Lambert 69c9c83a48 Improve Prometheus docs, include nginx ingress 2017-08-14 16:23:32 +00:00
Robert Speicher 260c8da060 Whitelist or fix additional `Gitlab/PublicSend` cop violations
An upcoming update to rubocop-gitlab-security added additional
violations.
2017-08-14 12:14:11 -04:00
Bob Van Landuyt 180de2d201 Make sure uploads for personal snippets are correctly rendered 2017-08-11 18:15:02 +02:00
Filipa Lacerda fbf241e8ae Merge branch 'master' into issue-discussions-refactor
* master: (42 commits)
  alternative route for download archive
  Add missing command to compile GetText files
  Prevent user from changing username with container registry tags
  Rename RPC 'Exists' to 'RepositoryExists'
  Fix the sticky changes bar on commits page
  Fix ee_compat_check when EE branch uses a prefix
  Removed display styles when hiding the fly out navigation
  Explain why we use select all for project_url_constrainer.rb
  Fix pikaday being undefined
  Add a helper to stub storage settings with defaults
  Enable the Layout/SpaceBeforeBlockBraces cop
  update Install from Source instructions
  Translations can be picked without asking for exceptions
  Ask for exceptions in advance
  Don't require stackprof in Gemfile
  Synchronous Korean translation in zanata
  Use full path of user's avatar in webhooks
  Update icon color on hover
  Align all nav items in sidebar
  Fix height of collapsed sidebar items
  ...
2017-08-10 11:12:22 +01:00
haseeb 892ddd386a alternative route for download archive 2017-08-10 08:49:11 +00:00
Rémy Coutable c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Filipa Lacerda 23334ac0a1 Merge branch 'master' into issue-discussions-refactor
* master: (481 commits)
  Make sure that we have author and committer
  disable file upload button while uploading
  Fix bar chart does not display label at hour 0
  Fixed activity not loading on project homepage
  Expose noteable_iid in Note
  Fix fly-out width when it has long items
  Add a test to show that threshold 40 would corrupt
  Add changelog entry
  Raise encoding confidence threshold to 50
  Fix the /projects/:id/repository/commits endpoint to handle dots in the ref name when the project full path contains a `/`
  Fix the /projects/:id/repository/tags endpoint to handle dots in the tag name when the project full path contains a `/`
  Add Italian translations of Pipeline Schedules
  Restrict InlineJavaScript for haml_lint to dev and test environment
  Incorporate Gitaly's CommitService.FindCommit RPC
  Move `deltas` and `diff_from_parents` logic to Gitlab::Git::Commit
  fix repo_edit_button_spec.js
  fix test failures in repo_preview_spec.js
  fix repo_loading_file_spec tests
  Refactor Gitlab::Git::Commit to include a repository
  use 100vh instead of flip flopping between the two - works on all suported browsers
  ...
2017-08-08 16:15:16 +01:00
Brian Neel 9770c57fab Re-enable SqlInjection and CommandInjection 2017-08-08 10:50:54 -04:00
Mike Greiling 0994bbf9dd Merge branch 'master' into ide
* master: (86 commits)
  Show all labels
  33874 confidential issue redesign
  Exclude merge_jid on Import/Export attribute configuration
  Resolve "User dropdown in filtered search does not load avatar on `master`"
  Re-add column locked_at on migration rollback
  Group-level new issue & MR using previously selected project
  [EE Backport] Update log audit event in omniauth_callbacks_controller.rb
  more eagerly bail when the state is prevented
  Move locked_at removal to post-deployment migration
  Add class to other sidebars
  Improve mobile sidebar
  reduce iterations by keeping a count of remaining enablers
  Store & use ConvDev percentages returned by Version app
  Store MergeWorker JID on merge request, and clean up stuck merges
  Backport changes in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2551 to CE
  DRY up caching in AbstractReferenceFilter
  Update CHANGELOG
  Add CHANGELOG entry
  Fix html structure Removes test for removed behavior
  Port form back to use form_tag
  ...
2017-08-07 22:44:47 -05:00
Stan Hu fd40bce9cc Merge branch '31207-clean-locked-merge-requests' into 'master'
Resolve "Store MergeWorker JID on merge request, and clean up stuck merges"

Closes #31207

See merge request !13207
2017-08-08 01:47:48 +00:00
Sean McGivern c94990820a Merge branch '32844-issuables-performance' into 'master'
Issuables: Move some code from create services to Sidekiq workers

See merge request !13326
2017-08-07 21:21:29 +00:00
Mike Greiling 7767ceef47 Merge branch 'master' into ide
* master: (177 commits)
  Add changelog
  Bump gitlab-shell version to 5.8.0 to fix Git for Windows 2.14
  Make contextual sidebar collapsible
  Fixed sidebar context header hover colors
  Use correct `Environment`-class within `Gitlab` namespace
  Remove gl.Activities from Commits page
  Move `let` calls inside the `describe` block using them
  Add `/assign me` alias support for assigning issuables to oneself
  GRPC::Unavailable (< GRPC::BadStatus) is wrapped in a CommandError
  Use `broken_storage` in the fs_shards_spec.
  Eager load project creators for project dashboards
  Memoize a user's personal projects count
  Remove redundant query from User#recent_push
  Improve checking if projects would be returned
  Change spelling of gitlab-shell
  Remove unused #tree-holder
  Add custom linter for inline JavaScript to haml_lint
  Rename user_can_admin? because it's more accurate
  Synchronous zanata community contribution translation
  Add Korean translation to i18n
  ...
2017-08-07 15:20:09 -05:00
Jacob Schatz 60bc0fc169 Merge branch '33902-upgrade-to-webpack-v3' into 'master'
Upgrade to webpack v3.4.0

Closes #33902

See merge request !12298
2017-08-07 19:30:14 +00:00
Sean McGivern 4c8b666893 Merge branch 'zj-project-templates' into 'master'
Allow projects to be started from a template

Closes #32420

See merge request !13108
2017-08-07 19:24:14 +00:00
Robert Speicher 4e2b630df7 Merge branch 'group-milestone-references-system-notes' into 'master'
Support group milestone references

Closes #34778

See merge request !13289
2017-08-07 19:22:41 +00:00
Oswaldo Ferreira 0640b3d1d8 Store MergeWorker JID on merge request, and clean up stuck merges 2017-08-07 15:23:37 -03:00
Paweł Chojnacki 746f0ec367 Add sidekiq metrics endpoint and add http server to sidekiq 2017-08-07 17:13:02 +00:00
Mike Greiling 669ff236dc add thunky to approved licenses (MIT) 2017-08-07 11:08:58 -05:00
Mike Greiling 83bea6e9b8 add disableHostCheck to devServer config since webpack dev server is proxied 2017-08-07 11:08:58 -05:00
Mike Greiling e43099e407 replace stats-webpack-plugin with webpack-stats-plugin 2017-08-07 11:08:58 -05:00
Jarka Kadlecova 9ef3c431e4 Move some after_create parts to worker to improve performance 2017-08-07 15:57:56 +02:00
Sean McGivern 149528f472 Support references to group milestones
Group milestones can only be referred to by name, not IID. They also do not
support cross-project references.
2017-08-07 11:55:00 +01:00
Filipa Lacerda fecb1a2f3c Merge branch 'master' into issue-discussions-refactor
* master: (21 commits)
  Fix issues with pdf-js dependencies
  fix missing changelog entries for security release on 2017-01-23
  Update top bar issues icon
  Fix order of CI lint ace editor loading
  Fix spec
  Fix spec
  Fix spec
  Add changelog
  fix
  Add a spec for concurrent process
  Add changelog
  essential
  add CHANGELOG.md for !13208
  adjust user contribution calendar time formatting
  fix rubocop violations 👮
  fix mysql syntax for date INTERVAL arithmatic
  add tests for proper timezone date grouping within ContributionsCalendar
  adjust timezone for date grouping in contributions calendar
  use timezone-aware Date.current instead of Date.today in ContributionsCalendar class
  display system timezone underneath activity calendar
  ...
2017-08-07 11:43:18 +01:00
Filipa Lacerda 3b9012871d Merge branch 'master' into zj-project-templates
* master: (623 commits)
  Fix issues with pdf-js dependencies
  fix missing changelog entries for security release on 2017-01-23
  Update top bar issues icon
  Fix pipeline icon in contextual nav for projects
  Since mysql is not a priority anymore, test it less
  Fix order of CI lint ace editor loading
  Add container registry and spam logs icons
  Fix different Markdown styles
  Backport to CE for:
  Make new dropdown dividers full width
  Fix spec
  Fix spec
  Fix spec
  Bump GITLAB_SHELL_VERSION and GITALY_VERSION to support unhiding refs
  Add changelog
  Install yarn via apt in update guides
  Use long curl options
  fix
  Add a spec for concurrent process
  Remove monkey-patched Array.prototype.first() and last() methods
  ...
2017-08-07 11:09:50 +01:00
Douwe Maan 727b6d16e5 Merge branch 'master' into 'bvl-nfs-circuitbreaker'
# Conflicts:
#   app/models/repository.rb
#   spec/models/repository_spec.rb
2017-08-07 09:13:10 +00:00
Mike Greiling d935278055 Fix issues with pdf-js dependencies 2017-08-07 07:47:29 +00:00
Filipa Lacerda e4f8aa719b Merge branch 'master' into issue-discussions-refactor
* master: (162 commits)
  Since mysql is not a priority anymore, test it less
  Add container registry and spam logs icons
  Fix different Markdown styles
  Backport to CE for:
  Make new dropdown dividers full width
  Bump GITLAB_SHELL_VERSION and GITALY_VERSION to support unhiding refs
  Install yarn via apt in update guides
  Use long curl options
  Remove monkey-patched Array.prototype.first() and last() methods
  Openshift Getting Started
  35659 Rename Pipelines tab to CI / CD in new navigation
  Don't bother going through an entire Banzai pipeline for empty text
  Add active state for pipelines settings on old nav
  Bump rspec to 3.6.0
  Resolve "Specific Async Script Loading by using a Page Variable"
  Revert "Merge branch 'rs-warm-capybara-only-in-ci' into 'master'"
  another rubocop style fix
  Use mixin for new dropdown style
  Migrate Repository#last_commit_for_path to Gitaly
  Migrate blame loading to Gitaly
  ...
2017-08-04 19:38:37 +01:00
Lin Jen-Shin b7547ade67 Backport to CE for:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2483
2017-08-04 21:45:14 +08:00
Bob Van Landuyt 3899d07f9e Move hostname to Gitlab::Environment 2017-08-04 15:38:49 +02:00
Bob Van Landuyt 3598e60bf2 Add a Circuitbreaker for storage paths 2017-08-04 15:38:48 +02:00
haseeb 4974f1ef86 fix #3686 make tarball download url to end with extension 2017-08-03 16:44:48 +00:00
Douwe Maan 2197ee02e9 Merge branch 'master' into ide 2017-08-03 13:13:06 +02:00
Filipa Lacerda 335d4a535f Merge branch 'master' into issue-discussions-refactor
* master: (76 commits)
  Add code review guidelines related to Build [CI skip].
  Make time span dropdown style on cycle analytics page consistent
  Add 204. Remove duplicated method.
  Make sure we didn't commit conflicts
  Fix bug in blob test
  Always fetch branches before finding the merge base, otherwise we could find an outdated merge base
  Fixes dropdown margin in sidebar
  Docs add blog articles
  Inline script cleanup globals and easy
  Add option to use CommitLanguages RPC
  CI fixes for gitaly-ruby
  fix
  Allow logged in users to read user list under public restriction
  Small refactor in LegacyNamespace and moved back send_update_instructions
  Rename ensure_dir_exist -> ensure_storage_path_exist
  Added some extra TODOs for the Legacy Storage refactor
  Make disk_path keyword argument and optional
  Rename more path_with_namespace -> full_path or disk_path
  Rename path_with_namespace -> disk_path when dealing with the filesystem
  Rename many path_with_namespace -> full_path
  ...
2017-08-01 17:45:20 +01:00
Tim Zallmann 423d31a300 Inline script cleanup globals and easy 2017-08-01 08:50:59 +00:00
Luke "Jared" Bennett 0ac012f0ad
Merge remote-tracking branch 'origin/master' into ide 2017-07-31 17:24:13 +01:00
Michael Kozono 7b5a96b53c Fix LDAP documentation and example config 2017-07-31 08:43:27 -07:00
Phil Hughes 1782aa7081 Merge branch 'inline-js-removal-projects-other' into 'master'
Inline js removal projects other

See merge request !13075
2017-07-31 09:14:43 +00:00
Douwe Maan 95f9d6d83b Merge branch 'master' into issue-discussions-refactor
# Conflicts:
#	app/controllers/concerns/notes_actions.rb
#	spec/features/task_lists_spec.rb
#	spec/support/features/issuable_slash_commands_shared_examples.rb
2017-07-31 10:23:50 +02:00
Rémy Coutable 60797a42b4 Ensure Gitlab::Application.routes.default_url_options are set correctly in Capybara + :js specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-28 16:33:30 +02:00
Luke "Jared" Bennett dc04fdc1a3
Merge remote-tracking branch 'origin/master' into ide 2017-07-28 15:26:00 +01:00
Douwe Maan da3100254f Merge branch 'backport-2844-ldap-ee-license-checks' into 'master'
Backport some recent changes related to LDAP from EE

See merge request !13119
2017-07-28 09:13:50 +00:00
Sean McGivern 190fae5f0c Merge branch 'sh-augment-lograge-output' into 'master'
Add remote IP, user ID and username to JSON lograge output

See merge request !13147
2017-07-28 08:30:26 +00:00
Tim Zallmann 7e17f9bc89 Merge branch '35224-transform-user-profile-javascript-into-async-bundle' into 'master'
Resolve "Transform user profile javascript into async bundle"

Closes #35224

See merge request !12929
2017-07-28 07:27:13 +00:00
Sean McGivern 96c4a15eae Merge branch 'master' into 'sh-augment-lograge-output'
# Conflicts:
#   config/initializers/lograge.rb
2017-07-28 07:26:08 +00:00
Sean McGivern b5aac46869 Merge branch 'sh-fix-lograge-exception' into 'master'
Fix lograge exclusion in params section

See merge request !13146
2017-07-28 07:22:18 +00:00
Stan Hu 9bc176b2c3 Add remote IP, user ID and username to JSON lograge output
This makes the logs a bit more useful to search requests by users.
2017-07-28 00:48:03 -05:00
Stan Hu 3a200165c3 Fix lograge exclusion in params section
Without this fix, we would just see redundant entries in the `params` section:

```
{"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":404,"duration":1.42,"view":0.38,"db":0.0,"time":"2017-07-28T02:59:18.167Z","params":{"controller":"metrics","action":"index"}}
```

The intended format looks more like this:

```
{"method":"GET","path":"/-/metrics","format":"html","controller":"MetricsController","action":"index","status":404,"duration":76.32,"view":69.95,"db":0.0,"time":"2017-07-28T02:59:48.893Z","params":{}}
```

The proper form to exclude an array is to preface with an asterisk:
https://apidock.com/rails/Hash/except
2017-07-28 00:26:57 -05:00
Joshua Lambert fa27326340 Rename the metric groups 2017-07-27 14:05:58 -04:00
Robert Speicher 86ae883b63 Merge branch 'backport-ee-2456' into 'master'
Skip OAuth authorization for trusted applications

See merge request !13061
2017-07-27 17:41:40 +00:00
Robert Speicher 066f4d8b71 Merge branch 'remove_custom_devise_failure_app' into 'master'
Remove GitLab custom failure app for Devise

See merge request !13136
2017-07-27 16:22:52 +00:00
Oswaldo Ferreira e561b142fa Backport gitlab-ee!2456 2017-07-27 12:09:46 -04:00
Robert Speicher 98619a49c8 Merge branch 'pawel/prometheus_client_pid_reuse_error' into 'master'
Fix prometheus client pid reuse bug

See merge request !13130
2017-07-27 15:47:01 +00:00
Dmitriy Zaporozhets ac0cbe6970 Merge branch 'feature/gpg-signed-commits' into 'master'
GPG signed commits

Closes #20268

See merge request !9546
2017-07-27 15:29:39 +00:00
Valery Sizov 3d83181b81 Remove GitLab custom fealure app for devise 2017-07-27 18:14:09 +03:00
Douwe Maan 842bcfa777 Merge branch 'pawel/ensure_temp_files_are_deleted_in_fs_metrics-35457' into 'master'
Ensure test files are deleted after fs metrics gathering run

Closes #35457

See merge request !13080
2017-07-27 14:45:02 +00:00
Alexis Reigel 07dbd5649a use Module#prepend instead of alias_method_chain 2017-07-27 15:46:03 +02:00
Alexis Reigel ce4e0837c4 mysql hack: set length for binary indexes 2017-07-27 15:46:03 +02:00
Alexis Reigel eda001565c fetch gpg signature badges by ajax 2017-07-27 15:46:03 +02:00
Rubén Dávila ef97cb54ae Backport some recent changes related to LDAP from EE 2017-07-27 08:45:16 -05:00
Alexis Reigel 027309eb2a user may now revoke a gpg key
other than just removing a key, which doesn't affect the verified state
of a commit, revoking a key unverifies all signed commits.
2017-07-27 15:43:37 +02:00
Alexis Reigel e63b693f28 generate gpg signature on push 2017-07-27 15:43:37 +02:00
Alexis Reigel 9816856d05 perform signature update in sidekiq worker 2017-07-27 15:43:36 +02:00
Alexis Reigel 7b4d29f4b5 add profile gpg key page to manage gpg keys 2017-07-27 15:40:41 +02:00
Tim Zallmann f149a76b2d Converted Pipelines Charts 2017-07-27 15:03:04 +02:00
Tim Zallmann 84a3ab25fe Moved Inline JS for Pipelines Charts + new Pipeline to dispatcher 2017-07-27 15:03:04 +02:00
Tim Zallmann 2cc1658489 Project New moved to external File 2017-07-27 15:03:04 +02:00
Pawel Chojnacki 3265ac4f39 Update prometheus client gem to fix problems with PID handling following
unicorn forking new workers.
2017-07-27 14:40:36 +02:00
Markus Koller d27dec80ce
Support custom directory in gitlab:backup:create task 2017-07-27 13:24:19 +02:00
Sean McGivern ef50875d3a Merge branch '33601-add-csrf-token-verification-to-api' into 'master'
Resolve "Add CSRF token verification to API"

Closes #33601

See merge request !12154
2017-07-27 10:20:52 +00:00
Michael Kozono 26ee3a2802 Mention how to test LDAP connections 2017-07-26 02:43:41 -07:00
Michael Kozono 951bd2a431 Update more examples 2017-07-26 02:43:40 -07:00
Michael Kozono e0fe34778d Copy comment improvements from documentation 2017-07-26 02:43:38 -07:00
Michael Kozono 71c36c5bb4 Add warning about certificate verification on load 2017-07-26 02:43:37 -07:00
Michael Kozono 72d8b1e40a Move backwards compatibility logic out of the code
And closer to the configuration setup. The code doesn’t need to know about this.
2017-07-26 02:43:36 -07:00
Michael Kozono 6dbff9663d Add LDAP config options 2017-07-26 02:43:32 -07:00
blackst0ne cc3a82bc8b Add `rescue false`. 2017-07-26 11:05:44 +02:00
blackst0ne 8ce8b21f67 Refactor CSRF protection 2017-07-26 11:05:44 +02:00
Pawel Chojnacki 2286879583 Ensure test files are deleted after tests 2017-07-25 14:19:09 +02:00
Sean McGivern bd13978c71 Merge branch 'add-instrumentation-to-link-to-gfm' into 'master'
Adds link_to_gfm method instrumentation

See merge request !13069
2017-07-25 11:12:36 +00:00
Tiago Botelho 4236c2f055 Adds link_to_gfm method instrumentation 2017-07-25 10:51:21 +01:00
Oswaldo Ferreira 33dc5171e5 Resolve "More RESTful API: include resource URLs in responses" 2017-07-25 09:35:45 +00:00
Tim Zallmann fef5a4fddd How to Merge to external File 2017-07-24 17:21:05 +02:00
Tim Zallmann 37056673e4 Merge branch '35330-fix-nginx-add-haproxy' into 'master'
Fix NGINX Error Rate query, include HA Proxy

See merge request !13005
2017-07-24 06:47:49 +00:00
Grzegorz Bizon d950e4d937 Merge branch 'zj-pipeline-badge-improvements' into 'master'
Pipeline badge improvements

Closes #15582 and #20961

See merge request !12966
2017-07-22 05:36:02 +00:00
Douwe Maan 76c3d2d434 Add full JSON endpoints for issue notes and discussions 2017-07-21 22:35:24 +03:00
Fatih Acet cb2287df0a Notes bundle for the issue discussions refactor. 2017-07-21 22:35:24 +03:00
Luke "Jared" Bennett 31eaeb9597
Add define and require to window in vs transform 2017-07-21 13:33:14 +01:00
Luke "Jared" Bennett 2169b9a7d0
ignore case for worker exclusion 2017-07-21 12:17:17 +01:00
Luke "Jared" Bennett bd9f5950ee
Remove all vs workers from transform 2017-07-21 11:20:48 +01:00
Filipa Lacerda b7d372d942 Merge branch '31031-convert-protected-branches-es6' into 'master'
Convert Protected Branches feature JS code to ES6

See merge request !12970
2017-07-21 09:50:29 +00:00
Z.J. van de Weg 2086483b24 Rename build to pipeline for status badges
First commit in probably 2, for resolve gitlab-org/gitlab-ce#15582. This
commit is renaming files and classes from build to pipeline. Also
wording is editted to pipeline. Given `pipeline` had more characters
than `build`, I've made the field a bit wider. The width now matchers
the one for the coverage badge, so they look nice when in a table
format, or in a list.

As soon as this commit is merged to master, and released, the build.svg
is deprecated, meaning that all users which already placed a badge
should update it. However, to make sure it keeps working tests are added
for this case.
2017-07-21 10:22:09 +02:00
Stan Hu bbf5723774 Merge branch 'sh-lograge-iso6801-time' into 'master'
Standardize on ISO8601 UTC time for lograge

See merge request !12995
2017-07-20 21:58:29 +00:00
Joshua Lambert 60b8bb6994 Fix for HA Proxy 2017-07-20 16:59:49 -04:00
Joshua Lambert 3193fd44e8 Add HA Proxy metrics, fix NGINX 2017-07-20 16:59:30 -04:00
Luke "Jared" Bennett f5f54cf042
exempt webworker script from copy closure transform 2017-07-20 19:41:35 +01:00
Luke "Jared" Bennett 6448368b5b
Merge remote-tracking branch 'origin/master' into ide 2017-07-20 17:51:07 +01:00
Stan Hu 68529f4f80 Standardize on ISO8601 UTC time for lograge 2017-07-20 07:58:01 -07:00
Robert Speicher b6555693a8 Merge branch 'rc/cob-backport-ce-to-ee-fix' into 'master'
Fix logger disabling on the CI: instantiate an ActiveSupport::TaggedLogging

See merge request !12987
2017-07-20 14:29:36 +00:00
Kamil Trzciński 542b675cf6 Merge branch 'fix/gb/fix-container-registry-tag-routing' into 'master'
Fix docker tag reference routing constraints

Closes #35220 and gitlab-com/support-forum#2246

See merge request !12961
2017-07-20 11:50:21 +00:00
Rémy Coutable ba74f38946 Fix logger disabling on the CI: instantiate an ActiveSupport::TaggedLogging
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-20 11:16:12 +02:00
Sean McGivern 88df076fae Merge branch '33359-pers-snippet-files-location' into 'security-9-3'
Use uploads/system directory for personal snippets

See merge request !2123
2017-07-19 22:28:27 -05:00
kushalpandya 584f323a69 Update Protected Branches bundle path 2017-07-19 18:16:15 +05:30
Rémy Coutable 0579a89fb9 Merge branch 'authentiq-updates' into 'master'
Added authentiq provider to tests and updated documentation, gem and config file.

See merge request !12952
2017-07-19 12:16:58 +00:00
Sean McGivern fca7a77a23 Merge branch 'bvl-free-system-namespace' into 'master'
Free `system` namespace by moving uploads into `uploads/-`

Closes #33550

See merge request !12917
2017-07-19 09:09:15 +00:00
Paweł Chojnacki 2c3d52161a Update Prometheus gem to version that explicitly calls `munmap` 2017-07-19 08:54:39 +00:00
Sean McGivern 1c7893c5c1 Merge branch 'rc/bump-peek-performance_bar' into 'master'
Bump peek-performance_bar to 1.3.0 and get rid of a monkey-patch

See merge request !12939
2017-07-19 08:52:01 +00:00
Sean McGivern 9492fbc447 Merge branch 'sh-structured-logging' into 'master'
Add structured logging for Rails processes

See merge request !12928
2017-07-19 08:44:04 +00:00
Grzegorz Bizon 9f36012e02 Fix docker tag reference routing constraints 2017-07-19 10:30:57 +02:00
Mike Greiling f2c0ab398e refactor users bundle, remove inline javascript, and transform into an async chunk 2017-07-18 17:27:01 -05:00
Rémy Coutable 3f50f6ca5b Merge branch 'rs-disable-test-log-in-ci' into 'master'
Disable Rails logging in CI test environments

See merge request !12847
2017-07-18 19:29:35 +00:00
Stan Hu e2b1c16ade Add structured logging for Rails processes
This introduces JSON logging for Rails views saved to a file called
`development_json.log`, `production_json.log`, etc.

For example, instead of this unparsable log:

```
Started GET "/" for 127.0.0.1 at 2012-03-10 14:28:14 +0100
Processing by HomeController#index as HTML
  Rendered text template within layouts/application (0.0ms)
  Rendered layouts/_assets.html.erb (2.0ms)
  Rendered layouts/_top.html.erb (2.6ms)
  Rendered layouts/_about.html.erb (0.3ms)
  Rendered layouts/_google_analytics.html.erb (0.4ms)
Completed 200 OK in 79ms (Views: 78.8ms | ActiveRecord: 0.0ms)
```

We get a single line with this:

```
{"method":"GET","path":"/,"format":"html","controller":"HomeController","action":"index","status":200,"duration":79,"view":78.8,"db":0.0,"location":"http://localhost/","time":"2017-07-18 09:35:17 -0700"}
```

Part of #20060
2017-07-18 09:49:21 -07:00
Robert Speicher fc76ff1051 Disable Rails logging in CI test environments
See https://jtway.co/speed-up-your-rails-test-suite-by-6-in-1-line-13fedb869ec4
2017-07-18 12:33:15 -04:00
Bob Van Landuyt 27a6aa4f51 Move system-uploads to `-/system` 2017-07-18 15:38:11 +02:00
Rémy Coutable 66c7f51897
Bump peek-performance_bar to 1.3.0 and get rid of a monkey-patch
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-18 13:56:36 +02:00
Mike Greiling 6a1fadaeaa fix redundant vue library 2017-07-18 04:21:07 -05:00
Mike Greiling cb17564566 fix global context and relative_url_root for monaco editor 2017-07-18 03:54:38 -05:00
Luke "Jared" Bennett 0a7870937f
Remove multiple methods of including monaco related code and remove static monaco assets from public 2017-07-18 01:42:34 +01:00
Jacob Schatz 901319fc69 Merge branch '34831-remove-coffee-rails-gem' into 'master'
Remove coffee-rails gem

Closes #34831

See merge request !12715
2017-07-17 21:18:55 +00:00
Alexandros Keramidas 6bd94f20e3 Added authentiq provider to tests and updated documentation, gem and config file. 2017-07-18 00:12:50 +03:00
Joshua Lambert 6e88631cff Fix incorrect AWS ELB metrics. 2017-07-17 00:52:37 +00:00
Douwe Maan be08202b4b Merge branch 'bjk/metric_names' into 'master'
Update metric names to match Prometheus guidelines.

Closes #35031

See merge request !12812
2017-07-14 18:05:18 +00:00
Mike Greiling 5f615276bf Refactor user bundle 2017-07-14 15:06:49 +00:00
Sean McGivern a5b8d4bcea Instrument Ability 2017-07-14 10:46:49 +01:00
Sean McGivern 1afdbe320e Merge branch 'fixes-for-internal-auth-disabled' into 'master'
Fixes needed when GitLab sign-in is not enabled

See merge request !12491
2017-07-14 08:49:36 +00:00
Robin Bobbitt 672a68d372 Fixes needed when GitLab sign-in is not enabled
When sign-in is disabled:
 - skip password expiration checks
 - prevent password reset requests
 - don’t show Password tab in User Settings
 - don’t allow login with username/password for Git over HTTP requests
 - render 404 on requests to Profiles::PasswordsController
2017-07-13 10:08:27 -04:00
Pawel Chojnacki 2d0741e562 Rename ConnectionRackMiddleware to RequestsRackMiddleware.
+ fix tests after metrics rename
2017-07-13 00:46:17 +02:00
Yorick Peterse 655219e24a Merge branch 'sh-disabled-prepared-statements-in-test' into 'master'
Disabled prepared statements in test

See merge request !12773
2017-07-11 11:05:02 +00:00
Sean McGivern 25d241ae97 Merge branch '33949-remove-healthcheck-access-token' into 'master'
Remove the need to use health check token by adding ability to whitelist hosts

Closes #33949

See merge request !12612
2017-07-11 08:51:27 +00:00
Stan Hu f92a12c265 Disabled prepared statements in test
Some tests may test migrations and change the types of columns. If this
happens, Rails may cache a statement that will cause PostgreSQL to fail with
the message, "cached plan must not change result type":
https://github.com/rails/rails/issues/12330

This happened in https://gitlab.com/gitlab-org/gitlab-ee/issues/2890#note_34636077.
2017-07-10 20:38:26 -07:00
Paul Charlton cb3b4a15e6 Support multiple Redis instances based on queue type 2017-07-11 03:35:47 +00:00
DJ Mountney e643c0db35 Merge branch 'master' into 'catch-redis-address-error'
# Conflicts:
#   lib/gitlab/current_settings.rb
2017-07-10 21:20:52 +00:00
Marin Jankovski 97a6ec4aaa Revert "Merge branch 'update_bootsnap_1.1.1' into 'master'"
This reverts commit 83ec509ce4, reversing
changes made to 57f0677ad8.
2017-07-10 17:29:15 +02:00
Rémy Coutable a7d65aeaf2
Re-add Feature.register_feature_groups which is already documented
This is a follow-up for !12362 where this was documented but the code
was removed in the last iteration. Since this can still be useful and
this is already supported by the API, I think re-adding the code was
the best course of action.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-10 15:56:23 +02:00
Douwe Maan 94e2a28684 Merge branch 'feature/user-datetime-search-api-mysql' into 'master'
Add creation time filters to user search API for admins

Closes #29507

See merge request !12682
2017-07-07 20:52:17 +00:00
Douwe Maan 9a708aec4b Merge branch '20628-add-oauth-implicit-grant' into 'master'
#20628 Enable implicit flow in Gitlab as OAuth Provider

Closes #20628, #2716, and #19470

See merge request !12384
2017-07-07 18:41:32 +00:00
Douwe Maan 426271dacb Merge branch 'dm-fix-project-path-helpers-production' into 'master'
Include new URL helpers retroactively into includers of Gitlab::Routing

Closes #34821

See merge request !12716
2017-07-07 18:37:04 +00:00
Douwe Maan c5e11d0405 Merge branch '34737-authentiq-oauth-feature-spec' into 'master'
Test logging in via the Authentiq OAuth provider in a feature spec

Closes #34737

See merge request !12694
2017-07-07 17:09:58 +00:00
James Lopez 20351c3620 move CreatedAtFilter to concerns folder 2017-07-07 19:01:49 +02:00
Douwe Maan c81928cfa7 Include new URL helpers retroactively into includers of Gitlab::Routing 2017-07-07 10:43:37 -05:00
Takuya Noguchi a789ee2d1f Remove .coffee ext files for i18n 2017-07-08 00:40:10 +09:00
Felipe Artur b5f596c3ff Native group milestones 2017-07-07 15:08:49 +00:00
Mateusz Pytel a7c571ae4d #20628 Enable implicit flow in Gitlab as OAuth Provider
Closes #20628 by re-enabling implicit grant in Doorkeeper config. OAuth2 documentation refactored.
2017-07-07 16:54:48 +02:00
Tim Zallmann 64e589c581 Resolve "Inconsistent location of members page between groups and projects" 2017-07-07 14:40:41 +00:00
Kamil Trzciński c0e18e8657 Merge branch 'feature/intermediate/12729-group-secret-variables' into 'master'
Add Group secret variables

Closes #12729

See merge request !12582
2017-07-07 12:42:02 +00:00
Sean McGivern 5c0d8d59ff Merge branch 'gitaly-mandatory' into 'master'
Remove option to disable Gitaly in Rails

See merge request !12677
2017-07-07 12:30:31 +00:00
Jacob Vosmaer 78089d1153 Remove option to disable Gitaly completely 2017-07-07 12:48:34 +02:00
Shinya Maeda f8a2f6f115 Wrap additional routes by dash(-). And remove those routes from path_regex.rb. 2017-07-07 15:35:12 +09:00
Shinya Maeda 5b0954759c Basic BE change
Fix static-snalysis

Move the precedence of group secure variable before project secure variable. Allow project_id to be null.

Separate Ci::VariableProject and Ci::VariableGroup

Add the forgotton files

Add migration file to update type of ci_variables

Fix form_for fpr VariableProject

Fix test

Change the table structure according to the yorik advice

Add necessary migration files. Remove unnecessary migration spec.

Revert safe_model_attributes.yml

Fix models

Fix spec

Avoid self.variable. Use becomes for correct routing.

Use unique index on group_id and key

Add null: false for t.timestamps

Fix schema version

Rename VariableProject and VariableGroup to ProjectVariable and GroupVariable

Rename the rest of them

Add the rest of files

Basic BE change

Fix static-snalysis

Move the precedence of group secure variable before project secure variable. Allow project_id to be null.

Separate Ci::VariableProject and Ci::VariableGroup

Add the forgotton files

Add migration file to update type of ci_variables

Fix form_for fpr VariableProject

Fix test

Change the table structure according to the yorik advice

Add necessary migration files. Remove unnecessary migration spec.

Revert safe_model_attributes.yml

Fix models

Fix spec

Avoid self.variable. Use becomes for correct routing.

Use unique index on group_id and key

Add null: false for t.timestamps

Fix schema version

Rename VariableProject and VariableGroup to ProjectVariable and GroupVariable

Rename the rest of them

Add the rest of files

Implement CURD

Rename codes related to VariableGroup and VariableProject FE part

Remove unneccesary changes

Make Fe code up-to-date

Add protected flag to migration file

Protected group variables essential package

Update schema

Improve doc

Fix logic and spec for models

Fix logic and spec for controllers

 Fix logic and spec for views(pre feature)

Add feature spec

Fixed bugs. placeholder. reveal button. doc.

Add changelog

Remove unnecessary comment

godfat nice catches

Improve secret_variables_for arctecture

Fix spec

Fix StaticAnlysys & path_regex spec

Revert "Improve secret_variables_for arctecture"

This reverts commit c3216ca212322ecf6ca534cb12ce75811a4e77f1.

Use ayufan suggestion for secret_variables_for

Use find instead of find_by

Fix spec message for variable is invalid

Fix spec remove variable.group_id = group.id

godffat spec nitpicks

Use include Gitlab::Routing.url_helpers for presenter spec
2017-07-07 15:33:17 +09:00
Timothy Andrew d53690b6e5 Test logging in via the Authentiq OAuth provider in a feature spec.
- The `migration:path-pg` build was previously failing when the Authentiq
  feature spec was enabled by placing Authentiq configuration in the `test`
  section of `gitlab.yml`

- The `migration:path-pg` task checks out an old revision of the
  codebase (`v8.14.10`) and runs a `schema:load`. It then checks out the commit
  under test, and runs `db:migrate`, to verify that migrations run without
  errors.

- The problem here is that `v8.14.10` does not have the Authentiq module
  installed, but is run with the `gitlab.yml` for `master`, which would contain
  the `Authentiq` configuration in the `test` section.

- The solution was to use the `v8.14.10` `gitlab.yml` for the `schema:load`,
  rather than the `gitlab.yml` from master.
2017-07-07 04:54:30 +00:00
Douwe Maan 7c096f6847 Merge branch 'fix-routes-in-production-mode' into 'master'
Fix shorter route helpers in production environment

Closes #34741

See merge request !12675
2017-07-06 23:53:49 +00:00
Rémy Coutable 18326c2080 Improve & fix the performance bar UI and behavior 2017-07-06 19:37:31 +00:00
Lin Jen-Shin c0e6801111 Just draw :legacy_builds 2017-07-06 22:55:48 +08:00
Douwe Maan a33fb2132c Merge branch '18000-remember-me-for-oauth-login' into 'master'
Fix `migration:path` build for "Honor the 'Remember me' parameter for OAuth-based login"

Closes #34713

See merge request !12668
2017-07-06 12:59:21 +00:00
Sean McGivern 920f0159ca Fix shorter route helpers in production environment
I don't know exactly when Rails picks each module to use, but this seems to be
used by `app` in the console (for instance, `app.project_path` would fail
before, but works now).
2017-07-06 12:41:40 +01:00
Tim Zallmann 674f05d29a Merge branch '34636-update-prometheus-metrics-library' into 'master'
Update Prometheus Metrics Library

See merge request !12621
2017-07-06 11:29:56 +00:00
Timothy Andrew 89b0c987fc Remove Authentiq from the OAuth login integration tests.
- This is causing autoload-related errors in the `migration:path` builds. We
  need to find a better way of testing this provider.
2017-07-06 06:30:08 +00:00
Timothy Andrew 7c2f5bb48d Fix build for !11963.
- Don't use `request.env['omniauth.params']` if it isn't present.

- Remove the `saml` section from the `gitlab.yml` test section. Some tests
  depend on this section not being initially present, so it can be overridden
  in the test. This MR doesn't add any tests for SAML, so we didn't really need
  this in the first place anyway.

- Clean up the test -> omniauth section of `gitlab.yml`
2017-07-06 06:30:07 +00:00
Timothy Andrew 15dba34c9a Add Omniauth OAuth config to the test section of `gitlab.yml`
- I tried to get this to work by stubbing out portions of the config within the
  test. This didn't work as expected because Devise/Omniauth loaded before the
  stub could run, and the stubbed config was ignored.

- I attempted to fix this by reloading Devise/Omniauth after stubbing the
  config. This successfully got Devise to load the stubbed providers, but failed
  while trying to access a route such as `user_gitlab_omniauth_authorize_path`.

- I spent a while trying to figure this out (even trying
  `Rails.application.reload_routes!`), but nothing seemed to work.

- I settled for adding this config directly to `gitlab.yml` rather than go down
  this path any further.
2017-07-06 06:30:06 +00:00
Sean McGivern 462b1ed99d Merge branch 'dm-project-path-helpers-try-2' into 'master'
Create and use project path helpers that only need a project, no namespace

See merge request !12566
2017-07-05 17:53:00 +00:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Sean McGivern 8a3022a698 Revert "Merge branch '18000-remember-me-for-oauth-login' into 'master'"
This reverts merge request !11963
2017-07-05 16:01:40 +00:00
Stan Hu 416c67541f Disable Flipper memoizer in tests to avoid transient failures
Closes #34278
2017-07-05 07:42:17 -07:00
Sean McGivern 6df61942e9 Merge branch '18000-remember-me-for-oauth-login' into 'master'
Honor the "Remember me" parameter for OAuth-based login

Closes #18000

See merge request !11963
2017-07-05 12:41:06 +00:00
Pawel Chojnacki 1eca48819a Merge prometheus unicorn sampler settigns within monitoring settings 2017-07-05 00:51:01 +02:00
Pawel Chojnacki 6d60e265b1 Add spaces between test phases
+ fix wrong test setup
2017-07-05 00:46:12 +02:00
Pawel Chojnacki de6c3597ab correctly handle transforming settings into useful datastructure 2017-07-05 00:46:12 +02:00
Pawel Chojnacki c1b043bdb7 Bring back healthcheck token access to monitoring resources, but mark this as deprecated 2017-07-05 00:46:11 +02:00
Pawel Chojnacki 18521584bd Remove the need to use health check token
in favor of whitelist that will be used to
control the access to monitoring resources
2017-07-05 00:46:11 +02:00
Paweł Chojnacki 26ac691a68 Instrument Unicorn with Ruby exporter 2017-07-04 15:28:34 +00:00
Joshua Lambert fb6144298e Add NGINX metrics and other minor changes 2017-07-04 01:45:35 -04:00
Joshua Lambert 7424eb05d7 Add ELB metrics 2017-07-03 16:28:08 -04:00