From 3b85f5e4a123538b14eb052ae0efb9d7dbcd4e9b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 16 Sep 2021 09:09:11 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .gitlab/CODEOWNERS | 2 ++ app/controllers/concerns/issuable_collections.rb | 2 +- app/controllers/explore/projects_controller.rb | 2 +- app/models/project.rb | 1 + .../query_project_ci_feature_usages_for_coverage.yml | 8 ++++++++ .../20210216181147_service_desk_enabled_projects.yml | 2 +- config/metrics/counts_28d/20210216181158_epics.yml | 3 ++- config/metrics/counts_all/20210204124930_servers.yml | 14 ++++++++------ config/metrics/counts_all/20210204124932_clusters.yml | 14 ++++++++------ config/metrics/counts_all/20210216181102_issues.yml | 2 +- .../20210216181122_service_desk_enabled_projects.yml | 2 +- .../counts_all/20210216181124_service_desk_issues.yml | 2 +- config/metrics/counts_all/20210216181134_epics.yml | 3 ++- config/metrics/license/20210204124928_version.yml | 12 +++++++----- config/metrics/settings/20210216183241_filesystems.yml | 17 +++++++++-------- doc/.vale/gitlab/SubstitutionSuggestions.yml | 2 ++ doc/development/documentation/styleguide/word_list.md | 13 +++++++------ doc/development/snowplow/index.md | 7 ++++++- .../testing_guide/end_to_end/beginners_guide.md | 4 ++-- doc/update/index.md | 4 ++-- spec/controllers/explore/projects_controller_spec.rb | 10 +++++----- spec/lib/gitlab/import_export/all_models.yml | 1 + spec/models/project_spec.rb | 1 + .../issuable_anonymous_search_disabled_examples.rb | 10 +++++----- 24 files changed, 84 insertions(+), 54 deletions(-) create mode 100644 config/feature_flags/development/query_project_ci_feature_usages_for_coverage.yml diff --git a/.gitlab/CODEOWNERS b/.gitlab/CODEOWNERS index 7dd676e6a47..095601ba825 100644 --- a/.gitlab/CODEOWNERS +++ b/.gitlab/CODEOWNERS @@ -24,6 +24,8 @@ /doc/administration/reference_architectures/ @axil /doc/administration/snippets/ @aqualls /doc/administration/troubleshooting @axil @marcia @eread +/doc/api/graphql/ @msedlakjakubowski @kpaizee +/doc/api/graphql/reference/ @kpaizee /doc/api/group_activity_analytics.md @msedlakjakubowski /doc/ci/ @marcel.amirault @sselhorn /doc/ci/environments/ @axil diff --git a/app/controllers/concerns/issuable_collections.rb b/app/controllers/concerns/issuable_collections.rb index fe793a1116f..4841225de08 100644 --- a/app/controllers/concerns/issuable_collections.rb +++ b/app/controllers/concerns/issuable_collections.rb @@ -16,7 +16,7 @@ module IssuableCollections def show_alert_if_search_is_disabled return if current_user || params[:search].blank? || !html_request? || Feature.disabled?(:disable_anonymous_search, type: :ops) - flash[:notice] = _('You must sign in to search for specific terms.') + flash.now[:notice] = _('You must sign in to search for specific terms.') end # rubocop:disable Gitlab/ModuleWithInstanceVariables diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb index 92ff3ffb8ff..3dc6a16cbc1 100644 --- a/app/controllers/explore/projects_controller.rb +++ b/app/controllers/explore/projects_controller.rb @@ -125,7 +125,7 @@ class Explore::ProjectsController < Explore::ApplicationController def show_alert_if_search_is_disabled return if current_user || params[:name].blank? && params[:search].blank? || !html_request? || Feature.disabled?(:disable_anonymous_project_search, type: :ops) - flash[:notice] = _('You must sign in to search for specific projects.') + flash.now[:notice] = _('You must sign in to search for specific projects.') end end diff --git a/app/models/project.rb b/app/models/project.rb index 99c64ec1f68..74ffeef797e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -380,6 +380,7 @@ class Project < ApplicationRecord has_many :jira_imports, -> { order 'jira_imports.created_at' }, class_name: 'JiraImportState', inverse_of: :project has_many :daily_build_group_report_results, class_name: 'Ci::DailyBuildGroupReportResult' + has_many :ci_feature_usages, class_name: 'Projects::CiFeatureUsage' has_many :repository_storage_moves, class_name: 'Projects::RepositoryStorageMove', inverse_of: :container diff --git a/config/feature_flags/development/query_project_ci_feature_usages_for_coverage.yml b/config/feature_flags/development/query_project_ci_feature_usages_for_coverage.yml new file mode 100644 index 00000000000..1b720d6276b --- /dev/null +++ b/config/feature_flags/development/query_project_ci_feature_usages_for_coverage.yml @@ -0,0 +1,8 @@ +--- +name: query_project_ci_feature_usages_for_coverage +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/69890 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/339974 +milestone: '14.3' +type: development +group: group::testing +default_enabled: false diff --git a/config/metrics/counts_28d/20210216181147_service_desk_enabled_projects.yml b/config/metrics/counts_28d/20210216181147_service_desk_enabled_projects.yml index 0a403b0da70..b0f78840daa 100644 --- a/config/metrics/counts_28d/20210216181147_service_desk_enabled_projects.yml +++ b/config/metrics/counts_28d/20210216181147_service_desk_enabled_projects.yml @@ -4,7 +4,7 @@ key_path: usage_activity_by_stage_monthly.plan.service_desk_enabled_projects description: Count creator ids from projects with service desk enabled product_section: dev product_stage: plan -product_group: group::plan +product_group: group::product planning product_category: service_desk value_type: number status: active diff --git a/config/metrics/counts_28d/20210216181158_epics.yml b/config/metrics/counts_28d/20210216181158_epics.yml index 56401d0108f..59b6cbad145 100644 --- a/config/metrics/counts_28d/20210216181158_epics.yml +++ b/config/metrics/counts_28d/20210216181158_epics.yml @@ -4,7 +4,7 @@ key_path: usage_activity_by_stage_monthly.plan.epics description: Count distinct author ids from epics product_section: dev product_stage: plan -product_group: group::plan +product_group: group::product planning product_category: epics value_type: number status: active @@ -14,6 +14,7 @@ distribution: - ee tier: - premium +- ultimate performance_indicator_type: - gmau - paid_gmau diff --git a/config/metrics/counts_all/20210204124930_servers.yml b/config/metrics/counts_all/20210204124930_servers.yml index 0e478dc5882..16e7504db9c 100644 --- a/config/metrics/counts_all/20210204124930_servers.yml +++ b/config/metrics/counts_all/20210204124930_servers.yml @@ -2,17 +2,19 @@ data_category: operational key_path: gitaly.servers description: Total Gitalty Servers -product_section: growth -product_stage: growth -product_group: group::product intelligence -product_category: collection +product_section: dev +product_stage: create +product_group: group::gitaly +product_category: gitaly value_type: number status: active time_frame: all -data_source: +data_source: database distribution: - ce +- ee tier: - free -skip_validation: true +- premium +- ultimate milestone: "<13.9" diff --git a/config/metrics/counts_all/20210204124932_clusters.yml b/config/metrics/counts_all/20210204124932_clusters.yml index 07d402ed965..963726e3a14 100644 --- a/config/metrics/counts_all/20210204124932_clusters.yml +++ b/config/metrics/counts_all/20210204124932_clusters.yml @@ -2,17 +2,19 @@ data_category: operational key_path: gitaly.clusters description: Total GitLab Managed clusters both enabled and disabled -product_section: growth -product_stage: growth -product_group: group::product intelligence -product_category: collection +product_section: dev +product_stage: create +product_group: group::gitaly +product_category: gitaly value_type: number status: active time_frame: all -data_source: +data_source: database distribution: - ce +- ee tier: - free -skip_validation: true +- premium +- ultimate milestone: "<13.9" diff --git a/config/metrics/counts_all/20210216181102_issues.yml b/config/metrics/counts_all/20210216181102_issues.yml index 8a6fc6caa27..b902437e2f9 100644 --- a/config/metrics/counts_all/20210216181102_issues.yml +++ b/config/metrics/counts_all/20210216181102_issues.yml @@ -4,7 +4,7 @@ key_path: counts.issues description: Count of Issues created product_section: dev product_stage: plan -product_group: group::plan +product_group: group::project management product_category: issue_tracking value_type: number status: active diff --git a/config/metrics/counts_all/20210216181122_service_desk_enabled_projects.yml b/config/metrics/counts_all/20210216181122_service_desk_enabled_projects.yml index f213454b553..d57a1b6a052 100644 --- a/config/metrics/counts_all/20210216181122_service_desk_enabled_projects.yml +++ b/config/metrics/counts_all/20210216181122_service_desk_enabled_projects.yml @@ -4,7 +4,7 @@ key_path: usage_activity_by_stage.plan.service_desk_enabled_projects description: Count creator ids from projects with service desk enabled product_section: dev product_stage: plan -product_group: group::plan +product_group: group::product planning product_category: service_desk value_type: number status: active diff --git a/config/metrics/counts_all/20210216181124_service_desk_issues.yml b/config/metrics/counts_all/20210216181124_service_desk_issues.yml index 42b1d591870..476d2fab058 100644 --- a/config/metrics/counts_all/20210216181124_service_desk_issues.yml +++ b/config/metrics/counts_all/20210216181124_service_desk_issues.yml @@ -4,7 +4,7 @@ key_path: usage_activity_by_stage.plan.service_desk_issues description: Count of service desk issues product_section: dev product_stage: plan -product_group: group::plan +product_group: group::product planning product_category: service_desk value_type: number status: active diff --git a/config/metrics/counts_all/20210216181134_epics.yml b/config/metrics/counts_all/20210216181134_epics.yml index ef1bc2f2e03..4b6a1ed0291 100644 --- a/config/metrics/counts_all/20210216181134_epics.yml +++ b/config/metrics/counts_all/20210216181134_epics.yml @@ -4,7 +4,7 @@ key_path: usage_activity_by_stage.plan.epics description: Count distinct author ids from epics product_section: dev product_stage: plan -product_group: group::plan +product_group: group::product planning product_category: epics value_type: number status: active @@ -14,4 +14,5 @@ distribution: - ee tier: - premium +- ultimate milestone: "<13.9" diff --git a/config/metrics/license/20210204124928_version.yml b/config/metrics/license/20210204124928_version.yml index 8bb19156cc5..de081d10cff 100644 --- a/config/metrics/license/20210204124928_version.yml +++ b/config/metrics/license/20210204124928_version.yml @@ -2,10 +2,10 @@ data_category: operational key_path: gitaly.version description: Version of Gitaly -product_section: growth -product_stage: growth -product_group: group::product intelligence -product_category: collection +product_section: dev +product_stage: create +product_group: group::gitaly +product_category: gitaly value_type: string status: active milestone: "<13.9" @@ -13,7 +13,9 @@ time_frame: none data_source: system distribution: - ce +- ee tier: - free -skip_validation: true +- premium +- ultimate performance_indicator_type: [] diff --git a/config/metrics/settings/20210216183241_filesystems.yml b/config/metrics/settings/20210216183241_filesystems.yml index 54f9aa9c030..216ca790638 100644 --- a/config/metrics/settings/20210216183241_filesystems.yml +++ b/config/metrics/settings/20210216183241_filesystems.yml @@ -1,19 +1,20 @@ --- data_category: optional key_path: gitaly.filesystems -description: '' -product_section: '' -product_stage: '' -product_group: '' -product_category: '' -value_type: number +description: Filesystem data for Gitaly installations +product_section: dev +product_stage: create +product_group: group::gitaly +product_category: gitaly +value_type: string status: active time_frame: all data_source: system distribution: - ce +- ee tier: - free -skip_validation: true -performance_indicator_type: [] +- premium +- ultimate milestone: "<13.9" diff --git a/doc/.vale/gitlab/SubstitutionSuggestions.yml b/doc/.vale/gitlab/SubstitutionSuggestions.yml index bc9a6e3c70d..e7c0cc04244 100644 --- a/doc/.vale/gitlab/SubstitutionSuggestions.yml +++ b/doc/.vale/gitlab/SubstitutionSuggestions.yml @@ -14,7 +14,9 @@ swap: active user: '"billable user"' active users: '"billable users"' docs: '"documentation"' + e-mail: '"email"' GFM: '"GitLab Flavored Markdown"' + it is recommended: '"we recommend"' OAuth2: '"OAuth 2.0"' once that: '"after that"' once the: '"after the"' diff --git a/doc/development/documentation/styleguide/word_list.md b/doc/development/documentation/styleguide/word_list.md index 08d67b9614f..eafe0e7a1c2 100644 --- a/doc/development/documentation/styleguide/word_list.md +++ b/doc/development/documentation/styleguide/word_list.md @@ -186,7 +186,7 @@ Do not use Latin abbreviations. Use **for example**, **such as**, **for instance ## email -Do not use **e-mail** with a hyphen. When plural, use **emails** or **email messages**. +Do not use **e-mail** with a hyphen. When plural, use **emails** or **email messages**. ([Vale](../testing.md#vale) rule: [`SubstitutionSuggestions.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionSuggestions.yml)) ## enable @@ -272,7 +272,7 @@ Do not use **Guest permissions**. A user who is assigned the Guest role has a se ## handy -Do not use **handy**. If the user doesn't find the feature or process to be handy, we lose their trust. +Do not use **handy**. If the user doesn't find the feature or process to be handy, we lose their trust. ([Vale](../testing.md#vale) rule: [`Simplicity.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Simplicity.yml)) ## high availability, HA @@ -512,7 +512,7 @@ You can use **single sign-on**. ## simply, simple -Do not use **simply** or **simple**. If the user doesn't find the process to be simple, we lose their trust. +Do not use **simply** or **simple**. If the user doesn't find the process to be simple, we lose their trust. ([Vale](../testing.md#vale) rule: [`Simplicity.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Simplicity.yml)) ## slashes @@ -524,7 +524,7 @@ Do not use **slave**. Another option is **secondary**. ([Vale](../testing.md#val ## subgroup -Use **subgroup** (no hyphen) instead of **sub-group**. +Use **subgroup** (no hyphen) instead of **sub-group**. ([Vale](../testing.md#vale) rule: [`SubstitutionSuggestions.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionSuggestions.yml)) ## that @@ -595,11 +595,12 @@ Do not use **type** if you can avoid it. Use **enter** instead. ## useful -Do not use **useful**. If the user doesn't find the process to be useful, we lose their trust. +Do not use **useful**. If the user doesn't find the process to be useful, we lose their trust. ([Vale](../testing.md#vale) rule: [`Simplicity.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/Simplicity.yml)) ## utilize Do not use **utilize**. Use **use** instead. It's more succinct and easier for non-native English speakers to understand. +([Vale](../testing.md#vale) rule: [`SubstitutionSuggestions.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionSuggestions.yml)) ## Value Stream Analytics @@ -616,7 +617,7 @@ Try to avoid **we** and focus instead on how the user can accomplish something i - Do: Use widgets when you have work you want to organize. - Do not: We created a feature for you to add widgets. -One exception: You can use **we recommend** instead of **it is recommended** or **GitLab recommends**. +One exception: You can use **we recommend** instead of **it is recommended** or **GitLab recommends**. ([Vale](../testing.md#vale) rule: [`SubstitutionSuggestions.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/SubstitutionSuggestions.yml)) ## whitelist diff --git a/doc/development/snowplow/index.md b/doc/development/snowplow/index.md index 0577df474d9..e8b7d871b77 100644 --- a/doc/development/snowplow/index.md +++ b/doc/development/snowplow/index.md @@ -544,10 +544,15 @@ Snowplow Micro is a Docker-based solution for testing frontend and backend event ./snowplow-micro.sh ``` -1. Update your instance's settings to enable Snowplow events and point to the Snowplow Micro collector: +1. Use GDK to start the PostgreSQL terminal and connect to the `gitlabhq_development` database: ```shell gdk psql -d gitlabhq_development + ``` + +1. Update your instance's settings to enable Snowplow events and point to the Snowplow Micro collector: + + ```shell update application_settings set snowplow_collector_hostname='localhost:9090', snowplow_enabled=true, snowplow_cookie_domain='.gitlab.com'; ``` diff --git a/doc/development/testing_guide/end_to_end/beginners_guide.md b/doc/development/testing_guide/end_to_end/beginners_guide.md index e0f0e9e7089..7370cc5771b 100644 --- a/doc/development/testing_guide/end_to_end/beginners_guide.md +++ b/doc/development/testing_guide/end_to_end/beginners_guide.md @@ -349,8 +349,8 @@ GITLAB_PASSWORD= bundle exec bin/qa Test::Instance::All http: Where `` is: -- `qa/specs/features/browser_ui/1_manage/login/login_spec.rb` when running the Login example. -- `qa/specs/features/browser_ui/2_plan/issues/issue_spec.rb` when running the Issue example. +- `qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb` when running the Login example. +- `qa/specs/features/browser_ui/2_plan/issues/create_issue_spec.rb` when running the Issue example. ## End-to-end test merge request template diff --git a/doc/update/index.md b/doc/update/index.md index 60bfbb10df8..0088212a20f 100644 --- a/doc/update/index.md +++ b/doc/update/index.md @@ -178,8 +178,8 @@ migration](../integration/elasticsearch.md#retry-a-halted-migration). ## Upgrade paths -Upgrading across multiple GitLab versions in one go is *only possible with downtime*. -The following examples assume a downtime upgrade. +Upgrading across multiple GitLab versions in one go is *only possible by accepting downtime*. +The following examples assume downtime is acceptable while upgrading. If you don't want any downtime, read how to [upgrade with zero downtime](zero_downtime.md). Find where your version sits in the upgrade path below, and upgrade GitLab diff --git a/spec/controllers/explore/projects_controller_spec.rb b/spec/controllers/explore/projects_controller_spec.rb index 6e30ce3d5e1..2297198878d 100644 --- a/spec/controllers/explore/projects_controller_spec.rb +++ b/spec/controllers/explore/projects_controller_spec.rb @@ -214,7 +214,7 @@ RSpec.describe Explore::ProjectsController do sign_in(create(:user)) get controller_action, params: params_with_name - expect(flash[:notice]).to be_nil + expect(flash.now[:notice]).to be_nil end end end @@ -260,14 +260,14 @@ RSpec.describe Explore::ProjectsController do it 'shows a flash message' do get controller_action, params: params_with_name - expect(flash[:notice]).to eq('You must sign in to search for specific projects.') + expect(flash.now[:notice]).to eq('You must sign in to search for specific projects.') end context 'when search param is not given' do it 'does not show a flash message' do get controller_action - expect(flash[:notice]).to be_nil + expect(flash.now[:notice]).to be_nil end end @@ -275,7 +275,7 @@ RSpec.describe Explore::ProjectsController do it 'does not show a flash message' do get controller_action, params: params_with_name.merge(format: :atom) - expect(flash[:notice]).to be_nil + expect(flash.now[:notice]).to be_nil end end end @@ -288,7 +288,7 @@ RSpec.describe Explore::ProjectsController do it 'does not show a flash message' do get controller_action, params: params_with_name - expect(flash[:notice]).to be_nil + expect(flash.now[:notice]).to be_nil end end end diff --git a/spec/lib/gitlab/import_export/all_models.yml b/spec/lib/gitlab/import_export/all_models.yml index 59b75d9626f..ecd4e91afe6 100644 --- a/spec/lib/gitlab/import_export/all_models.yml +++ b/spec/lib/gitlab/import_export/all_models.yml @@ -592,6 +592,7 @@ project: - error_tracking_client_keys - pending_builds - security_scans +- ci_feature_usages award_emoji: - awardable - user diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 234d16535ab..3989ddc31e8 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -139,6 +139,7 @@ RSpec.describe Project, factory_default: :keep do it { is_expected.to have_many(:error_tracking_errors).class_name('ErrorTracking::Error') } it { is_expected.to have_many(:error_tracking_client_keys).class_name('ErrorTracking::ClientKey') } it { is_expected.to have_many(:pending_builds).class_name('Ci::PendingBuild') } + it { is_expected.to have_many(:ci_feature_usages).class_name('Projects::CiFeatureUsage') } # GitLab Pages it { is_expected.to have_many(:pages_domains) } diff --git a/spec/support/shared_examples/controllers/issuable_anonymous_search_disabled_examples.rb b/spec/support/shared_examples/controllers/issuable_anonymous_search_disabled_examples.rb index ea2d348a700..e77acb93798 100644 --- a/spec/support/shared_examples/controllers/issuable_anonymous_search_disabled_examples.rb +++ b/spec/support/shared_examples/controllers/issuable_anonymous_search_disabled_examples.rb @@ -12,14 +12,14 @@ RSpec.shared_examples 'issuable list with anonymous search disabled' do |action| it 'shows a flash message' do get controller_action, params: params_with_search - expect(flash[:notice]).to eq('You must sign in to search for specific terms.') + expect(flash.now[:notice]).to eq('You must sign in to search for specific terms.') end context 'when search param is not given' do it 'does not show a flash message' do get controller_action, params: params - expect(flash[:notice]).to be_nil + expect(flash.now[:notice]).to be_nil end end @@ -28,7 +28,7 @@ RSpec.shared_examples 'issuable list with anonymous search disabled' do |action| sign_in(create(:user)) get controller_action, params: params_with_search - expect(flash[:notice]).to be_nil + expect(flash.now[:notice]).to be_nil end end @@ -36,7 +36,7 @@ RSpec.shared_examples 'issuable list with anonymous search disabled' do |action| it 'does not show a flash message' do get controller_action, params: params_with_search.merge(format: :atom) - expect(flash[:notice]).to be_nil + expect(flash.now[:notice]).to be_nil end end end @@ -49,7 +49,7 @@ RSpec.shared_examples 'issuable list with anonymous search disabled' do |action| it 'does not show a flash message' do get controller_action, params: params_with_search - expect(flash[:notice]).to be_nil + expect(flash.now[:notice]).to be_nil end end end -- cgit v1.2.3