From a32e60a7ea976c65d0bcb8a9aed90e2b7ed56966 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 20 May 2021 12:10:26 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- Gemfile | 1 - Gemfile.lock | 1 - README.md | 2 +- .../filtered_search_bar/constants.js | 2 +- .../filtered_search_bar/tokens/base_token.vue | 2 +- .../tokens/label_token.vue | 129 ++++++------- app/controllers/projects/blob_controller.rb | 2 +- app/helpers/keyset_helper.rb | 13 ++ app/models/hooks/project_hook.rb | 5 + app/models/hooks/web_hook.rb | 5 + app/services/web_hook_service.rb | 4 +- .../sast_ui_schema.json | 28 +-- .../gitlab/_keyset_paginator.html.haml | 30 +++ ...-remove-unicorn-gitlab-unicorn-sampler.yml | 5 + .../unreleased/330737_fix_blob_preview.yml | 5 + .../dz-redirect-old-repo-routes.yml | 5 + .../handle-missing-branch-error.yml | 5 + .../ci_drop_cyclical_triggered_pipelines.yml | 2 +- config/gitlab.yml.example | 8 +- config/initializers/1_settings.rb | 1 - config/initializers/7_prometheus_metrics.rb | 6 +- .../active_record_keyset_pagination.rb | 12 ++ .../20210216174832_cycle_analytics_views.yml | 8 +- config/routes/project.rb | 2 +- config/routes/repository.rb | 88 ++------- config/routes/repository_scoped.rb | 74 ++++++++ .../monitoring/performance/index.md | 1 - .../monitoring/prometheus/gitlab_metrics.md | 16 +- .../gitlab_rails_cheat_sheet.md | 49 ----- doc/development/snowplow/index.md | 12 +- doc/development/usage_ping/dictionary.md | 8 +- lib/api/branches.rb | 4 + .../Security/Container-Scanning.gitlab-ci.yml | 19 +- .../metrics/samplers/unicorn_sampler.rb | 73 -------- lib/gitlab/pagination/keyset/paginator.rb | 176 ++++++++++++++++++ .../pagination/keyset/simple_order_builder.rb | 2 + locale/gitlab.pot | 6 + .../projects/blob_controller_spec.rb | 34 ++++ .../tokens/label_token_spec.js | 63 ++----- spec/helpers/keyset_helper_spec.rb | 94 ++++++++++ .../metrics/samplers/unicorn_sampler_spec.rb | 141 -------------- .../pagination/keyset/paginator_spec.rb | 120 ++++++++++++ spec/models/hooks/project_hook_spec.rb | 11 ++ spec/models/hooks/service_hook_spec.rb | 10 + spec/models/hooks/system_hook_spec.rb | 10 + spec/requests/api/branches_spec.rb | 39 ++-- spec/routing/project_routing_spec.rb | 28 ++- spec/services/web_hook_service_spec.rb | 14 ++ 48 files changed, 839 insertions(+), 536 deletions(-) create mode 100644 app/helpers/keyset_helper.rb create mode 100644 app/views/kaminari/gitlab/_keyset_paginator.html.haml create mode 100644 changelogs/unreleased/330402-remove-unicorn-gitlab-unicorn-sampler.yml create mode 100644 changelogs/unreleased/330737_fix_blob_preview.yml create mode 100644 changelogs/unreleased/dz-redirect-old-repo-routes.yml create mode 100644 changelogs/unreleased/handle-missing-branch-error.yml create mode 100644 config/initializers/active_record_keyset_pagination.rb delete mode 100644 lib/gitlab/metrics/samplers/unicorn_sampler.rb create mode 100644 lib/gitlab/pagination/keyset/paginator.rb create mode 100644 spec/helpers/keyset_helper_spec.rb delete mode 100644 spec/lib/gitlab/metrics/samplers/unicorn_sampler_spec.rb create mode 100644 spec/lib/gitlab/pagination/keyset/paginator_spec.rb diff --git a/Gemfile b/Gemfile index cc7d59ef732..724c7143119 100644 --- a/Gemfile +++ b/Gemfile @@ -341,7 +341,6 @@ group :metrics do # Prometheus gem 'prometheus-client-mmap', '~> 0.12.0' - gem 'raindrops', '~> 0.18' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index fcf5acf6c29..6b0c9222858 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1592,7 +1592,6 @@ DEPENDENCIES rails-controller-testing rails-i18n (~> 6.0) rainbow (~> 3.0) - raindrops (~> 0.18) rblineprof (~> 0.3.6) rbtrace (~> 0.4) rdoc (~> 6.1.2) diff --git a/README.md b/README.md index 103c23f152c..bc173b5403c 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ GitLab is a Ruby on Rails application that runs on the following software: - Ubuntu/Debian/CentOS/RHEL/OpenSUSE - Ruby (MRI) 2.7.2 - Git 2.31+ -- Redis 4.0+ +- Redis 5.0+ - PostgreSQL 11+ For more information please see the [architecture](https://docs.gitlab.com/ee/development/architecture.html) and [requirements](https://docs.gitlab.com/ee/install/requirements.html) documentation. diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js b/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js index 2cb1b6a195f..9775a9119c6 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/constants.js @@ -21,7 +21,7 @@ export const DEFAULT_ITERATIONS = DEFAULT_NONE_ANY.concat([ { value: FILTER_CURRENT, text: __(FILTER_CURRENT) }, ]); -export const DEFAULT_LABELS = [{ value: 'No label', text: __('No label') }]; // eslint-disable-line @gitlab/require-i18n-strings +export const DEFAULT_LABELS = [DEFAULT_LABEL_NONE, DEFAULT_LABEL_ANY]; export const DEFAULT_MILESTONES = DEFAULT_NONE_ANY.concat([ { value: 'Upcoming', text: __('Upcoming') }, // eslint-disable-line @gitlab/require-i18n-strings diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/base_token.vue b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/base_token.vue index 6ebc5431012..b325f846934 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/base_token.vue +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/base_token.vue @@ -120,7 +120,7 @@ export default { }, DEBOUNCE_DELAY); }, handleTokenValueSelected(activeTokenValue) { - if (this.isRecentTokenValuesEnabled) { + if (this.isRecentTokenValuesEnabled && activeTokenValue) { setTokenValueToRecentlyUsed(this.recentTokenValuesStorageKey, activeTokenValue); } }, diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue index 76b005772ec..a8868da2dcc 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue @@ -1,27 +1,20 @@