diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 12:13:26 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 12:13:26 +0000 |
commit | 3ce7340b2ae954b6b449bfba5720fa356b803c51 (patch) | |
tree | ab1cc089c519d0f94993142071556aa6027f0589 | |
parent | c2afac6a378d1aaaa7448892d042cdb59ee2c290 (diff) | |
download | gitlab-ce-3ce7340b2ae954b6b449bfba5720fa356b803c51.tar.gz |
Add latest changes from gitlab-org/gitlab@master
115 files changed, 790 insertions, 207 deletions
diff --git a/app/assets/javascripts/cycle_analytics/constants.js b/app/assets/javascripts/cycle_analytics/constants.js index c205aa1e831..d1e837b1af4 100644 --- a/app/assets/javascripts/cycle_analytics/constants.js +++ b/app/assets/javascripts/cycle_analytics/constants.js @@ -47,6 +47,11 @@ export const METRICS_POPOVER_CONTENT = { "ValueStreamAnalytics|Median time from the earliest commit of a linked issue's merge request to when that issue is closed.", ), }, + 'lead-time-for-changes': { + description: s__( + 'ValueStreamAnalytics|Median time between merge request merge and deployment to a production environment for all MRs deployed in the given time period.', + ), + }, 'new-issue': { description: s__('ValueStreamAnalytics|Number of new issues created.') }, 'new-issues': { description: s__('ValueStreamAnalytics|Number of new issues created.') }, deploys: { description: s__('ValueStreamAnalytics|Total number of deploys to production.') }, diff --git a/app/assets/javascripts/diffs/components/diff_comment_cell.vue b/app/assets/javascripts/diffs/components/diff_comment_cell.vue index 4af4b46f94c..a4fae652d02 100644 --- a/app/assets/javascripts/diffs/components/diff_comment_cell.vue +++ b/app/assets/javascripts/diffs/components/diff_comment_cell.vue @@ -29,6 +29,11 @@ export default { required: false, default: false, }, + lineRange: { + type: Object, + required: false, + default: null, + }, linePosition: { type: String, required: false, @@ -59,6 +64,7 @@ export default { <diff-line-note-form :diff-file-hash="diffFileHash" :line="line" + :range="lineRange" :note-target-line="line" :help-page-path="helpPagePath" :line-position="linePosition" diff --git a/app/assets/javascripts/diffs/components/diff_line_note_form.vue b/app/assets/javascripts/diffs/components/diff_line_note_form.vue index c445989f143..10a3e5456e0 100644 --- a/app/assets/javascripts/diffs/components/diff_line_note_form.vue +++ b/app/assets/javascripts/diffs/components/diff_line_note_form.vue @@ -32,6 +32,11 @@ export default { type: Object, required: true, }, + range: { + type: Object, + required: false, + default: null, + }, linePosition: { type: String, required: false, @@ -49,6 +54,7 @@ export default { }, data() { return { + lines: null, commentLineStart: { line_code: this.line.line_code, type: this.line.type, @@ -116,10 +122,8 @@ export default { return commentLineOptions(lines, this.line, this.line.line_code, side); }, commentLines() { - if (!this.selectedCommentPosition) return []; - const lines = []; - const { start, end } = this.selectedCommentPosition; + const { start, end } = this.lines; const diffLines = this.diffFile[INLINE_DIFF_LINES_KEY]; let isAdding = false; @@ -144,6 +148,9 @@ export default { return lines; }, }, + created() { + this.lines = { ...this.range }; + }, mounted() { if (this.isLoggedIn) { const keys = [ @@ -189,6 +196,9 @@ export default { this.handleCancelCommentForm(), ); }, + updateStartLine(line) { + this.lines.start = line; + }, }, }; </script> @@ -199,7 +209,9 @@ export default { <multiline-comment-form v-model="commentLineStart" :line="line" + :line-range="lines" :comment-line-options="commentLineOptions" + @input="updateStartLine" /> </div> <note-form diff --git a/app/assets/javascripts/diffs/components/diff_view.vue b/app/assets/javascripts/diffs/components/diff_view.vue index 64ded1ca8ca..55c796182ee 100644 --- a/app/assets/javascripts/diffs/components/diff_view.vue +++ b/app/assets/javascripts/diffs/components/diff_view.vue @@ -6,6 +6,7 @@ import draftCommentsMixin from '~/diffs/mixins/draft_comments'; import { getCommentedLines } from '~/notes/components/multiline_comment_utils'; import { hide } from '~/tooltips'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; +import { pickDirection } from '../utils/diff_line'; import DiffCommentCell from './diff_comment_cell.vue'; import DiffExpansionCell from './diff_expansion_cell.vue'; import DiffRow from './diff_row.vue'; @@ -106,6 +107,16 @@ export default { }); this.idState.dragStart = null; }, + singleLineComment(code, line) { + const lineDir = pickDirection({ line, code }); + + this.idState.updatedLineRange = { + start: lineDir, + end: lineDir, + }; + + this.showCommentForm({ lineCode: lineDir.line_code, fileHash: this.diffFile.file_hash }); + }, isHighlighted(line) { return isHighlighted( this.highlightedRow, @@ -169,7 +180,7 @@ export default { :index="index" :is-highlighted="isHighlighted(line)" :file-line-coverage="fileLineCoverage" - @showCommentForm="(lineCode) => showCommentForm({ lineCode, fileHash: diffFile.file_hash })" + @showCommentForm="(code) => singleLineComment(code, line)" @setHighlightedRow="setHighlightedRow" @toggleLineDiscussions=" ({ lineCode, expanded }) => @@ -193,6 +204,7 @@ export default { <diff-comment-cell v-if="line.left && (line.left.renderDiscussion || line.left.hasCommentForm)" :line="line.left" + :line-range="idState.updatedLineRange" :diff-file-hash="diffFile.file_hash" :help-page-path="helpPagePath" line-position="left" @@ -206,6 +218,7 @@ export default { <diff-comment-cell v-if="line.right && (line.right.renderDiscussion || line.right.hasCommentForm)" :line="line.right" + :line-range="idState.updatedLineRange" :diff-file-hash="diffFile.file_hash" :line-index="index" :help-page-path="helpPagePath" diff --git a/app/assets/javascripts/diffs/utils/diff_line.js b/app/assets/javascripts/diffs/utils/diff_line.js new file mode 100644 index 00000000000..a248cc6318b --- /dev/null +++ b/app/assets/javascripts/diffs/utils/diff_line.js @@ -0,0 +1,10 @@ +export function pickDirection({ line, code } = {}) { + const { left, right } = line; + let direction = left || right; + + if (right?.line_code === code) { + direction = right; + } + + return direction; +} diff --git a/app/assets/javascripts/ide/components/shared/commit_message_field.vue b/app/assets/javascripts/ide/components/shared/commit_message_field.vue new file mode 100644 index 00000000000..7fca7429ad7 --- /dev/null +++ b/app/assets/javascripts/ide/components/shared/commit_message_field.vue @@ -0,0 +1,137 @@ +<script> +import { GlIcon, GlPopover } from '@gitlab/ui'; +import { __, sprintf } from '~/locale'; +import { MAX_TITLE_LENGTH, MAX_BODY_LENGTH } from '../../constants'; + +export default { + components: { + GlIcon, + GlPopover, + }, + props: { + text: { + type: String, + required: true, + }, + placeholder: { + type: String, + required: true, + }, + }, + data() { + return { + scrollTop: 0, + isFocused: false, + }; + }, + computed: { + allLines() { + return this.text.split('\n').map((line, i) => ({ + text: line.substr(0, this.getLineLength(i)) || ' ', + highlightedText: line.substr(this.getLineLength(i)), + })); + }, + }, + methods: { + handleScroll() { + if (this.$refs.textarea) { + this.$nextTick(() => { + this.scrollTop = this.$refs.textarea.scrollTop; + }); + } + }, + getLineLength(i) { + return i === 0 ? MAX_TITLE_LENGTH : MAX_BODY_LENGTH; + }, + onInput(e) { + this.$emit('input', e.target.value); + }, + onCtrlEnter() { + if (!this.isFocused) return; + this.$emit('submit'); + }, + updateIsFocused(isFocused) { + this.isFocused = isFocused; + }, + }, + popoverOptions: { + triggers: 'hover', + placement: 'top', + content: sprintf( + __(` + The character highlighter helps you keep the subject line to %{titleLength} characters + and wrap the body at %{bodyLength} so they are readable in git. + `), + { titleLength: MAX_TITLE_LENGTH, bodyLength: MAX_BODY_LENGTH }, + ), + }, +}; +</script> + +<template> + <fieldset + class="gl-rounded-base gl-inset-border-1-gray-400 gl-py-4 gl-px-5" + :class="{ + 'gl-outline-none! gl-focus-ring-border-1-gray-900!': isFocused, + }" + > + <div + v-once + class="gl-display-flex gl-align-items-center gl-border-b-solid gl-border-b-1 gl-border-b-gray-100 gl-pb-3 gl-mb-3" + > + <div>{{ __('Commit Message') }}</div> + <div id="commit-message-popover-container"> + <span id="commit-message-question" class="gl-gray-700 gl-ml-3"> + <gl-icon name="question" /> + </span> + <gl-popover + target="commit-message-question" + container="commit-message-popover-container" + v-bind="$options.popoverOptions" + /> + </div> + </div> + <div class="gl-relative gl-w-full gl-h-13 gl-overflow-hidden"> + <div class="gl-absolute gl-z-index-1 gl-font-monospace gl-text-transparent"> + <div + data-testid="highlights" + :style="{ + transform: `translate3d(0, ${-scrollTop}px, 0)`, + }" + > + <div v-for="(line, index) in allLines" :key="index"> + <span + data-testid="highlights-text" + class="gl-white-space-pre-wrap gl-word-break-word" + v-text="line.text" + > + </span + ><mark + v-show="line.highlightedText" + data-testid="highlights-mark" + class="gl-px-1 gl-py-0 gl-bg-orange-100 gl-text-transparent gl-white-space-pre-wrap gl-word-break-word" + v-text="line.highlightedText" + > + </mark> + </div> + </div> + </div> + <textarea + ref="textarea" + :placeholder="placeholder" + :value="text" + class="gl-absolute gl-w-full gl-h-full gl-z-index-2 gl-font-monospace p-0 gl-outline-0 gl-bg-transparent gl-border-0" + data-qa-selector="ide_commit_message_field" + dir="auto" + name="commit-message" + @scroll="handleScroll" + @input="onInput" + @focus="updateIsFocused(true)" + @blur="updateIsFocused(false)" + @keydown.ctrl.enter="onCtrlEnter" + @keydown.meta.enter="onCtrlEnter" + > + </textarea> + </div> + </fieldset> +</template> diff --git a/app/assets/javascripts/issues_list/service_desk_helper.js b/app/assets/javascripts/issues_list/service_desk_helper.js index f96567ef53b..5cccf2e6bce 100644 --- a/app/assets/javascripts/issues_list/service_desk_helper.js +++ b/app/assets/javascripts/issues_list/service_desk_helper.js @@ -20,7 +20,7 @@ export function generateMessages(emptyStateMeta) { ); const serviceDeskSupportedMessage = s__( - 'ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation.', + 'ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation.', ); const commonDescription = ` diff --git a/app/assets/javascripts/notes/components/multiline_comment_form.vue b/app/assets/javascripts/notes/components/multiline_comment_form.vue index 6ad565567be..1633b79c3be 100644 --- a/app/assets/javascripts/notes/components/multiline_comment_form.vue +++ b/app/assets/javascripts/notes/components/multiline_comment_form.vue @@ -1,6 +1,6 @@ <script> import { GlFormSelect, GlSprintf } from '@gitlab/ui'; -import { mapActions, mapState } from 'vuex'; +import { mapActions } from 'vuex'; import { getSymbol, getLineClasses } from './multiline_comment_utils'; export default { @@ -27,13 +27,12 @@ export default { }; }, computed: { - ...mapState({ selectedCommentPosition: ({ notes }) => notes.selectedCommentPosition }), lineNumber() { return this.commentLineOptions[this.commentLineOptions.length - 1].text; }, }, created() { - const line = this.selectedCommentPosition?.start || this.lineRange?.start || this.line; + const line = this.lineRange?.start || this.line; this.commentLineStart = { line_code: line.line_code, @@ -42,7 +41,6 @@ export default { new_line: line.new_line, }; - if (this.selectedCommentPosition) return; this.highlightSelection(); }, destroyed() { diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue index b05643e5e13..5129fd1317d 100644 --- a/app/assets/javascripts/notes/components/note_form.vue +++ b/app/assets/javascripts/notes/components/note_form.vue @@ -334,13 +334,13 @@ export default { :markdown-docs-path="markdownDocsPath" :quick-actions-docs-path="quickActionsDocsPath" :line="line" + :lines="lines" :note="discussionNote" :can-suggest="canSuggest" :add-spacing-classes="false" :help-page-path="helpPagePath" :show-suggest-popover="showSuggestPopover" :textarea-value="updatedNoteBody" - :lines="lines" @handleSuggestDismissed="() => $emit('handleSuggestDismissed')" > <template #textarea> diff --git a/app/assets/stylesheets/startup/_cloaking.scss b/app/assets/stylesheets/startup/_cloaking.scss index 3c25feb0c5c..f60d72a51fb 100644 --- a/app/assets/stylesheets/startup/_cloaking.scss +++ b/app/assets/stylesheets/startup/_cloaking.scss @@ -2,6 +2,8 @@ Prevent flashing of content when using startup.css */ @mixin cloak-startup-scss($display) { + // General selector for cloaking until ready + .cloak-startup, // Breadcrumbs and alerts on the top of the page .content-wrapper > .alert-wrapper, // Content on pages diff --git a/app/assets/stylesheets/utilities.scss b/app/assets/stylesheets/utilities.scss index ec70926b418..fbcc97d6750 100644 --- a/app/assets/stylesheets/utilities.scss +++ b/app/assets/stylesheets/utilities.scss @@ -281,3 +281,12 @@ $gl-line-height-42: px-to-rem(42px); display: none; } } + +// Will both be moved to @gitlab/ui by https://gitlab.com/gitlab-org/gitlab-ui/-/issues/1465 +.gl-text-transparent { + color: transparent; +} + +.gl-focus-ring-border-1-gray-900\! { + @include gl-focus($gl-border-size-1, $gray-900, true); +} diff --git a/app/models/application_setting_implementation.rb b/app/models/application_setting_implementation.rb index 7bdea36bb8a..028279b6150 100644 --- a/app/models/application_setting_implementation.rb +++ b/app/models/application_setting_implementation.rb @@ -146,6 +146,9 @@ module ApplicationSettingImplementation session_expire_delay: Settings.gitlab['session_expire_delay'], shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'], shared_runners_text: nil, + sidekiq_job_limiter_mode: Gitlab::SidekiqMiddleware::SizeLimiter::Validator::COMPRESS_MODE, + sidekiq_job_limiter_compression_threshold_bytes: Gitlab::SidekiqMiddleware::SizeLimiter::Validator::DEFAULT_COMPRESSION_THRESHOLD_BYTES, + sidekiq_job_limiter_limit_bytes: Gitlab::SidekiqMiddleware::SizeLimiter::Validator::DEFAULT_SIZE_LIMIT, sign_in_text: nil, signup_enabled: Settings.gitlab['signup_enabled'], snippet_size_limit: 50.megabytes, diff --git a/app/views/layouts/nav/_top_nav_responsive.html.haml b/app/views/layouts/nav/_top_nav_responsive.html.haml index 86fd8b6d80c..22a260b5c0c 100644 --- a/app/views/layouts/nav/_top_nav_responsive.html.haml +++ b/app/views/layouts/nav/_top_nav_responsive.html.haml @@ -2,4 +2,5 @@ - view_model = top_nav_responsive_view_model(project: @project, group: @group) .top-nav-responsive{ class: top_class } - #js-top-nav-responsive{ data: { view_model: view_model.to_json } } + .cloak-startup + #js-top-nav-responsive{ data: { view_model: view_model.to_json } } diff --git a/app/views/projects/issues/_service_desk_empty_state.html.haml b/app/views/projects/issues/_service_desk_empty_state.html.haml index a4251c8e5dc..afeb2a23ea2 100644 --- a/app/views/projects/issues/_service_desk_empty_state.html.haml +++ b/app/views/projects/issues/_service_desk_empty_state.html.haml @@ -16,7 +16,7 @@ = s_("ServiceDesk|Your users can send emails to this address:") %code= @project.service_desk_address - %span= s_("ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation.") + %span= s_("ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation.") = link_to _('Learn more.'), help_page_path('user/project/service_desk') - if can_edit_project_settings && !service_desk_enabled diff --git a/config/metrics/counts_28d/20210216184312_i_code_review_user_toggled_task_item_status_monthly.yml b/config/metrics/counts_28d/20210216184312_i_code_review_user_toggled_task_item_status_monthly.yml index 72617203f6a..495c7740e3f 100644 --- a/config/metrics/counts_28d/20210216184312_i_code_review_user_toggled_task_item_status_monthly.yml +++ b/config/metrics/counts_28d/20210216184312_i_code_review_user_toggled_task_item_status_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who toggled a task item in a merge product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184322_i_code_review_user_approve_mr_monthly.yml b/config/metrics/counts_28d/20210216184322_i_code_review_user_approve_mr_monthly.yml index f3c4a921afa..87d78d83450 100644 --- a/config/metrics/counts_28d/20210216184322_i_code_review_user_approve_mr_monthly.yml +++ b/config/metrics/counts_28d/20210216184322_i_code_review_user_approve_mr_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who approve a merge request product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184326_i_code_review_user_unapprove_mr_monthly.yml b/config/metrics/counts_28d/20210216184326_i_code_review_user_unapprove_mr_monthly.yml index ab4d4c1bfc7..94ac6d7b6b7 100644 --- a/config/metrics/counts_28d/20210216184326_i_code_review_user_unapprove_mr_monthly.yml +++ b/config/metrics/counts_28d/20210216184326_i_code_review_user_unapprove_mr_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who unapprove a merge request product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184330_i_code_review_user_resolve_thread_monthly.yml b/config/metrics/counts_28d/20210216184330_i_code_review_user_resolve_thread_monthly.yml index 9f2ab332a08..5cd9131d663 100644 --- a/config/metrics/counts_28d/20210216184330_i_code_review_user_resolve_thread_monthly.yml +++ b/config/metrics/counts_28d/20210216184330_i_code_review_user_resolve_thread_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who resolve a thread in a merge req product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184334_i_code_review_user_unresolve_thread_monthly.yml b/config/metrics/counts_28d/20210216184334_i_code_review_user_unresolve_thread_monthly.yml index 83644eff397..01ab33527cc 100644 --- a/config/metrics/counts_28d/20210216184334_i_code_review_user_unresolve_thread_monthly.yml +++ b/config/metrics/counts_28d/20210216184334_i_code_review_user_unresolve_thread_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who unresolve a thread in a merge r product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184338_i_code_review_edit_mr_title_monthly.yml b/config/metrics/counts_28d/20210216184338_i_code_review_edit_mr_title_monthly.yml index df7acea15f8..e09ac66953f 100644 --- a/config/metrics/counts_28d/20210216184338_i_code_review_edit_mr_title_monthly.yml +++ b/config/metrics/counts_28d/20210216184338_i_code_review_edit_mr_title_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who edit the title of a merge reque product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184342_i_code_review_edit_mr_desc_monthly.yml b/config/metrics/counts_28d/20210216184342_i_code_review_edit_mr_desc_monthly.yml index 02980ed84f8..99bddd4591b 100644 --- a/config/metrics/counts_28d/20210216184342_i_code_review_edit_mr_desc_monthly.yml +++ b/config/metrics/counts_28d/20210216184342_i_code_review_edit_mr_desc_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who edit the description of a merge product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184353_i_code_review_user_create_review_note_monthly.yml b/config/metrics/counts_28d/20210216184353_i_code_review_user_create_review_note_monthly.yml index cb0ba9c4785..9626907c904 100644 --- a/config/metrics/counts_28d/20210216184353_i_code_review_user_create_review_note_monthly.yml +++ b/config/metrics/counts_28d/20210216184353_i_code_review_user_create_review_note_monthly.yml @@ -6,6 +6,7 @@ description: Count of unique users per month who create a note as part of a merg product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184357_i_code_review_user_publish_review_monthly.yml b/config/metrics/counts_28d/20210216184357_i_code_review_user_publish_review_monthly.yml index 78228a1da48..1153c89126e 100644 --- a/config/metrics/counts_28d/20210216184357_i_code_review_user_publish_review_monthly.yml +++ b/config/metrics/counts_28d/20210216184357_i_code_review_user_publish_review_monthly.yml @@ -6,6 +6,7 @@ description: Count of unique users per month who publish their review as part of product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184401_i_code_review_user_create_multiline_mr_comment_monthly.yml b/config/metrics/counts_28d/20210216184401_i_code_review_user_create_multiline_mr_comment_monthly.yml index 4a4853a7520..805914598d6 100644 --- a/config/metrics/counts_28d/20210216184401_i_code_review_user_create_multiline_mr_comment_monthly.yml +++ b/config/metrics/counts_28d/20210216184401_i_code_review_user_create_multiline_mr_comment_monthly.yml @@ -6,6 +6,7 @@ description: Count of unique users per month who create a multiline comment in a product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184405_i_code_review_user_edit_multiline_mr_comment_monthly.yml b/config/metrics/counts_28d/20210216184405_i_code_review_user_edit_multiline_mr_comment_monthly.yml index 36b2de72379..84fa938126f 100644 --- a/config/metrics/counts_28d/20210216184405_i_code_review_user_edit_multiline_mr_comment_monthly.yml +++ b/config/metrics/counts_28d/20210216184405_i_code_review_user_edit_multiline_mr_comment_monthly.yml @@ -6,6 +6,7 @@ description: Count of unique users per week who edit a multiline comment in a me product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184409_i_code_review_user_remove_multiline_mr_comment_monthly.yml b/config/metrics/counts_28d/20210216184409_i_code_review_user_remove_multiline_mr_comment_monthly.yml index 7cc2b9b2cc2..db2155a71fe 100644 --- a/config/metrics/counts_28d/20210216184409_i_code_review_user_remove_multiline_mr_comment_monthly.yml +++ b/config/metrics/counts_28d/20210216184409_i_code_review_user_remove_multiline_mr_comment_monthly.yml @@ -6,6 +6,7 @@ description: Count of unique users per month who remove a multiline comment in a product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184418_i_code_review_user_assigned_monthly.yml b/config/metrics/counts_28d/20210216184418_i_code_review_user_assigned_monthly.yml index 7e8db2be0b7..da36f141a43 100644 --- a/config/metrics/counts_28d/20210216184418_i_code_review_user_assigned_monthly.yml +++ b/config/metrics/counts_28d/20210216184418_i_code_review_user_assigned_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who are assigned to a merge request product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184422_i_code_review_user_marked_as_draft_monthly.yml b/config/metrics/counts_28d/20210216184422_i_code_review_user_marked_as_draft_monthly.yml index f755351eb1e..4afb00c81dd 100644 --- a/config/metrics/counts_28d/20210216184422_i_code_review_user_marked_as_draft_monthly.yml +++ b/config/metrics/counts_28d/20210216184422_i_code_review_user_marked_as_draft_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who mark a merge request as a draft product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184426_i_code_review_user_unmarked_as_draft_monthly.yml b/config/metrics/counts_28d/20210216184426_i_code_review_user_unmarked_as_draft_monthly.yml index a5685f7634a..c104c010002 100644 --- a/config/metrics/counts_28d/20210216184426_i_code_review_user_unmarked_as_draft_monthly.yml +++ b/config/metrics/counts_28d/20210216184426_i_code_review_user_unmarked_as_draft_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who unmark a merge request as a dra product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184430_i_code_review_user_review_requested_monthly.yml b/config/metrics/counts_28d/20210216184430_i_code_review_user_review_requested_monthly.yml index 9e6f61a755b..d65c8380bc9 100644 --- a/config/metrics/counts_28d/20210216184430_i_code_review_user_review_requested_monthly.yml +++ b/config/metrics/counts_28d/20210216184430_i_code_review_user_review_requested_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who request a review of a merge req product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184434_i_code_review_user_approval_rule_added_monthly.yml b/config/metrics/counts_28d/20210216184434_i_code_review_user_approval_rule_added_monthly.yml index 35562e095c8..0da9ce57fea 100644 --- a/config/metrics/counts_28d/20210216184434_i_code_review_user_approval_rule_added_monthly.yml +++ b/config/metrics/counts_28d/20210216184434_i_code_review_user_approval_rule_added_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who add an approval rule to a merge product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184438_i_code_review_user_approval_rule_deleted_monthly.yml b/config/metrics/counts_28d/20210216184438_i_code_review_user_approval_rule_deleted_monthly.yml index 023f241596e..d2be31f7e89 100644 --- a/config/metrics/counts_28d/20210216184438_i_code_review_user_approval_rule_deleted_monthly.yml +++ b/config/metrics/counts_28d/20210216184438_i_code_review_user_approval_rule_deleted_monthly.yml @@ -6,6 +6,7 @@ description: Count of unique users per month who delete an approval rule to a me product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184442_i_code_review_user_approval_rule_edited_monthly.yml b/config/metrics/counts_28d/20210216184442_i_code_review_user_approval_rule_edited_monthly.yml index eae629b21f3..2c1fc6664ff 100644 --- a/config/metrics/counts_28d/20210216184442_i_code_review_user_approval_rule_edited_monthly.yml +++ b/config/metrics/counts_28d/20210216184442_i_code_review_user_approval_rule_edited_monthly.yml @@ -6,6 +6,7 @@ description: Count of unique users per month who delete an approval rule to a me product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184446_i_code_review_user_vs_code_api_request_monthly.yml b/config/metrics/counts_28d/20210216184446_i_code_review_user_vs_code_api_request_monthly.yml index f833466e32c..fec6640220f 100644 --- a/config/metrics/counts_28d/20210216184446_i_code_review_user_vs_code_api_request_monthly.yml +++ b/config/metrics/counts_28d/20210216184446_i_code_review_user_vs_code_api_request_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who use GitLab Workflow for VS Code product_stage: create product_group: group::code review product_category: editor_extension +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184450_i_code_review_user_create_mr_from_issue_monthly.yml b/config/metrics/counts_28d/20210216184450_i_code_review_user_create_mr_from_issue_monthly.yml index 25a1a2948db..27c161cf13c 100644 --- a/config/metrics/counts_28d/20210216184450_i_code_review_user_create_mr_from_issue_monthly.yml +++ b/config/metrics/counts_28d/20210216184450_i_code_review_user_create_mr_from_issue_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who create a merge request from an product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210216184454_code_review_total_unique_counts_monthly.yml b/config/metrics/counts_28d/20210216184454_code_review_total_unique_counts_monthly.yml index c4c390d16e6..f41722f99cc 100644 --- a/config/metrics/counts_28d/20210216184454_code_review_total_unique_counts_monthly.yml +++ b/config/metrics/counts_28d/20210216184454_code_review_total_unique_counts_monthly.yml @@ -5,6 +5,7 @@ description: Count of unique users per month who interact with a merge request product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 28d diff --git a/config/metrics/counts_28d/20210514013545_i_code_review_user_resolve_conflict_monthly.yml b/config/metrics/counts_28d/20210514013545_i_code_review_user_resolve_conflict_monthly.yml index 8ce25e2d976..29ec7855453 100644 --- a/config/metrics/counts_28d/20210514013545_i_code_review_user_resolve_conflict_monthly.yml +++ b/config/metrics/counts_28d/20210514013545_i_code_review_user_resolve_conflict_monthly.yml @@ -7,6 +7,7 @@ product_section: product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active milestone: "13.12" diff --git a/config/metrics/counts_28d/20210514013549_i_code_review_user_load_conflict_ui_monthly.yml b/config/metrics/counts_28d/20210514013549_i_code_review_user_load_conflict_ui_monthly.yml index b287346496b..dceee0cc3ff 100644 --- a/config/metrics/counts_28d/20210514013549_i_code_review_user_load_conflict_ui_monthly.yml +++ b/config/metrics/counts_28d/20210514013549_i_code_review_user_load_conflict_ui_monthly.yml @@ -7,6 +7,7 @@ product_section: product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active milestone: "13.12" diff --git a/config/metrics/counts_7d/20210201124931_g_project_management_issue_title_changed_weekly.yml b/config/metrics/counts_7d/20210201124931_g_project_management_issue_title_changed_weekly.yml index 2a1a174f5a5..36097c13951 100644 --- a/config/metrics/counts_7d/20210201124931_g_project_management_issue_title_changed_weekly.yml +++ b/config/metrics/counts_7d/20210201124931_g_project_management_issue_title_changed_weekly.yml @@ -5,6 +5,7 @@ description: Count of WAU editing an issue title product_stage: plan product_group: group::project management product_category: issue_tracking +product_section: 'TBD' value_type: number status: active milestone: "13.6" diff --git a/config/metrics/counts_7d/20210216184310_i_code_review_user_toggled_task_item_status_weekly.yml b/config/metrics/counts_7d/20210216184310_i_code_review_user_toggled_task_item_status_weekly.yml index 892bafaadd6..78d489712bb 100644 --- a/config/metrics/counts_7d/20210216184310_i_code_review_user_toggled_task_item_status_weekly.yml +++ b/config/metrics/counts_7d/20210216184310_i_code_review_user_toggled_task_item_status_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who toggled a task item in a merge r product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184320_i_code_review_user_approve_mr_weekly.yml b/config/metrics/counts_7d/20210216184320_i_code_review_user_approve_mr_weekly.yml index 6f4de7ac49e..50a616d3156 100644 --- a/config/metrics/counts_7d/20210216184320_i_code_review_user_approve_mr_weekly.yml +++ b/config/metrics/counts_7d/20210216184320_i_code_review_user_approve_mr_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who approve a merge request product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184324_i_code_review_user_unapprove_mr_weekly.yml b/config/metrics/counts_7d/20210216184324_i_code_review_user_unapprove_mr_weekly.yml index 756bbea7657..341178587c9 100644 --- a/config/metrics/counts_7d/20210216184324_i_code_review_user_unapprove_mr_weekly.yml +++ b/config/metrics/counts_7d/20210216184324_i_code_review_user_unapprove_mr_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who unapprove a merge request product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184328_i_code_review_user_resolve_thread_weekly.yml b/config/metrics/counts_7d/20210216184328_i_code_review_user_resolve_thread_weekly.yml index 7cff71aa29c..bb80932f86b 100644 --- a/config/metrics/counts_7d/20210216184328_i_code_review_user_resolve_thread_weekly.yml +++ b/config/metrics/counts_7d/20210216184328_i_code_review_user_resolve_thread_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who resolve a thread in a merge requ product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184332_i_code_review_user_unresolve_thread_weekly.yml b/config/metrics/counts_7d/20210216184332_i_code_review_user_unresolve_thread_weekly.yml index 20171f95fd3..1d91fa77e0c 100644 --- a/config/metrics/counts_7d/20210216184332_i_code_review_user_unresolve_thread_weekly.yml +++ b/config/metrics/counts_7d/20210216184332_i_code_review_user_unresolve_thread_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who unresolve a thread in a merge re product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184336_i_code_review_edit_mr_title_weekly.yml b/config/metrics/counts_7d/20210216184336_i_code_review_edit_mr_title_weekly.yml index 5e56eaaa837..bb2ebfc942b 100644 --- a/config/metrics/counts_7d/20210216184336_i_code_review_edit_mr_title_weekly.yml +++ b/config/metrics/counts_7d/20210216184336_i_code_review_edit_mr_title_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who edit the title of a merge reques product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184340_i_code_review_edit_mr_desc_weekly.yml b/config/metrics/counts_7d/20210216184340_i_code_review_edit_mr_desc_weekly.yml index 3c7a7f7d82a..64de1c4ef82 100644 --- a/config/metrics/counts_7d/20210216184340_i_code_review_edit_mr_desc_weekly.yml +++ b/config/metrics/counts_7d/20210216184340_i_code_review_edit_mr_desc_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who edit the description of a merge product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184351_i_code_review_user_create_review_note_weekly.yml b/config/metrics/counts_7d/20210216184351_i_code_review_user_create_review_note_weekly.yml index 6b91ab4102f..731c07d4fad 100644 --- a/config/metrics/counts_7d/20210216184351_i_code_review_user_create_review_note_weekly.yml +++ b/config/metrics/counts_7d/20210216184351_i_code_review_user_create_review_note_weekly.yml @@ -6,6 +6,7 @@ description: Count of unique users per week who create a note as part of a merge product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184355_i_code_review_user_publish_review_weekly.yml b/config/metrics/counts_7d/20210216184355_i_code_review_user_publish_review_weekly.yml index 20c4c9cef5e..d036350ef9d 100644 --- a/config/metrics/counts_7d/20210216184355_i_code_review_user_publish_review_weekly.yml +++ b/config/metrics/counts_7d/20210216184355_i_code_review_user_publish_review_weekly.yml @@ -6,6 +6,7 @@ description: Count of unique users per week who publish their review as part of product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184359_i_code_review_user_create_multiline_mr_comment_weekly.yml b/config/metrics/counts_7d/20210216184359_i_code_review_user_create_multiline_mr_comment_weekly.yml index 26300d52dce..b90e46a5cd8 100644 --- a/config/metrics/counts_7d/20210216184359_i_code_review_user_create_multiline_mr_comment_weekly.yml +++ b/config/metrics/counts_7d/20210216184359_i_code_review_user_create_multiline_mr_comment_weekly.yml @@ -6,6 +6,7 @@ description: Count of unique users per week who create a multiline comment in a product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184403_i_code_review_user_edit_multiline_mr_comment_weekly.yml b/config/metrics/counts_7d/20210216184403_i_code_review_user_edit_multiline_mr_comment_weekly.yml index 2cbae1dff37..5efcda783ff 100644 --- a/config/metrics/counts_7d/20210216184403_i_code_review_user_edit_multiline_mr_comment_weekly.yml +++ b/config/metrics/counts_7d/20210216184403_i_code_review_user_edit_multiline_mr_comment_weekly.yml @@ -6,6 +6,7 @@ description: Count of unique users per week who edit a multiline comment in a me product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184407_i_code_review_user_remove_multiline_mr_comment_weekly.yml b/config/metrics/counts_7d/20210216184407_i_code_review_user_remove_multiline_mr_comment_weekly.yml index 1d80969f63a..71f051f10ee 100644 --- a/config/metrics/counts_7d/20210216184407_i_code_review_user_remove_multiline_mr_comment_weekly.yml +++ b/config/metrics/counts_7d/20210216184407_i_code_review_user_remove_multiline_mr_comment_weekly.yml @@ -6,6 +6,7 @@ description: Count of unique users per week who remove a multiline comment in a product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184416_i_code_review_user_assigned_weekly.yml b/config/metrics/counts_7d/20210216184416_i_code_review_user_assigned_weekly.yml index 741f8ff83fc..2bef437e3d0 100644 --- a/config/metrics/counts_7d/20210216184416_i_code_review_user_assigned_weekly.yml +++ b/config/metrics/counts_7d/20210216184416_i_code_review_user_assigned_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who are assigned to a merge request product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184420_i_code_review_user_marked_as_draft_weekly.yml b/config/metrics/counts_7d/20210216184420_i_code_review_user_marked_as_draft_weekly.yml index 960a9b18987..28bfd16ef6f 100644 --- a/config/metrics/counts_7d/20210216184420_i_code_review_user_marked_as_draft_weekly.yml +++ b/config/metrics/counts_7d/20210216184420_i_code_review_user_marked_as_draft_weekly.yml @@ -4,6 +4,7 @@ key_path: redis_hll_counters.code_review.i_code_review_user_marked_as_draft_week description: Count of unique users per week who mark a merge request as a draft product_stage: create product_group: group::code review +product_section: 'TBD' product_category: code_review value_type: number status: active diff --git a/config/metrics/counts_7d/20210216184424_i_code_review_user_unmarked_as_draft_weekly.yml b/config/metrics/counts_7d/20210216184424_i_code_review_user_unmarked_as_draft_weekly.yml index 76a7a4a97ab..4c2944cf0c1 100644 --- a/config/metrics/counts_7d/20210216184424_i_code_review_user_unmarked_as_draft_weekly.yml +++ b/config/metrics/counts_7d/20210216184424_i_code_review_user_unmarked_as_draft_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who unmark a merge request as a draf product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184428_i_code_review_user_review_requested_weekly.yml b/config/metrics/counts_7d/20210216184428_i_code_review_user_review_requested_weekly.yml index 70b88e97e20..57381e15a19 100644 --- a/config/metrics/counts_7d/20210216184428_i_code_review_user_review_requested_weekly.yml +++ b/config/metrics/counts_7d/20210216184428_i_code_review_user_review_requested_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who request a review of a merge requ product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184432_i_code_review_user_approval_rule_added_weekly.yml b/config/metrics/counts_7d/20210216184432_i_code_review_user_approval_rule_added_weekly.yml index 038f53b62a9..b38faa983c7 100644 --- a/config/metrics/counts_7d/20210216184432_i_code_review_user_approval_rule_added_weekly.yml +++ b/config/metrics/counts_7d/20210216184432_i_code_review_user_approval_rule_added_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who add an approval rule to a merge product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184436_i_code_review_user_approval_rule_deleted_weekly.yml b/config/metrics/counts_7d/20210216184436_i_code_review_user_approval_rule_deleted_weekly.yml index 8a7b2c31194..02fe4cc5993 100644 --- a/config/metrics/counts_7d/20210216184436_i_code_review_user_approval_rule_deleted_weekly.yml +++ b/config/metrics/counts_7d/20210216184436_i_code_review_user_approval_rule_deleted_weekly.yml @@ -6,6 +6,7 @@ description: Count of unique users per week who delete an approval rule to a mer product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184440_i_code_review_user_approval_rule_edited_weekly.yml b/config/metrics/counts_7d/20210216184440_i_code_review_user_approval_rule_edited_weekly.yml index b5831569160..58b569521bb 100644 --- a/config/metrics/counts_7d/20210216184440_i_code_review_user_approval_rule_edited_weekly.yml +++ b/config/metrics/counts_7d/20210216184440_i_code_review_user_approval_rule_edited_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who edit an approval rule to a merge product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184444_i_code_review_user_vs_code_api_request_weekly.yml b/config/metrics/counts_7d/20210216184444_i_code_review_user_vs_code_api_request_weekly.yml index cab4aa62b43..3e3668df67d 100644 --- a/config/metrics/counts_7d/20210216184444_i_code_review_user_vs_code_api_request_weekly.yml +++ b/config/metrics/counts_7d/20210216184444_i_code_review_user_vs_code_api_request_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who use GitLab Workflow for VS Code product_stage: create product_group: group::code review product_category: editor_extension +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184448_i_code_review_user_create_mr_from_issue_weekly.yml b/config/metrics/counts_7d/20210216184448_i_code_review_user_create_mr_from_issue_weekly.yml index 53a18b79605..7cf0936e79f 100644 --- a/config/metrics/counts_7d/20210216184448_i_code_review_user_create_mr_from_issue_weekly.yml +++ b/config/metrics/counts_7d/20210216184448_i_code_review_user_create_mr_from_issue_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who create a merge request from an i product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210216184452_code_review_total_unique_counts_weekly.yml b/config/metrics/counts_7d/20210216184452_code_review_total_unique_counts_weekly.yml index 24f82a6a442..eb62bf37a70 100644 --- a/config/metrics/counts_7d/20210216184452_code_review_total_unique_counts_weekly.yml +++ b/config/metrics/counts_7d/20210216184452_code_review_total_unique_counts_weekly.yml @@ -5,6 +5,7 @@ description: Count of unique users per week who interact with a merge request product_stage: create product_group: group::code review product_category: code_review +product_section: 'TBD' value_type: number status: active time_frame: 7d diff --git a/config/metrics/counts_7d/20210514013544_i_code_review_user_load_conflict_ui_weekly.yml b/config/metrics/counts_7d/20210514013544_i_code_review_user_load_conflict_ui_weekly.yml index 1402f3fd574..a8449bad161 100644 --- a/config/metrics/counts_7d/20210514013544_i_code_review_user_load_conflict_ui_weekly.yml +++ b/config/metrics/counts_7d/20210514013544_i_code_review_user_load_conflict_ui_weekly.yml @@ -3,7 +3,7 @@ data_category: optional key_path: redis_hll_counters.code_review.i_code_review_user_load_conflict_ui_weekly name: load_conflict_ui description: Count of unique users per week who load the conflict resolution page -product_section: +product_section: 'TBD' product_stage: create product_group: group::code review product_category: code_review diff --git a/config/metrics/counts_7d/20210514013545_i_code_review_user_resolve_conflict_weekly.yml b/config/metrics/counts_7d/20210514013545_i_code_review_user_resolve_conflict_weekly.yml index a60f6a23a76..f0b31b7e556 100644 --- a/config/metrics/counts_7d/20210514013545_i_code_review_user_resolve_conflict_weekly.yml +++ b/config/metrics/counts_7d/20210514013545_i_code_review_user_resolve_conflict_weekly.yml @@ -3,7 +3,7 @@ data_category: optional key_path: redis_hll_counters.code_review.i_code_review_user_resolve_conflict_weekly name: resolve_conflict description: Count of unique users per week who attempt to resolve a conflict through the ui -product_section: +product_section: 'TBD' product_stage: create product_group: group::code review product_category: code_review diff --git a/config/metrics/counts_all/20210510201537_in_product_marketing_email_create_0_sent.yml b/config/metrics/counts_all/20210510201537_in_product_marketing_email_create_0_sent.yml index 1f505694535..c201b4c79ee 100644 --- a/config/metrics/counts_all/20210510201537_in_product_marketing_email_create_0_sent.yml +++ b/config/metrics/counts_all/20210510201537_in_product_marketing_email_create_0_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_create_0_sent name: "count_sent_first_email_of_the_create_track_for_in_product_marketing_emails" description: Total sent emails of the create track's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510201919_in_product_marketing_email_create_0_cta_clicked.yml b/config/metrics/counts_all/20210510201919_in_product_marketing_email_create_0_cta_clicked.yml index fb2bd8f59e0..cb5f3185eb0 100644 --- a/config/metrics/counts_all/20210510201919_in_product_marketing_email_create_0_cta_clicked.yml +++ b/config/metrics/counts_all/20210510201919_in_product_marketing_email_create_0_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_create_0_cta_clicked name: "count_clicks_on_the_first_email_of_the_create_track_for_in_product_marketing_emails" description: Total clicks on the create track's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510202148_in_product_marketing_email_create_1_sent.yml b/config/metrics/counts_all/20210510202148_in_product_marketing_email_create_1_sent.yml index 13587d77e9a..2b849be1c32 100644 --- a/config/metrics/counts_all/20210510202148_in_product_marketing_email_create_1_sent.yml +++ b/config/metrics/counts_all/20210510202148_in_product_marketing_email_create_1_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_create_1_sent name: "count_sent_second_email_of_the_create_track_for_in_product_marketing_emails" description: Total sent emails of the create track's second email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510202356_in_product_marketing_email_create_1_cta_clicked.yml b/config/metrics/counts_all/20210510202356_in_product_marketing_email_create_1_cta_clicked.yml index e5635ba3d92..ab50a629468 100644 --- a/config/metrics/counts_all/20210510202356_in_product_marketing_email_create_1_cta_clicked.yml +++ b/config/metrics/counts_all/20210510202356_in_product_marketing_email_create_1_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_create_1_cta_clicked name: "count_clicks_on_the_second_email_of_the_create_track_for_in_product_marketing_emails" description: Total clicks on the create track's second email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510202604_in_product_marketing_email_create_2_sent.yml b/config/metrics/counts_all/20210510202604_in_product_marketing_email_create_2_sent.yml index 10fb21997d3..72a1d56cab2 100644 --- a/config/metrics/counts_all/20210510202604_in_product_marketing_email_create_2_sent.yml +++ b/config/metrics/counts_all/20210510202604_in_product_marketing_email_create_2_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_create_2_sent name: "count_sent_third_email_of_the_create_track_for_in_product_marketing_emails" description: Total sent emails of the create track's third email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510202724_in_product_marketing_email_create_2_cta_clicked.yml b/config/metrics/counts_all/20210510202724_in_product_marketing_email_create_2_cta_clicked.yml index 21841bfe7ba..17dcf4286ac 100644 --- a/config/metrics/counts_all/20210510202724_in_product_marketing_email_create_2_cta_clicked.yml +++ b/config/metrics/counts_all/20210510202724_in_product_marketing_email_create_2_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_create_2_cta_clicked name: "count_clicks_on_the_third_email_of_the_create_track_for_in_product_marketing_emails" description: Total clicks on the create track's third email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510202807_in_product_marketing_email_verify_0_sent.yml b/config/metrics/counts_all/20210510202807_in_product_marketing_email_verify_0_sent.yml index 66d894a62a9..c504783a652 100644 --- a/config/metrics/counts_all/20210510202807_in_product_marketing_email_verify_0_sent.yml +++ b/config/metrics/counts_all/20210510202807_in_product_marketing_email_verify_0_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_verify_0_sent name: "count_sent_first_email_of_the_verify_track_for_in_product_marketing_emails" description: Total sent emails of the verify track's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510202943_in_product_marketing_email_verify_0_cta_clicked.yml b/config/metrics/counts_all/20210510202943_in_product_marketing_email_verify_0_cta_clicked.yml index 39d02b343e5..cb316eb3164 100644 --- a/config/metrics/counts_all/20210510202943_in_product_marketing_email_verify_0_cta_clicked.yml +++ b/config/metrics/counts_all/20210510202943_in_product_marketing_email_verify_0_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_verify_0_cta_clicked name: "count_clicks_on_the_first_email_of_the_verify_track_for_in_product_marketing_emails" description: Total clicks on the verify track's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510202955_in_product_marketing_email_verify_1_sent.yml b/config/metrics/counts_all/20210510202955_in_product_marketing_email_verify_1_sent.yml index dcd61e22ab3..e4d1e90bb22 100644 --- a/config/metrics/counts_all/20210510202955_in_product_marketing_email_verify_1_sent.yml +++ b/config/metrics/counts_all/20210510202955_in_product_marketing_email_verify_1_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_verify_1_sent name: "count_sent_second_email_of_the_verify_track_for_in_product_marketing_emails" description: Total sent emails of the verify track's second email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203005_in_product_marketing_email_verify_1_cta_clicked.yml b/config/metrics/counts_all/20210510203005_in_product_marketing_email_verify_1_cta_clicked.yml index 359eb181926..2b08899e228 100644 --- a/config/metrics/counts_all/20210510203005_in_product_marketing_email_verify_1_cta_clicked.yml +++ b/config/metrics/counts_all/20210510203005_in_product_marketing_email_verify_1_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_verify_1_cta_clicked name: "count_clicks_on_the_second_email_of_the_verify_track_for_in_product_marketing_emails" description: Total clicks on the verify track's second email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203015_in_product_marketing_email_verify_2_sent.yml b/config/metrics/counts_all/20210510203015_in_product_marketing_email_verify_2_sent.yml index b0263ce11ed..33c77609b6f 100644 --- a/config/metrics/counts_all/20210510203015_in_product_marketing_email_verify_2_sent.yml +++ b/config/metrics/counts_all/20210510203015_in_product_marketing_email_verify_2_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_verify_2_sent name: "count_sent_third_email_of_the_verify_track_for_in_product_marketing_emails" description: Total sent emails of the verify track's third email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203025_in_product_marketing_email_verify_2_cta_clicked.yml b/config/metrics/counts_all/20210510203025_in_product_marketing_email_verify_2_cta_clicked.yml index ba0e6ad9753..0cd780b53ed 100644 --- a/config/metrics/counts_all/20210510203025_in_product_marketing_email_verify_2_cta_clicked.yml +++ b/config/metrics/counts_all/20210510203025_in_product_marketing_email_verify_2_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_verify_2_cta_clicked name: "count_clicks_on_the_third_email_of_the_verify_track_for_in_product_marketing_emails" description: Total clicks on the verify track's third email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203035_in_product_marketing_email_trial_0_sent.yml b/config/metrics/counts_all/20210510203035_in_product_marketing_email_trial_0_sent.yml index 843b1de808f..70c1e3d1250 100644 --- a/config/metrics/counts_all/20210510203035_in_product_marketing_email_trial_0_sent.yml +++ b/config/metrics/counts_all/20210510203035_in_product_marketing_email_trial_0_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_trial_0_sent name: "count_sent_first_email_of_the_trial_track_for_in_product_marketing_emails" description: Total sent emails of the trial track's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203044_in_product_marketing_email_trial_0_cta_clicked.yml b/config/metrics/counts_all/20210510203044_in_product_marketing_email_trial_0_cta_clicked.yml index 82832d991ee..258273438e3 100644 --- a/config/metrics/counts_all/20210510203044_in_product_marketing_email_trial_0_cta_clicked.yml +++ b/config/metrics/counts_all/20210510203044_in_product_marketing_email_trial_0_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_trial_0_cta_clicked name: "count_clicks_on_the_first_email_of_the_trial_track_for_in_product_marketing_emails" description: Total clicks on the verify trial's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203054_in_product_marketing_email_trial_1_sent.yml b/config/metrics/counts_all/20210510203054_in_product_marketing_email_trial_1_sent.yml index 2393643bacc..f32440ca1ae 100644 --- a/config/metrics/counts_all/20210510203054_in_product_marketing_email_trial_1_sent.yml +++ b/config/metrics/counts_all/20210510203054_in_product_marketing_email_trial_1_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_trial_1_sent name: "count_sent_second_email_of_the_trial_track_for_in_product_marketing_emails" description: Total sent emails of the trial track's second email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203104_in_product_marketing_email_trial_1_cta_clicked.yml b/config/metrics/counts_all/20210510203104_in_product_marketing_email_trial_1_cta_clicked.yml index cb72d9bb8f5..67543b98020 100644 --- a/config/metrics/counts_all/20210510203104_in_product_marketing_email_trial_1_cta_clicked.yml +++ b/config/metrics/counts_all/20210510203104_in_product_marketing_email_trial_1_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_trial_1_cta_clicked name: "count_clicks_on_the_second_email_of_the_trial_track_for_in_product_marketing_emails" description: Total clicks on the trial track's second email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203114_in_product_marketing_email_trial_2_sent.yml b/config/metrics/counts_all/20210510203114_in_product_marketing_email_trial_2_sent.yml index b1ae09410d1..185d5bb3aee 100644 --- a/config/metrics/counts_all/20210510203114_in_product_marketing_email_trial_2_sent.yml +++ b/config/metrics/counts_all/20210510203114_in_product_marketing_email_trial_2_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_trial_2_sent name: "count_sent_third_email_of_the_trial_track_for_in_product_marketing_emails" description: Total sent emails of the trial track's third email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203124_in_product_marketing_email_trial_2_cta_clicked.yml b/config/metrics/counts_all/20210510203124_in_product_marketing_email_trial_2_cta_clicked.yml index a5714e17223..f3a54e2ae31 100644 --- a/config/metrics/counts_all/20210510203124_in_product_marketing_email_trial_2_cta_clicked.yml +++ b/config/metrics/counts_all/20210510203124_in_product_marketing_email_trial_2_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_trial_2_cta_clicked name: "count_clicks_on_the_third_email_of_the_trial_track_for_in_product_marketing_emails" description: Total clicks on the trial track's third email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203134_in_product_marketing_email_team_0_sent.yml b/config/metrics/counts_all/20210510203134_in_product_marketing_email_team_0_sent.yml index beb6c6b9ecc..07b61f70b2e 100644 --- a/config/metrics/counts_all/20210510203134_in_product_marketing_email_team_0_sent.yml +++ b/config/metrics/counts_all/20210510203134_in_product_marketing_email_team_0_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_team_0_sent name: "count_sent_first_email_of_the_trial_team_for_in_product_marketing_emails" description: Total sent emails of the team track's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203143_in_product_marketing_email_team_0_cta_clicked.yml b/config/metrics/counts_all/20210510203143_in_product_marketing_email_team_0_cta_clicked.yml index 331639ca54f..27d47aff9c3 100644 --- a/config/metrics/counts_all/20210510203143_in_product_marketing_email_team_0_cta_clicked.yml +++ b/config/metrics/counts_all/20210510203143_in_product_marketing_email_team_0_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_team_0_cta_clicked name: "count_clicks_on_the_first_email_of_the_team_track_for_in_product_marketing_emails" description: Total clicks on the team track's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203153_in_product_marketing_email_team_1_sent.yml b/config/metrics/counts_all/20210510203153_in_product_marketing_email_team_1_sent.yml index afa2854b0f9..daba149d6c5 100644 --- a/config/metrics/counts_all/20210510203153_in_product_marketing_email_team_1_sent.yml +++ b/config/metrics/counts_all/20210510203153_in_product_marketing_email_team_1_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_team_1_sent name: "count_sent_second_email_of_the_team_track_for_in_product_marketing_emails" description: Total sent emails of the team track's second email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203203_in_product_marketing_email_team_1_cta_clicked.yml b/config/metrics/counts_all/20210510203203_in_product_marketing_email_team_1_cta_clicked.yml index 0bac5ef76b7..3d5150f6042 100644 --- a/config/metrics/counts_all/20210510203203_in_product_marketing_email_team_1_cta_clicked.yml +++ b/config/metrics/counts_all/20210510203203_in_product_marketing_email_team_1_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_team_1_cta_clicked name: "count_clicks_on_the_second_email_of_the_team_track_for_in_product_marketing_emails" description: Total clicks on the team track's second email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203213_in_product_marketing_email_team_2_sent.yml b/config/metrics/counts_all/20210510203213_in_product_marketing_email_team_2_sent.yml index fe0770d900b..aaaecb85e74 100644 --- a/config/metrics/counts_all/20210510203213_in_product_marketing_email_team_2_sent.yml +++ b/config/metrics/counts_all/20210510203213_in_product_marketing_email_team_2_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_team_2_sent name: "count_sent_third_email_of_the_team_track_for_in_product_marketing_emails" description: Total sent emails of the team track's third email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210510203223_in_product_marketing_email_team_2_cta_clicked.yml b/config/metrics/counts_all/20210510203223_in_product_marketing_email_team_2_cta_clicked.yml index 3fe16910ae5..0618ca56e89 100644 --- a/config/metrics/counts_all/20210510203223_in_product_marketing_email_team_2_cta_clicked.yml +++ b/config/metrics/counts_all/20210510203223_in_product_marketing_email_team_2_cta_clicked.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_team_2_cta_clicked name: "count_clicks_on_the_third_email_of_the_team_track_for_in_product_marketing_emails" description: Total clicks on the team track's third email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml b/config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml index 17c5b1a48c4..d4b2f57f3a4 100644 --- a/config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml +++ b/config/metrics/counts_all/20210518081225_in_product_marketing_email_experience_0_sent.yml @@ -3,7 +3,7 @@ data_category: optional key_path: counts.in_product_marketing_email_experience_0_sent name: "count_sent_first_email_of_the_experience_track_for_in_product_marketing_emails" description: Total sent emails of the experience track's first email -product_section: +product_section: 'TBD' product_stage: growth product_group: group::activation product_category: onboarding diff --git a/config/metrics/schema.json b/config/metrics/schema.json index ede7b9d3f6c..d416c7b6d6e 100644 --- a/config/metrics/schema.json +++ b/config/metrics/schema.json @@ -1,6 +1,6 @@ { "type": "object", - "required": ["key_path", "description", "value_type", "status", "product_group", "product_stage", "time_frame", "data_source", "distribution", "tier", "data_category", "milestone"], + "required": ["key_path", "description", "value_type", "status", "product_group", "product_section", "product_stage", "time_frame", "data_source", "distribution", "tier", "data_category", "milestone"], "properties": { "key_path": { "type": "string" @@ -13,10 +13,10 @@ "type": "string" }, "product_section": { - "type": ["string", "null"] + "type": ["string"] }, "product_stage": { - "type": ["string", "null"] + "type": ["string"] }, "product_group": { "type": "string" diff --git a/doc/architecture/blueprints/consolidating_groups_and_projects/index.md b/doc/architecture/blueprints/consolidating_groups_and_projects/index.md index a8d87e5f967..d75c2c8e703 100644 --- a/doc/architecture/blueprints/consolidating_groups_and_projects/index.md +++ b/doc/architecture/blueprints/consolidating_groups_and_projects/index.md @@ -6,7 +6,7 @@ comments: false description: Consolidating groups and projects --- -# Consolidating Group and Project +# Consolidating Groups and Projects There are numerous features that exist exclusively within groups or projects. The boundary between group and project features used to be clear. @@ -127,6 +127,22 @@ The work required to establish `Namespace` as a container for our features is tracked under [Consolidate Groups and Projects](https://gitlab.com/groups/gitlab-org/-/epics/6473) epic. +## Migrating features to Namespaces + +The initial iteration will provide a framework to house features under `Namespaces`. Stage groups will eventually need to migrate their own features and functionality over to `Namespaces`. This may impact these features in unexpected ways. Therefore, to minimize UX debt and maintain product consistency, stage groups will have to consider a number of factors when migrating their features over to `Namespaces`: + +1. **Conceptual model**: What are the current and future state conceptual models of these features ([see object modeling for designers](https://hpadkisson.medium.com/object-modeling-for-designers-an-introduction-7871bdcf8baf))? These should be documented in Pajamas (example: [Merge Requests](https://design.gitlab.com/objects/merge-request)). +1. **Merge conflicts**: What inconsistencies are there across project, group, and admin levels? How might these be addressed? For an example of how we rationalized this for labels, please see [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/338820). +1. **Inheritence & information flow**: How is information inherited across our container hierarchy currently? How might this be impacted if complying with the new [inheritence behavior](https://gitlab.com/gitlab-org/gitlab/-/issues/343316) framework? +1. **Settings**: Where can settings for this feature be found currently? How will these be impacted by `Namespaces`? +1. **Access**: Who can access this feature and is that impacted by the new container structure? Are there any role or privacy considerations? +1. **Tier**: Is there any tier functionality that is differentiated by projects and groups? +1. **Documentation**: Is the structure and content of documentation impacted by these changes at all? +1. **Solution proposal**: + - Think big: This analysis provides a great opportunity to zoom out and consider the feature UX as a whole. How could you make this feature lovable based on the new structure, inheritance, and capabilities afforded by `Namespaces`? Is there any UI which doesn't comply with Pajamas? + - Start small: What are the product changes that need to be made to assist with the migration? + - Move fast: Prioritise these solution ideas, document in issues, and create a roadmap for implementation. + ## Who Proposal: @@ -151,5 +167,6 @@ DRIs: | Product | Melissa Ushakov | | Leadership | Michelle Gill | | Engineering | Imre Farkas | +| Design | Nick Post | <!-- vale gitlab.Spelling = YES --> diff --git a/doc/ci/yaml/index.md b/doc/ci/yaml/index.md index 58efa56c46d..3c5a935ffbb 100644 --- a/doc/ci/yaml/index.md +++ b/doc/ci/yaml/index.md @@ -1085,6 +1085,61 @@ In this example: - `script` does not merge, but `script: ['rake rspec']` overwrites `script: ['echo "Hello world!"']`. You can use [YAML anchors](yaml_specific_features.md#anchors) to merge arrays. +##### Exclude a key from `extends` + +To exclude a key from the extended content, you must assign it to `null`, for example: + +```yaml +.base: + script: test + variables: + VAR1: base var 1 + +test1: + extends: .base + variables: + VAR1: test1 var 1 + VAR2: test2 var 2 + +test2: + extends: .base + variables: + VAR2: test2 var 2 + +test3: + extends: .base + variables: {} + +test4: + extends: .base + variables: null +``` + +Merged configuration: + +```yaml +test1: + script: test + variables: + VAR1: test1 var 1 + VAR2: test2 var 2 + +test2: + script: test + variables: + VAR1: base var 1 + VAR2: test2 var 2 + +test3: + script: test + variables: + VAR1: base var 1 + +test4: + script: test + variables: null +``` + #### Use `extends` and `include` together To reuse configuration from different configuration files, diff --git a/doc/development/database/multiple_databases.md b/doc/development/database/multiple_databases.md index 0ba752ba3a6..e21606bd3e7 100644 --- a/doc/development/database/multiple_databases.md +++ b/doc/development/database/multiple_databases.md @@ -272,6 +272,62 @@ logic to delete these rows if or whenever necessary in your domain. Finally, this de-normalization and new query also improves performance because it does less joins and needs less filtering. +##### Remove a redundant join + +Sometimes there are cases where a query is doing excess (or redundant) joins. + +A common example occurs where a query is joining from `A` to `C`, via some +table with both foreign keys, `B`. +When you only care about counting how +many rows there are in `C` and if there are foreign keys and `NOT NULL` constraints +on the foreign keys in `B`, then it might be enough to count those rows. +For example, in +[MR 71811](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71811), it was +previously doing `project.runners.count`, which would produce a query like: + +```sql +select count(*) from projects +inner join ci_runner_projects on ci_runner_projects.project_id = projects.id +where ci_runner_projects.runner_id IN (1, 2, 3) +``` + +This was changed to avoid the cross-join by changing the code to +`project.runner_projects.count`. It produces the same response with the +following query: + +```sql +select count(*) from ci_runner_projects +where ci_runner_projects.runner_id IN (1, 2, 3) +``` + +Another common redundant join is joining all the way to another table, +then filtering by primary key when you could have instead filtered on a foreign +key. See an example in +[MR 71614](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/71614). The previous +code was `joins(scan: :build).where(ci_builds: { id: build_ids })`, which +generated a query like: + +```sql +select ... +inner join security_scans +inner join ci_builds on security_scans.build_id = ci_builds.id +where ci_builds.id IN (1, 2, 3) +``` + +However, as `security_scans` already has a foreign key `build_id`, the code +can be changed to `joins(:scan).where(security_scans: { build_id: build_ids })`, +which produces the same response with the following query: + +```sql +select ... +inner join security_scans +where security_scans.build_id IN (1, 2, 3) +``` + +Both of these examples of removing redundant joins remove the cross-joins, +but they have the added benefit of producing simpler and faster +queries. + ##### Use `disable_joins` for `has_one` or `has_many` `through:` relations Sometimes a join query is caused by using `has_one ... through:` or `has_many diff --git a/doc/user/group/index.md b/doc/user/group/index.md index 3b21f192f47..e3da576cd99 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -95,10 +95,8 @@ For details about groups, watch [GitLab Namespaces (users, groups and subgroups) You can give a user access to all projects in a group. -1. On the top bar, select **Menu > Groups**. -1. Select **Your Groups**. -1. Find your group and select it. -1. From the left sidebar, select **Group information > Members**. +1. On the top bar, select **Menu > Groups** and find your group. +1. On the left sidebar, select **Group information > Members**. 1. Fill in the fields. - The role applies to all projects in the group. [Learn more about permissions](../permissions.md). - On the **Access expiration date**, the user can no longer access projects in the group. @@ -107,9 +105,7 @@ You can give a user access to all projects in a group. As a user, you can request to be a member of a group, if an administrator allows it. -1. On the top bar, select **Menu > Groups**. -1. Select **Your Groups**. -1. Find the group and select it. +1. On the top bar, select **Menu > Groups** and find your group. 1. Under the group name, select **Request Access**. As many as ten of the most-recently-active group owners receive an email with your request. diff --git a/doc/user/group/value_stream_analytics/index.md b/doc/user/group/value_stream_analytics/index.md index 5c8393f30ab..3b0eefeb909 100644 --- a/doc/user/group/value_stream_analytics/index.md +++ b/doc/user/group/value_stream_analytics/index.md @@ -87,6 +87,12 @@ The "Time" metrics near the top of the page are measured as follows: - **Lead time**: median time from issue created to issue closed. - **Cycle time**: median time from first commit to issue closed. (You can associate a commit with an issue by [crosslinking in the commit message](../../project/issues/crosslinking_issues.md#from-commit-messages).) +- **Lead Time for Changes**: median time between when a merge request is merged and deployed to a +production environment for all merge requests deployed in the given time period. +[Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5 (**Ultimate** +tier only). + +- **Lead Time for Changes**: median duration between merge request merge and deployment to a production environment for all MRs deployed in the given time period. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/340150) in GitLab 14.5 (**Ultimate** tier only). The "Recent Activity" metrics near the top of the page are measured as follows: diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 5d0c45e7835..7981c07fd77 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -10225,6 +10225,9 @@ msgstr "" msgid "CycleAnalytics|Display chart filters" msgstr "" +msgid "CycleAnalytics|Lead Time for Changes" +msgstr "" + msgid "CycleAnalytics|No stages selected" msgstr "" @@ -31085,9 +31088,6 @@ msgstr "" msgid "ServiceDesk|For help setting up the Service Desk for your instance, please contact an administrator." msgstr "" -msgid "ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation." -msgstr "" - msgid "ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation." msgstr "" @@ -37550,6 +37550,9 @@ msgstr "" msgid "ValueStreamAnalytics|Average number of deployments to production per day." msgstr "" +msgid "ValueStreamAnalytics|Median time between merge request merge and deployment to a production environment for all MRs deployed in the given time period." +msgstr "" + msgid "ValueStreamAnalytics|Median time from issue created to issue closed." msgstr "" diff --git a/package.json b/package.json index d6f25c86ae8..b2d0c1d56c3 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@gitlab/favicon-overlay": "2.0.0", "@gitlab/svgs": "1.218.0", "@gitlab/tributejs": "1.0.0", - "@gitlab/ui": "32.19.1", + "@gitlab/ui": "32.21.0", "@gitlab/visual-review-tools": "1.6.1", "@rails/actioncable": "6.1.4-1", "@rails/ujs": "6.1.4-1", diff --git a/spec/frontend/__mocks__/@gitlab/ui.js b/spec/frontend/__mocks__/@gitlab/ui.js index 4c491a87fcb..6b3f1f01e6a 100644 --- a/spec/frontend/__mocks__/@gitlab/ui.js +++ b/spec/frontend/__mocks__/@gitlab/ui.js @@ -14,7 +14,9 @@ export * from '@gitlab/ui'; */ jest.mock('@gitlab/ui/dist/directives/tooltip.js', () => ({ - bind() {}, + GlTooltipDirective: { + bind() {}, + }, })); jest.mock('@gitlab/ui/dist/components/base/tooltip/tooltip.js', () => ({ diff --git a/spec/frontend/diffs/components/diff_line_note_form_spec.js b/spec/frontend/diffs/components/diff_line_note_form_spec.js index a192f7e2e9a..5132cfd7622 100644 --- a/spec/frontend/diffs/components/diff_line_note_form_spec.js +++ b/spec/frontend/diffs/components/diff_line_note_form_spec.js @@ -26,8 +26,9 @@ describe('DiffLineNoteForm', () => { propsData: { diffFileHash: diffFile.file_hash, diffLines, - line: diffLines[0], - noteTargetLine: diffLines[0], + line: diffLines[1], + range: { start: diffLines[0], end: diffLines[1] }, + noteTargetLine: diffLines[1], }, }); }; @@ -67,7 +68,7 @@ describe('DiffLineNoteForm', () => { expect(window.confirm).not.toHaveBeenCalled(); wrapper.vm.$nextTick(() => { expect(wrapper.vm.cancelCommentForm).toHaveBeenCalledWith({ - lineCode: diffLines[0].line_code, + lineCode: diffLines[1].line_code, fileHash: wrapper.vm.diffFileHash, }); @@ -88,13 +89,13 @@ describe('DiffLineNoteForm', () => { start: { line_code: wrapper.vm.commentLineStart.line_code, type: wrapper.vm.commentLineStart.type, - new_line: 1, + new_line: 2, old_line: null, }, end: { line_code: wrapper.vm.line.line_code, type: wrapper.vm.line.type, - new_line: 1, + new_line: 2, old_line: null, }, }; @@ -120,7 +121,7 @@ describe('DiffLineNoteForm', () => { describe('mounted', () => { it('should init autosave', () => { - const key = 'autosave/Note/Issue/98//DiffNote//1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_1'; + const key = 'autosave/Note/Issue/98//DiffNote//1c497fbb3a46b78edf04cc2a2fa33f67e3ffbe2a_1_2'; wrapper = createComponent(); expect(wrapper.vm.autosave).toBeDefined(); diff --git a/spec/frontend/diffs/utils/diff_line_spec.js b/spec/frontend/diffs/utils/diff_line_spec.js new file mode 100644 index 00000000000..adcb4a4433c --- /dev/null +++ b/spec/frontend/diffs/utils/diff_line_spec.js @@ -0,0 +1,30 @@ +import { pickDirection } from '~/diffs/utils/diff_line'; + +describe('diff_line utilities', () => { + describe('pickDirection', () => { + const left = { + line_code: 'left', + }; + const right = { + line_code: 'right', + }; + const defaultLine = { + left, + right, + }; + + it.each` + code | pick | line | pickDescription + ${'left'} | ${left} | ${defaultLine} | ${'the left line'} + ${'right'} | ${right} | ${defaultLine} | ${'the right line'} + ${'junk'} | ${left} | ${defaultLine} | ${'the default: the left line'} + ${'junk'} | ${right} | ${{ right }} | ${"the right line if there's no left line to default to"} + ${'right'} | ${left} | ${{ left }} | ${"the left line when there isn't a right line to match"} + `( + 'when provided a line and a line code `$code`, picks $pickDescription', + ({ code, line, pick }) => { + expect(pickDirection({ line, code })).toBe(pick); + }, + ); + }); +}); diff --git a/spec/frontend/ide/components/shared/commit_message_field_spec.js b/spec/frontend/ide/components/shared/commit_message_field_spec.js new file mode 100644 index 00000000000..f4f9b95b233 --- /dev/null +++ b/spec/frontend/ide/components/shared/commit_message_field_spec.js @@ -0,0 +1,149 @@ +import { shallowMount } from '@vue/test-utils'; +import { nextTick } from 'vue'; +import { extendedWrapper } from 'helpers/vue_test_utils_helper'; +import CommitMessageField from '~/ide/components/shared/commit_message_field.vue'; + +const DEFAULT_PROPS = { + text: 'foo text', + placeholder: 'foo placeholder', +}; + +describe('CommitMessageField', () => { + let wrapper; + + const createComponent = (props = {}) => { + wrapper = extendedWrapper( + shallowMount(CommitMessageField, { + propsData: { + ...DEFAULT_PROPS, + ...props, + }, + attachTo: document.body, + }), + ); + }; + + afterEach(() => { + wrapper.destroy(); + }); + + const findTextArea = () => wrapper.find('textarea'); + const findHighlights = () => wrapper.findByTestId('highlights'); + const findHighlightsText = () => wrapper.findByTestId('highlights-text'); + const findHighlightsMark = () => wrapper.findByTestId('highlights-mark'); + const findHighlightsTexts = () => wrapper.findAllByTestId('highlights-text'); + const findHighlightsMarks = () => wrapper.findAllByTestId('highlights-mark'); + + const fillText = async (text) => { + wrapper.setProps({ text }); + await nextTick(); + }; + + it('emits input event on input', () => { + const value = 'foo'; + + createComponent(); + findTextArea().setValue(value); + expect(wrapper.emitted('input')[0][0]).toEqual(value); + }); + + describe('focus classes', () => { + beforeEach(async () => { + createComponent(); + findTextArea().trigger('focus'); + await nextTick(); + }); + + it('is added on textarea focus', async () => { + expect(wrapper.attributes('class')).toEqual( + expect.stringContaining('gl-outline-none! gl-focus-ring-border-1-gray-900!'), + ); + }); + + it('is removed on textarea blur', async () => { + findTextArea().trigger('blur'); + await nextTick(); + + expect(wrapper.attributes('class')).toEqual( + expect.not.stringContaining('gl-outline-none! gl-focus-ring-border-1-gray-900!'), + ); + }); + }); + + describe('highlights', () => { + describe('subject line', () => { + it('does not highlight less than 50 characters', async () => { + const text = 'text less than 50 chars'; + + createComponent(); + await fillText(text); + + expect(findHighlightsText().text()).toEqual(text); + expect(findHighlightsMark().text()).toBeFalsy(); + }); + + it('highlights characters over 50 length', async () => { + const text = + 'text less than 50 chars that should not highlighted. text more than 50 should be highlighted'; + + createComponent(); + await fillText(text); + + expect(findHighlightsText().text()).toEqual(text.slice(0, 50)); + expect(findHighlightsMark().text()).toEqual(text.slice(50)); + }); + }); + + describe('body text', () => { + it('does not highlight body text less tan 72 characters', async () => { + const text = 'subject line\nbody content'; + + createComponent(); + await fillText(text); + + expect(findHighlightsTexts()).toHaveLength(2); + expect(findHighlightsMarks().at(1).attributes('style')).toEqual('display: none;'); + }); + + it('highlights body text more than 72 characters', async () => { + const text = + 'subject line\nbody content that will be highlighted when it is more than 72 characters in length'; + + createComponent(); + await fillText(text); + + expect(findHighlightsTexts()).toHaveLength(2); + expect(findHighlightsMarks().at(1).attributes('style')).not.toEqual('display: none;'); + expect(findHighlightsMarks().at(1).element.textContent).toEqual(' in length'); + }); + + it('highlights body text & subject line', async () => { + const text = + 'text less than 50 chars that should not highlighted\nbody content that will be highlighted when it is more than 72 characters in length'; + + createComponent(); + await fillText(text); + + expect(findHighlightsTexts()).toHaveLength(2); + expect(findHighlightsMarks()).toHaveLength(2); + expect(findHighlightsMarks().at(0).element.textContent).toEqual('d'); + expect(findHighlightsMarks().at(1).element.textContent).toEqual(' in length'); + }); + }); + }); + + describe('scrolling textarea', () => { + it('updates transform of highlights', async () => { + const yCoord = 50; + + createComponent(); + await fillText('subject line\n\n\n\n\n\n\n\n\n\n\nbody content'); + + wrapper.vm.$el.querySelector('textarea').scrollTo(0, yCoord); + await nextTick(); + + expect(wrapper.vm.scrollTop).toEqual(yCoord); + expect(findHighlights().attributes('style')).toEqual('transform: translate3d(0, -50px, 0);'); + }); + }); +}); diff --git a/spec/frontend/notes/components/multiline_comment_form_spec.js b/spec/frontend/notes/components/multiline_comment_form_spec.js index b6d603c6358..b027a261c15 100644 --- a/spec/frontend/notes/components/multiline_comment_form_spec.js +++ b/spec/frontend/notes/components/multiline_comment_form_spec.js @@ -50,18 +50,6 @@ describe('MultilineCommentForm', () => { expect(wrapper.vm.commentLineStart).toEqual(lineRange.start); expect(setSelectedCommentPosition).toHaveBeenCalled(); }); - - it('sets commentLineStart to selectedCommentPosition', () => { - const notes = { - selectedCommentPosition: { - start: { ...testLine }, - }, - }; - const wrapper = createWrapper({}, { notes }); - - expect(wrapper.vm.commentLineStart).toEqual(wrapper.vm.selectedCommentPosition.start); - expect(setSelectedCommentPosition).not.toHaveBeenCalled(); - }); }); describe('destroyed', () => { diff --git a/spec/lib/gitlab/ci/config/extendable_spec.rb b/spec/lib/gitlab/ci/config/extendable_spec.rb index 481f55d790e..2fc009569fc 100644 --- a/spec/lib/gitlab/ci/config/extendable_spec.rb +++ b/spec/lib/gitlab/ci/config/extendable_spec.rb @@ -73,6 +73,50 @@ RSpec.describe Gitlab::Ci::Config::Extendable do end end + context 'when the job tries to delete an extension key' do + let(:hash) do + { + something: { + script: 'deploy', + only: { variables: %w[$SOMETHING] } + }, + + test1: { + extends: 'something', + script: 'ls', + only: {} + }, + + test2: { + extends: 'something', + script: 'ls', + only: nil + } + } + end + + it 'deletes the key if assigned to null' do + expect(subject.to_hash).to eq( + something: { + script: 'deploy', + only: { variables: %w[$SOMETHING] } + }, + test1: { + extends: 'something', + script: 'ls', + only: { + variables: %w[$SOMETHING] + } + }, + test2: { + extends: 'something', + script: 'ls', + only: nil + } + ) + end + end + context 'when a hash uses recursive extensions' do let(:hash) do { diff --git a/spec/lib/gitlab/ci/yaml_processor_spec.rb b/spec/lib/gitlab/ci/yaml_processor_spec.rb index 1591c2e6b60..f00a801286d 100644 --- a/spec/lib/gitlab/ci/yaml_processor_spec.rb +++ b/spec/lib/gitlab/ci/yaml_processor_spec.rb @@ -1046,6 +1046,64 @@ module Gitlab end end + context 'when overriding `extends`' do + let(:config) do + <<~YAML + .base: + script: test + variables: + VAR1: base var 1 + + test1: + extends: .base + variables: + VAR1: test1 var 1 + VAR2: test2 var 2 + + test2: + extends: .base + variables: + VAR2: test2 var 2 + + test3: + extends: .base + variables: {} + + test4: + extends: .base + variables: null + YAML + end + + it 'correctly extends jobs' do + expect(config_processor.builds[0]).to include( + name: 'test1', + options: { script: ['test'] }, + job_variables: [{ key: 'VAR1', value: 'test1 var 1', public: true }, + { key: 'VAR2', value: 'test2 var 2', public: true }] + ) + + expect(config_processor.builds[1]).to include( + name: 'test2', + options: { script: ['test'] }, + job_variables: [{ key: 'VAR1', value: 'base var 1', public: true }, + { key: 'VAR2', value: 'test2 var 2', public: true }] + ) + + expect(config_processor.builds[2]).to include( + name: 'test3', + options: { script: ['test'] }, + job_variables: [{ key: 'VAR1', value: 'base var 1', public: true }] + ) + + expect(config_processor.builds[3]).to include( + name: 'test4', + options: { script: ['test'] }, + job_variables: [] + ) + end + end + context 'when using recursive `extends`' do let(:config) do <<~YAML diff --git a/spec/lib/gitlab/usage/metric_definition_spec.rb b/spec/lib/gitlab/usage/metric_definition_spec.rb index 522f69062fb..a22b3a733bd 100644 --- a/spec/lib/gitlab/usage/metric_definition_spec.rb +++ b/spec/lib/gitlab/usage/metric_definition_spec.rb @@ -9,6 +9,7 @@ RSpec.describe Gitlab::Usage::MetricDefinition do value_type: 'string', product_category: 'collection', product_stage: 'growth', + product_section: 'devops', status: 'active', milestone: '14.1', default_generation: 'generation_1', @@ -222,6 +223,7 @@ RSpec.describe Gitlab::Usage::MetricDefinition do value_type: 'string', product_category: 'collection', product_stage: 'growth', + product_section: 'devops', status: 'active', milestone: '14.1', default_generation: 'generation_1', diff --git a/spec/support/database/cross-database-modification-allowlist.yml b/spec/support/database/cross-database-modification-allowlist.yml index 627967f65f3..65b44379abc 100644 --- a/spec/support/database/cross-database-modification-allowlist.yml +++ b/spec/support/database/cross-database-modification-allowlist.yml @@ -378,7 +378,6 @@ - "./ee/spec/models/ci/build_spec.rb" - "./ee/spec/models/ci/minutes/additional_pack_spec.rb" - "./ee/spec/models/ci/pipeline_spec.rb" -- "./ee/spec/models/ci/subscriptions/project_spec.rb" - "./ee/spec/models/concerns/approval_rule_like_spec.rb" - "./ee/spec/models/concerns/approver_migrate_hook_spec.rb" - "./ee/spec/models/dora/daily_metrics_spec.rb" diff --git a/spec/support/database/prevent_cross_database_modification.rb b/spec/support/database/prevent_cross_database_modification.rb index 7ded85b65ce..c793c1c008b 100644 --- a/spec/support/database/prevent_cross_database_modification.rb +++ b/spec/support/database/prevent_cross_database_modification.rb @@ -84,6 +84,11 @@ module Database parsed_query = PgQuery.parse(sql) tables = sql.downcase.include?(' for update') ? parsed_query.tables : parsed_query.dml_tables + # We have some code where plans and gitlab_subscriptions are lazily + # created and this causes lots of spec failures + # https://gitlab.com/gitlab-org/gitlab/-/issues/343394 + tables -= %w[plans gitlab_subscriptions] + return if tables.empty? cross_database_context[:modified_tables_by_db][database].merge(tables) diff --git a/workhorse/internal/dependencyproxy/dependencyproxy.go b/workhorse/internal/dependencyproxy/dependencyproxy.go index cfb3045544f..b21600d5186 100644 --- a/workhorse/internal/dependencyproxy/dependencyproxy.go +++ b/workhorse/internal/dependencyproxy/dependencyproxy.go @@ -4,37 +4,17 @@ import ( "context" "fmt" "io" - "net" "net/http" - "time" - "gitlab.com/gitlab-org/labkit/correlation" "gitlab.com/gitlab-org/labkit/log" - "gitlab.com/gitlab-org/labkit/tracing" "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport" "gitlab.com/gitlab-org/gitlab/workhorse/internal/senddata" ) -// httpTransport defines a http.Transport with values -// that are more restrictive than for http.DefaultTransport, -// they define shorter TLS Handshake, and more aggressive connection closing -// to prevent the connection hanging and reduce FD usage -var httpTransport = tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(&http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 10 * time.Second, - }).DialContext, - MaxIdleConns: 2, - IdleConnTimeout: 30 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 10 * time.Second, - ResponseHeaderTimeout: 30 * time.Second, -})) - var httpClient = &http.Client{ - Transport: httpTransport, + Transport: httptransport.New(), } type Injector struct { diff --git a/workhorse/internal/helper/httptransport/http_transport.go b/workhorse/internal/helper/httptransport/http_transport.go new file mode 100644 index 00000000000..c7c3c5283f5 --- /dev/null +++ b/workhorse/internal/helper/httptransport/http_transport.go @@ -0,0 +1,37 @@ +package httptransport + +import ( + "net/http" + "time" + + "gitlab.com/gitlab-org/labkit/correlation" + "gitlab.com/gitlab-org/labkit/tracing" +) + +type Option func(*http.Transport) + +// Defines a http.Transport with values +// that are more restrictive than for http.DefaultTransport, +// they define shorter TLS Handshake, and more aggressive connection closing +// to prevent the connection hanging and reduce FD usage +func New(options ...Option) http.RoundTripper { + t := http.DefaultTransport.(*http.Transport).Clone() + + // To avoid keep around TCP connections to http servers we're done with + t.MaxIdleConns = 2 + + // A stricter timeout for fetching from external sources that can be slow + t.ResponseHeaderTimeout = 30 * time.Second + + for _, option := range options { + option(t) + } + + return tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(t)) +} + +func WithDisabledCompression() Option { + return func(t *http.Transport) { + t.DisableCompression = true + } +} diff --git a/workhorse/internal/imageresizer/image_resizer.go b/workhorse/internal/imageresizer/image_resizer.go index cd0fa946530..8c3271b6f11 100644 --- a/workhorse/internal/imageresizer/image_resizer.go +++ b/workhorse/internal/imageresizer/image_resizer.go @@ -5,7 +5,6 @@ import ( "context" "fmt" "io" - "net" "net/http" "os" "os/exec" @@ -18,11 +17,11 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "gitlab.com/gitlab-org/labkit/correlation" "gitlab.com/gitlab-org/labkit/tracing" "gitlab.com/gitlab-org/gitlab/workhorse/internal/config" "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport" "gitlab.com/gitlab-org/gitlab/workhorse/internal/log" "gitlab.com/gitlab-org/gitlab/workhorse/internal/senddata" ) @@ -69,23 +68,8 @@ const ( var envInjector = tracing.NewEnvInjector() -// Images might be located remotely in object storage, in which case we need to stream -// it via http(s) -var httpTransport = tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(&http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 10 * time.Second, - }).DialContext, - MaxIdleConns: 2, - IdleConnTimeout: 30 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 10 * time.Second, - ResponseHeaderTimeout: 30 * time.Second, -})) - var httpClient = &http.Client{ - Transport: httpTransport, + Transport: httptransport.New(), } const ( diff --git a/workhorse/internal/objectstore/object.go b/workhorse/internal/objectstore/object.go index eaf3bfb2e36..b7c4f12f009 100644 --- a/workhorse/internal/objectstore/object.go +++ b/workhorse/internal/objectstore/object.go @@ -5,34 +5,15 @@ import ( "fmt" "io" "io/ioutil" - "net" "net/http" - "time" - "gitlab.com/gitlab-org/labkit/correlation" "gitlab.com/gitlab-org/labkit/mask" - "gitlab.com/gitlab-org/labkit/tracing" -) -// httpTransport defines a http.Transport with values -// that are more restrictive than for http.DefaultTransport, -// they define shorter TLS Handshake, and more aggressive connection closing -// to prevent the connection hanging and reduce FD usage -var httpTransport = tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(&http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 10 * time.Second, - }).DialContext, - MaxIdleConns: 2, - IdleConnTimeout: 30 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 10 * time.Second, - ResponseHeaderTimeout: 30 * time.Second, -})) + "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport" +) var httpClient = &http.Client{ - Transport: httpTransport, + Transport: httptransport.New(), } // Object represents an object on a S3 compatible Object Store service. diff --git a/workhorse/internal/sendurl/sendurl.go b/workhorse/internal/sendurl/sendurl.go index ac2e66f95ab..205ec8a0e9f 100644 --- a/workhorse/internal/sendurl/sendurl.go +++ b/workhorse/internal/sendurl/sendurl.go @@ -3,18 +3,15 @@ package sendurl import ( "fmt" "io" - "net" "net/http" - "time" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "gitlab.com/gitlab-org/labkit/correlation" "gitlab.com/gitlab-org/labkit/mask" - "gitlab.com/gitlab-org/labkit/tracing" "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport" "gitlab.com/gitlab-org/gitlab/workhorse/internal/log" "gitlab.com/gitlab-org/gitlab/workhorse/internal/senddata" ) @@ -47,22 +44,7 @@ var preserveHeaderKeys = map[string]bool{ "Pragma": true, // Support for HTTP 1.0 proxies } -// httpTransport defines a http.Transport with values -// that are more restrictive than for http.DefaultTransport, -// they define shorter TLS Handshake, and more aggressive connection closing -// to prevent the connection hanging and reduce FD usage -var httpTransport = tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(&http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 10 * time.Second, - }).DialContext, - MaxIdleConns: 2, - IdleConnTimeout: 30 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 10 * time.Second, - ResponseHeaderTimeout: 30 * time.Second, -})) +var httpTransport = httptransport.New() var httpClient = &http.Client{ Transport: httpTransport, diff --git a/workhorse/internal/upstream/roundtripper/roundtripper.go b/workhorse/internal/upstream/roundtripper/roundtripper.go index fdbca5c0120..fcba50d7975 100644 --- a/workhorse/internal/upstream/roundtripper/roundtripper.go +++ b/workhorse/internal/upstream/roundtripper/roundtripper.go @@ -32,19 +32,23 @@ func NewBackendRoundTripper(backend *url.URL, socket string, proxyHeadersTimeout } func newBackendRoundTripper(backend *url.URL, socket string, proxyHeadersTimeout time.Duration, developmentMode bool, tlsConf *tls.Config) http.RoundTripper { - // Copied from the definition of http.DefaultTransport. We can't literally copy http.DefaultTransport because of its hidden internal state. - transport, dialer := newBackendTransport() + transport := http.DefaultTransport.(*http.Transport).Clone() transport.ResponseHeaderTimeout = proxyHeadersTimeout transport.TLSClientConfig = tlsConf + // Puma does not support http/2, there's no point in reconnecting + transport.ForceAttemptHTTP2 = false + + dial := transport.DialContext + if backend != nil && socket == "" { address := mustParseAddress(backend.Host, backend.Scheme) transport.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) { - return dialer.DialContext(ctx, "tcp", address) + return dial(ctx, "tcp", address) } } else if socket != "" { transport.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) { - return dialer.DialContext(ctx, "unix", socket) + return dial(ctx, "unix", socket) } } else { panic("backend is nil and socket is empty") diff --git a/workhorse/internal/upstream/roundtripper/transport.go b/workhorse/internal/upstream/roundtripper/transport.go deleted file mode 100644 index 84d9623b129..00000000000 --- a/workhorse/internal/upstream/roundtripper/transport.go +++ /dev/null @@ -1,27 +0,0 @@ -package roundtripper - -import ( - "net" - "net/http" - "time" -) - -// newBackendTransport setups the default HTTP transport which Workhorse uses -// to communicate with the upstream -func newBackendTransport() (*http.Transport, *net.Dialer) { - dialler := &net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - } - - transport := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: dialler.DialContext, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - } - - return transport, dialler -} diff --git a/workhorse/internal/zipartifacts/open_archive.go b/workhorse/internal/zipartifacts/open_archive.go index cf0e38e9ee0..ec2fd691038 100644 --- a/workhorse/internal/zipartifacts/open_archive.go +++ b/workhorse/internal/zipartifacts/open_archive.go @@ -5,32 +5,20 @@ import ( "context" "fmt" "io" - "net" "net/http" "os" "strings" - "time" + "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport" "gitlab.com/gitlab-org/gitlab/workhorse/internal/httprs" - "gitlab.com/gitlab-org/labkit/correlation" "gitlab.com/gitlab-org/labkit/mask" - "gitlab.com/gitlab-org/labkit/tracing" ) var httpClient = &http.Client{ - Transport: tracing.NewRoundTripper(correlation.NewInstrumentedRoundTripper(&http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 10 * time.Second, - }).DialContext, - IdleConnTimeout: 30 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 10 * time.Second, - ResponseHeaderTimeout: 30 * time.Second, - DisableCompression: true, - })), + Transport: httptransport.New( + httptransport.WithDisabledCompression(), // To avoid bugs when serving compressed files from object storage + ), } type archive struct { diff --git a/yarn.lock b/yarn.lock index 7b1be03d597..dd18237eaa6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -914,10 +914,10 @@ resolved "https://registry.yarnpkg.com/@gitlab/tributejs/-/tributejs-1.0.0.tgz#672befa222aeffc83e7d799b0500a7a4418e59b8" integrity sha512-nmKw1+hB6MHvlmPz63yPwVs1qQkycHwsKgxpEbzmky16Y6mL4EJMk3w1b8QlOAF/AIAzjCERPhe/R4MJiohbZw== -"@gitlab/ui@32.19.1": - version "32.19.1" - resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-32.19.1.tgz#ab54408272cb5ee695dc0a328892e047da3d41ac" - integrity sha512-ooc0TwCvREuWJfvn8EbOkEz1Mh4UKEu7x0MKhD+TBjG+JJwLKDClmD1cPPE05BXtWAvW5W9JUBkaeMCVQG2l3g== +"@gitlab/ui@32.21.0": + version "32.21.0" + resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-32.21.0.tgz#d4a5e9b369aa91a9512fb742d1cd5f23f1653a7c" + integrity sha512-ssobbMDscsJa/mWqAne6xOAsNy3pQNOahzn4oLyVmmNPiMRZNcS4mEda28MwexntlkzEkOxWHjmkoa4YI0JQqQ== dependencies: "@babel/standalone" "^7.0.0" bootstrap-vue "2.20.1" |