diff options
25 files changed, 119 insertions, 60 deletions
diff --git a/.gitignore b/.gitignore index 231541a2237..d43b1908dd3 100644 --- a/.gitignore +++ b/.gitignore @@ -84,3 +84,4 @@ jsdoc/ .overcommit.yml .projections.json /qa/.rakeTasks +webpack-dev-server.json diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index c015fdd027e..daffce98630 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -245,5 +245,9 @@ webpack-dev-server: variables: WEBPACK_MEMORY_TEST: "true" script: - - node --version - node --expose-gc node_modules/.bin/webpack-dev-server --config config/webpack.config.js + artifacts: + name: webpack-dev-server + expire_in: 31d + paths: + - webpack-dev-server.json diff --git a/app/assets/stylesheets/pages/convdev_index.scss b/app/assets/stylesheets/pages/dev_ops_score.scss index 6b6dce43dba..6b6dce43dba 100644 --- a/app/assets/stylesheets/pages/convdev_index.scss +++ b/app/assets/stylesheets/pages/dev_ops_score.scss diff --git a/app/models/concerns/diff_positionable_note.rb b/app/models/concerns/diff_positionable_note.rb index 195d9e107c5..6484a3157b1 100644 --- a/app/models/concerns/diff_positionable_note.rb +++ b/app/models/concerns/diff_positionable_note.rb @@ -5,7 +5,7 @@ module DiffPositionableNote included do delegate :on_text?, :on_image?, to: :position, allow_nil: true before_validation :set_original_position, on: :create - before_validation :update_position, on: :create, if: :on_text? + before_validation :update_position, on: :create, if: :on_text?, unless: :importing? serialize :original_position, Gitlab::Diff::Position # rubocop:disable Cop/ActiveRecordSerialize serialize :position, Gitlab::Diff::Position # rubocop:disable Cop/ActiveRecordSerialize diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index 0623ba746c2..686d06d3ee0 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -21,8 +21,8 @@ class DiffNote < Note validate :positions_complete validate :verify_supported - before_validation :set_line_code, if: :on_text? - after_save :keep_around_commits + before_validation :set_line_code, if: :on_text?, unless: :importing? + after_save :keep_around_commits, unless: :importing? after_commit :create_diff_file, on: :create def discussion_class(*) diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index a25d1ccccca..780bbe75485 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -242,7 +242,7 @@ class MergeRequest < ApplicationRecord ignore_column :state, remove_with: '12.7', remove_after: '2019-12-22' - after_save :keep_around_commit + after_save :keep_around_commit, unless: :importing? alias_attribute :project, :target_project alias_attribute :project_id, :target_project_id diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index 06a9a6ee873..b8a1575c180 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -164,7 +164,7 @@ class MergeRequestDiff < ApplicationRecord # hooks that run when an attribute was changed are run twice. reset - keep_around_commits + keep_around_commits unless importing? end def set_as_latest_diff diff --git a/app/models/note.rb b/app/models/note.rb index 4e3700f3eaa..f5f6ecf6336 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -155,9 +155,9 @@ class Note < ApplicationRecord after_initialize :ensure_discussion_id before_validation :nullify_blank_type, :nullify_blank_line_code before_validation :set_discussion_id, on: :create - after_save :keep_around_commit, if: :for_project_noteable? - after_save :expire_etag_cache - after_save :touch_noteable + after_save :keep_around_commit, if: :for_project_noteable?, unless: :importing? + after_save :expire_etag_cache, unless: :importing? + after_save :touch_noteable, unless: :importing? after_destroy :expire_etag_cache class << self diff --git a/app/views/instance_statistics/dev_ops_score/_callout.html.haml b/app/views/instance_statistics/dev_ops_score/_callout.html.haml index 61f998424f2..64eb72c0d8d 100644 --- a/app/views/instance_statistics/dev_ops_score/_callout.html.haml +++ b/app/views/instance_statistics/dev_ops_score/_callout.html.haml @@ -2,12 +2,12 @@ .user-callout{ data: { uid: 'dev_ops_score_intro_callout_dismissed' } } .bordered-box.landing.content-block %button.btn.btn-default.close.js-close-callout{ type: 'button', - 'aria-label' => _('Dismiss ConvDev introduction') } + 'aria-label' => _('Dismiss DevOps Score introduction') } = icon('times', class: 'dismiss-icon', 'aria-hidden' => 'true') .user-callout-copy %h4 - = _('Introducing Your Conversational Development Index') + = _('Introducing Your DevOps Score') %p - = _('Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers.') - .svg-container.convdev + = _('Your DevOps Score gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers.') + .svg-container.devops = custom_icon('dev_ops_score_overview') diff --git a/app/views/instance_statistics/dev_ops_score/index.html.haml b/app/views/instance_statistics/dev_ops_score/index.html.haml index bd457f4740a..44c6e9664db 100644 --- a/app/views/instance_statistics/dev_ops_score/index.html.haml +++ b/app/views/instance_statistics/dev_ops_score/index.html.haml @@ -1,4 +1,4 @@ -- page_title _('ConvDev Index') +- page_title _('DevOps Score') - usage_ping_enabled = Gitlab::CurrentSettings.usage_ping_enabled .container diff --git a/app/views/layouts/nav/sidebar/_instance_statistics.html.haml b/app/views/layouts/nav/sidebar/_instance_statistics.html.haml index 6a5f727bb48..0a84e952442 100644 --- a/app/views/layouts/nav/sidebar/_instance_statistics.html.haml +++ b/app/views/layouts/nav/sidebar/_instance_statistics.html.haml @@ -11,12 +11,12 @@ .nav-icon-container = sprite_icon('comment') %span.nav-item-name - = _('ConvDev Index') + = _('DevOps Score') %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :dev_ops_score, html_options: { class: "fly-out-top-item" } ) do = link_to instance_statistics_dev_ops_score_index_path do %strong.fly-out-top-item-name - = _('ConvDev Index') + = _('DevOps Score') - if Gitlab::CurrentSettings.usage_ping_enabled = nav_link(controller: :cohorts) do diff --git a/changelogs/unreleased/33257-prevent-accidental-deletions-via-soft-delete-for-groups-services.yml b/changelogs/unreleased/33257-prevent-accidental-deletions-via-soft-delete-for-groups-services.yml new file mode 100644 index 00000000000..ffc3651185b --- /dev/null +++ b/changelogs/unreleased/33257-prevent-accidental-deletions-via-soft-delete-for-groups-services.yml @@ -0,0 +1,5 @@ +--- +title: Add services for 'soft-delete for groups' feature +merge_request: 19358 +author: +type: added diff --git a/changelogs/unreleased/Replace-BoardService_in_mock_data-js.yml b/changelogs/unreleased/Replace-BoardService_in_mock_data-js.yml new file mode 100644 index 00000000000..4e047bd0dc9 --- /dev/null +++ b/changelogs/unreleased/Replace-BoardService_in_mock_data-js.yml @@ -0,0 +1,5 @@ +--- +title: removes references of BoardService +merge_request: 20879 +author: nuwe1 +type: other diff --git a/config/webpack.config.js b/config/webpack.config.js index f69a799ebcf..3a43f515a1b 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -1,5 +1,6 @@ const path = require('path'); const glob = require('glob'); +const fs = require('fs'); const webpack = require('webpack'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin; @@ -23,6 +24,7 @@ const NO_SOURCEMAPS = process.env.NO_SOURCEMAPS; const VUE_VERSION = require('vue/package.json').version; const VUE_LOADER_VERSION = require('vue-loader/package.json').version; +const WEBPACK_VERSION = require('webpack/package.json').version; const devtool = IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map'; @@ -359,6 +361,21 @@ module.exports = { console.log(`Webpack heap size: ${toMB(memoryUsage)} MB`); + const webpackStatistics = { + memoryUsage, + date: Date.now(), // milliseconds + commitSHA: process.env.CI_COMMIT_SHA, + nodeVersion: process.versions.node, + webpackVersion: WEBPACK_VERSION, + }; + + console.log(webpackStatistics); + + fs.writeFileSync( + path.join(ROOT_PATH, 'webpack-dev-server.json'), + JSON.stringify(webpackStatistics), + ); + // exit in case we're running webpack-dev-server IS_DEV_SERVER && process.exit(); }); diff --git a/doc/integration/elasticsearch.md b/doc/integration/elasticsearch.md index 5c77bd5bcd9..5150188d819 100644 --- a/doc/integration/elasticsearch.md +++ b/doc/integration/elasticsearch.md @@ -158,7 +158,10 @@ If you select `Limit namespaces and projects that can be indexed`, more options You can select namespaces and projects to index exclusively. Please note that if the namespace is a group it will include any sub-groups and projects belonging to those sub-groups to be indexed as well. +Elasticsearch only provides cross-group code/commit search (global) if all name-spaces are indexed. In this particular scenario where only a subset of namespaces are indexed, a global search will not provide a code or commit scope. This will be possible only in the scope of an indexed namespace. Currently there is no way to code/commit search in multiple indexed namespaces (when only a subset of namespaces has been indexed). For example if two groups are indexed, there is no way to run a single code search on both. You can only run a code search on the first group and then on the second. + You can filter the selection dropdown by writing part of the namespace or project name you're interested in. + ![limit namespace filter](img/limit_namespace_filter.png) NOTE: **Note**: @@ -502,6 +505,9 @@ Here are some common pitfalls and how to overcome them: If you see `Elasticsearch::Model::Response::Records`, you are using Elasticsearch. + NOTE: **Note**: + The above instructions are used to verify that GitLab is using Elasticsearch only when indexing all namespaces. This is not to be used for scenarios that only index a [subset of namespaces](https://docs.gitlab.com/ee/integration/elasticsearch.html#limiting-namespaces-and-projects). + - **I updated GitLab and now I can't find anything** We continuously make updates to our indexing strategies and aim to support @@ -522,6 +528,9 @@ Here are some common pitfalls and how to overcome them: pp s.search_objects.to_a ``` + NOTE: **Note**: + The above instructions are not to be used for scenarios that only index a [subset of namespaces](https://docs.gitlab.com/ee/integration/elasticsearch.html#limiting-namespaces-and-projects). + See [Elasticsearch Index Scopes](#elasticsearch-index-scopes) for more information on searching for specific types of data. - **I indexed all the repositories but then switched Elasticsearch servers and now I can't find anything** diff --git a/doc/user/admin_area/monitoring/convdev.md b/doc/user/admin_area/monitoring/convdev.md deleted file mode 100644 index 6ad8a5a7ff0..00000000000 --- a/doc/user/admin_area/monitoring/convdev.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -redirect_to: '../../instance_statistics/convdev.md' ---- - -This document was moved to [another location](../../instance_statistics/convdev.md). diff --git a/doc/user/admin_area/monitoring/dev_ops_score.md b/doc/user/admin_area/monitoring/dev_ops_score.md new file mode 100644 index 00000000000..f8b66531f2f --- /dev/null +++ b/doc/user/admin_area/monitoring/dev_ops_score.md @@ -0,0 +1,5 @@ +--- +redirect_to: '../../instance_statistics/dev_ops_score.md' +--- + +This document was moved to [another location](../../instance_statistics/dev_ops_score.md). diff --git a/doc/user/gitlab_com/index.md b/doc/user/gitlab_com/index.md index 38ffd07a737..929a132c4c3 100644 --- a/doc/user/gitlab_com/index.md +++ b/doc/user/gitlab_com/index.md @@ -14,6 +14,17 @@ Below are the fingerprints for GitLab.com's SSH host keys. | ED25519 | `2e:65:6a:c8:cf:bf:b2:8b:9a:bd:6d:9f:11:5c:12:16` | `eUXGGm1YGsMAS7vkcx6JOJdOGHPem5gQp4taiCfCLB8` | | RSA | `b6:03:0e:39:97:9e:d0:e7:24:ce:a3:77:3e:01:42:09` | `ROQFvPThGrW4RuWLoL9tq9I9zJ42fK4XywyRtbOz/EQ` | +## SSH `known_hosts` entries + +Add the following to `.ssh/known_hosts` to skip manual fingerprint +confirmation in SSH: + +``` +gitlab.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf +gitlab.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onrSzH9bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9 +gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY= +``` + ## Mail configuration GitLab.com sends emails from the `mg.gitlab.com` domain via [Mailgun] and has diff --git a/doc/user/instance_statistics/convdev.md b/doc/user/instance_statistics/dev_ops_score.md index 705f9be3d94..fbe4cc3c6df 100644 --- a/doc/user/instance_statistics/convdev.md +++ b/doc/user/instance_statistics/dev_ops_score.md @@ -1,12 +1,12 @@ -# Conversational Development Index +# DevOps Score -> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/issues/30469) in GitLab 9.3. +> [Renamed from Conversational Development Index](https://gitlab.com/gitlab-org/gitlab/issues/20976) in GitLab 12.6. NOTE: **Note:** Your GitLab instance's [usage ping](../admin_area/settings/usage_statistics.md#usage-ping-core-only) must be activated in order to use this feature. -The [Conversational Development](http://conversationaldevelopment.com/2017/04/16/what-is-conversational-development/) Index (ConvDev Index) gives you an overview of your entire -instance's adoption of [Concurrent DevOps](https://about.gitlab.com/concurrent-devops/) +The DevOps Score gives you an overview of your entire instance's adoption of +[Concurrent DevOps](https://about.gitlab.com/concurrent-devops/) from planning to monitoring. This displays the usage of these GitLab features over @@ -16,7 +16,7 @@ of top-performing instances based on [usage ping data](../admin_area/settings/us collected. Your score is compared to the lead score of each feature and then expressed as a percentage at the bottom of said feature. Your overall index score is an average of all your feature score percentages - this percentage value is presented above all the of features on the page. -![ConvDev index](img/convdev_index.png) +![DevOps Score](img/dev_ops_score.png) The page also provides helpful links to articles and GitLab docs, to help you improve your scores. diff --git a/doc/user/instance_statistics/img/convdev_index.png b/doc/user/instance_statistics/img/dev_ops_score.png Binary files differindex bee1317438d..bee1317438d 100644 --- a/doc/user/instance_statistics/img/convdev_index.png +++ b/doc/user/instance_statistics/img/dev_ops_score.png diff --git a/doc/user/instance_statistics/index.md b/doc/user/instance_statistics/index.md index fe8e8c96f81..53bf85b6e13 100644 --- a/doc/user/instance_statistics/index.md +++ b/doc/user/instance_statistics/index.md @@ -12,5 +12,5 @@ and can be accessed via the top bar. There are two kinds of statistics: -- [Conversational Development (ConvDev) Index](convdev.md): Provides an overview of your entire instance's feature usage. +- [Dev Ops Score](dev_ops_score.md): Provides an overview of your entire instance's feature usage. - [User Cohorts](user_cohorts.md): Display the monthly cohorts of new users and their activities over time. diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 3ba5ffe617d..9926fd8994e 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -1826,9 +1826,15 @@ msgstr "" msgid "Any Milestone" msgstr "" +msgid "Any eligible user" +msgstr "" + msgid "Any encrypted tokens" msgstr "" +msgid "Any member with Developer or higher permissions to the project." +msgstr "" + msgid "Any namespace" msgstr "" @@ -1936,9 +1942,6 @@ msgid_plural "ApprovalRuleSummary|%{count} approvals required from %{membersCoun msgstr[0] "" msgstr[1] "" -msgid "ApprovalRule|All members with Developer role or higher and code owners (if any)" -msgstr "" - msgid "ApprovalRule|Approvers" msgstr "" @@ -4307,6 +4310,9 @@ msgstr "" msgid "Code Owners" msgstr "" +msgid "Code Owners to the merge request changes." +msgstr "" + msgid "Code owner approval is required" msgstr "" @@ -4737,9 +4743,6 @@ msgstr "" msgid "Control the maximum concurrency of repository backfill for this secondary node" msgstr "" -msgid "ConvDev Index" -msgstr "" - msgid "Cookie domain" msgstr "" @@ -4860,6 +4863,9 @@ msgstr "" msgid "Could not remove the trigger." msgstr "" +msgid "Could not restore the group" +msgstr "" + msgid "Could not revoke impersonation token %{token_name}." msgstr "" @@ -5910,6 +5916,9 @@ msgstr "" msgid "Detect host keys" msgstr "" +msgid "DevOps Score" +msgstr "" + msgid "Diff content limits" msgstr "" @@ -6012,10 +6021,10 @@ msgstr "" msgid "Dismiss" msgstr "" -msgid "Dismiss ConvDev introduction" +msgid "Dismiss Cycle Analytics introduction box" msgstr "" -msgid "Dismiss Cycle Analytics introduction box" +msgid "Dismiss DevOps Score introduction" msgstr "" msgid "Dismiss Merge Request promotion" @@ -8675,6 +8684,12 @@ msgstr "" msgid "Group details" msgstr "" +msgid "Group has been already marked for deletion" +msgstr "" + +msgid "Group has not been marked for deletion" +msgstr "" + msgid "Group info:" msgstr "" @@ -9579,7 +9594,7 @@ msgstr "" msgid "Introducing Cycle Analytics" msgstr "" -msgid "Introducing Your Conversational Development Index" +msgid "Introducing Your DevOps Score" msgstr "" msgid "Invalid Git ref" @@ -19351,6 +19366,9 @@ msgstr "" msgid "Users" msgstr "" +msgid "Users or groups set as approvers in the project's or merge request's settings." +msgstr "" + msgid "Users outside of license" msgstr "" @@ -19748,6 +19766,9 @@ msgstr "" msgid "Whitelist to allow requests to the local network from hooks and services" msgstr "" +msgid "Who can be an approver?" +msgstr "" + msgid "Who can see this group?" msgstr "" @@ -19973,6 +19994,9 @@ msgstr "" msgid "You are not allowed to unlink your primary login account" msgstr "" +msgid "You are not authorized to perform this action" +msgstr "" + msgid "You are now impersonating %{username}" msgstr "" @@ -20300,10 +20324,10 @@ msgstr "" msgid "Your Commit Email will be used for web based operations, such as edits and merges." msgstr "" -msgid "Your Conversational Development Index gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers." +msgid "Your Default Notification Email will be used for account notifications if a %{openingTag}group-specific email address%{closingTag} is not set." msgstr "" -msgid "Your Default Notification Email will be used for account notifications if a %{openingTag}group-specific email address%{closingTag} is not set." +msgid "Your DevOps Score gives an overview of how you are using GitLab from a feature perspective. View how you compare with other organizations, discover features you are not using, and learn best practices through blog posts and white papers." msgstr "" msgid "Your GPG keys (%{count})" diff --git a/spec/features/instance_statistics/dev_ops_score_spec.rb b/spec/features/instance_statistics/dev_ops_score_spec.rb index c9e6ab67267..453b5582f48 100644 --- a/spec/features/instance_statistics/dev_ops_score_spec.rb +++ b/spec/features/instance_statistics/dev_ops_score_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Dev Ops Score' do +describe 'DevOps Score' do before do sign_in(create(:admin)) end @@ -10,11 +10,11 @@ describe 'Dev Ops Score' do it 'has dismissable intro callout', :js do visit instance_statistics_dev_ops_score_index_path - expect(page).to have_content 'Introducing Your Conversational Development Index' + expect(page).to have_content 'Introducing Your DevOps Score' find('.js-close-callout').click - expect(page).not_to have_content 'Introducing Your Conversational Development Index' + expect(page).not_to have_content 'Introducing Your DevOps Score' end context 'when usage ping is disabled' do @@ -31,7 +31,7 @@ describe 'Dev Ops Score' do it 'hides the intro callout' do visit instance_statistics_dev_ops_score_index_path - expect(page).not_to have_content 'Introducing Your Conversational Development Index' + expect(page).not_to have_content 'Introducing Your DevOps Score' end end diff --git a/spec/javascripts/boards/mock_data.js b/spec/javascripts/boards/mock_data.js index bd295ba61ac..91e0c1673c9 100644 --- a/spec/javascripts/boards/mock_data.js +++ b/spec/javascripts/boards/mock_data.js @@ -1,4 +1,3 @@ -import BoardService from '~/boards/services/board_service'; import boardsStore from '~/boards/stores/boards_store'; export const setMockEndpoints = (opts = {}) => { @@ -87,22 +86,6 @@ export const boardsMockInterceptor = config => { return [200, body]; }; -export const mockBoardService = (opts = {}) => { - const boardsEndpoint = opts.boardsEndpoint || '/test/issue-boards/-/boards.json'; - const listsEndpoint = opts.listsEndpoint || '/test/-/boards/1/lists'; - const bulkUpdatePath = opts.bulkUpdatePath || ''; - const boardId = opts.boardId || '1'; - - boardsStore.setEndpoints({ - boardsEndpoint, - listsEndpoint, - bulkUpdatePath, - boardId, - }); - - return new BoardService(); -}; - export const mockAssigneesList = [ { id: 2, diff --git a/spec/services/submit_usage_ping_service_spec.rb b/spec/services/submit_usage_ping_service_spec.rb index 8b68da6674a..719b374553c 100644 --- a/spec/services/submit_usage_ping_service_spec.rb +++ b/spec/services/submit_usage_ping_service_spec.rb @@ -42,7 +42,7 @@ describe SubmitUsagePingService do subject.execute end - it 'saves conversational development index data from the response' do + it 'saves DevOps Score data from the response' do stub_response(with_conv_index_params) expect { subject.execute } |