From 9376fdc13edb5fb822431df943fa088b6a273316 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 30 Jun 2021 15:08:27 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- GITALY_SERVER_VERSION | 2 +- .../usage_trends/components/usage_counts.vue | 32 ++- .../boards/components/board_content.vue | 17 +- .../javascripts/boards/components/board_sidebar.js | 2 +- app/assets/javascripts/boards/stores/actions.js | 6 +- .../javascripts/diffs/components/diff_file.vue | 61 ++-- .../diffs/components/diff_file_header.vue | 9 +- .../javascripts/diffs/components/diff_view.vue | 27 +- .../assignees/sidebar_assignees_widget.vue | 22 +- app/models/namespace.rb | 9 +- app/services/git/wiki_push_service/change.rb | 3 +- app/workers/gitlab/import/stuck_import_job.rb | 2 +- .../recursive_approach_for_all_projects.yml | 8 + .../counts_28d/20210201124930_deployments.yml | 2 +- ...75016_analytics_total_unique_counts_monthly.yml | 2 +- .../20210216175434_project_clusters_enabled.yml | 2 +- .../counts_28d/20210216175616_user_dast_jobs.yml | 2 +- .../counts_28d/20210216175618_dast_pipeline.yml | 2 +- .../20210216180355_user_api_fuzzing_jobs.yml | 2 +- .../20210216180357_user_api_fuzzing_dnd_jobs.yml | 2 +- ...dent_management_total_unique_counts_monthly.yml | 2 +- .../20210216181148_service_desk_issues.yml | 2 +- .../20210216181150_projects_jira_active.yml | 2 +- ...10216181152_projects_jira_dvcs_cloud_active.yml | 2 +- ...0216181154_projects_jira_dvcs_server_active.yml | 2 +- ..._g_project_management_issue_created_monthly.yml | 2 +- ...6_g_project_management_issue_closed_monthly.yml | 2 +- ...504_issues_edit_total_unique_counts_monthly.yml | 2 +- ...81956_user_unique_users_all_secure_scanners.yml | 2 +- .../counts_28d/20210216182125_user_sast_jobs.yml | 3 +- .../20210216182127_user_secret_detection_jobs.yml | 3 +- .../counts_28d/20210216182129_sast_pipeline.yml | 3 +- .../20210216182131_secret_detection_pipeline.yml | 3 +- .../20210216183817_user_coverage_fuzzing_jobs.yml | 2 +- .../counts_28d/20210216183826_sast_scans.yml | 2 +- .../20210216183830_container_scanning_scans.yml | 2 +- .../counts_28d/20210216183832_dast_scans.yml | 2 +- .../20210216183834_secret_detection_scans.yml | 2 +- .../20210216183836_coverage_fuzzing_scans.yml | 2 +- .../20210216183838_api_fuzzing_scans.yml | 2 +- ..._p_terraform_state_api_unique_users_monthly.yml | 2 +- ...7_user_packages_total_unique_counts_monthly.yml | 2 +- .../metrics/counts_all/20210204124930_servers.yml | 2 +- .../metrics/counts_all/20210204124932_clusters.yml | 2 +- .../20210216175026_service_desk_issues.yml | 2 +- .../counts_all/20210216175039_merge_requests.yml | 2 +- ...20210216175312_clusters_applications_cilium.yml | 2 +- ...10216175320_projects_with_terraform_reports.yml | 2 +- ...210216175322_projects_with_terraform_states.yml | 2 +- ...75442_ingress_modsecurity_packets_processed.yml | 2 +- ...75444_ingress_modsecurity_packets_anomalous.yml | 2 +- .../20210216175446_network_policy_forwards.yml | 2 +- .../20210216175448_network_policy_drops.yml | 2 +- .../20210216175450_ingress_modsecurity_logging.yml | 2 +- ...20210216175452_ingress_modsecurity_blocking.yml | 2 +- ...20210216175454_ingress_modsecurity_disabled.yml | 2 +- ...216175456_ingress_modsecurity_not_installed.yml | 2 +- .../counts_all/20210216175510_ci_builds.yml | 2 +- .../20210216175512_ci_internal_pipelines.yml | 2 +- .../20210216175514_ci_external_pipelines.yml | 2 +- .../counts_all/20210216175612_dast_jobs.yml | 2 +- .../counts_all/20210216175614_user_dast_jobs.yml | 2 +- .../20210216175645_projects_bamboo_active.yml | 2 +- .../20210216175804_projects_drone_ci_active.yml | 2 +- .../20210216175932_projects_jenkins_active.yml | 2 +- .../20210216175943_projects_jira_active.yml | 2 +- .../20210216180228_projects_jira_server_active.yml | 2 +- .../20210216180230_projects_jira_cloud_active.yml | 2 +- ...10216180232_projects_jira_dvcs_cloud_active.yml | 2 +- ...0216180234_projects_jira_dvcs_server_active.yml | 2 +- .../20210216180348_user_api_fuzzing_jobs.yml | 2 +- .../20210216180350_user_api_fuzzing_dnd_jobs.yml | 2 +- ...0210216180628_projects_imported_from_github.yml | 2 +- config/metrics/counts_all/20210216180654_jira.yml | 2 +- .../metrics/counts_all/20210216181102_issues.yml | 2 +- .../metrics/counts_all/20210216181115_issues.yml | 2 +- config/metrics/counts_all/20210216181134_epics.yml | 2 +- .../metrics/counts_all/20210216181254_projects.yml | 2 +- config/metrics/counts_all/20210216181256_todos.yml | 2 +- ...81954_user_unique_users_all_secure_scanners.yml | 2 +- .../counts_all/20210216182002_remote_mirrors.yml | 2 +- .../counts_all/20210216182112_sast_jobs.yml | 3 +- .../20210216182114_secret_detection_jobs.yml | 3 +- .../counts_all/20210216182116_user_sast_jobs.yml | 3 +- .../20210216182118_user_secret_detection_jobs.yml | 3 +- .../20210216183514_user_coverage_fuzzing_jobs.yml | 2 +- config/metrics/license/20210204124928_version.yml | 2 +- config/metrics/license/20210216183237_version.yml | 2 +- .../20210216175459_ingress_modsecurity_enabled.yml | 2 +- doc/api/job_artifacts.md | 4 +- doc/api/jobs.md | 2 +- doc/api/pipelines.md | 2 +- doc/ci/environments/deployment_safety.md | 2 +- doc/ci/img/multi_pipeline_mini_graph.gif | Bin 11466 -> 0 bytes doc/ci/img/multi_project_pipeline_graph.png | Bin 10671 -> 0 bytes .../img/parent_pipeline_graph_expanded_v12_6.png | Bin 96087 -> 0 bytes doc/ci/jobs/job_control.md | 4 +- doc/ci/multi_project_pipelines.md | 314 +-------------------- doc/ci/parent_child_pipelines.md | 192 +------------ doc/ci/pipelines/img/multi_pipeline_mini_graph.gif | Bin 0 -> 11466 bytes .../pipelines/img/multi_project_pipeline_graph.png | Bin 0 -> 10671 bytes .../img/parent_pipeline_graph_expanded_v12_6.png | Bin 0 -> 96087 bytes doc/ci/pipelines/index.md | 6 +- doc/ci/pipelines/job_artifacts.md | 2 +- doc/ci/pipelines/multi_project_pipelines.md | 314 +++++++++++++++++++++ doc/ci/pipelines/parent_child_pipelines.md | 192 +++++++++++++ doc/ci/pipelines/pipeline_architectures.md | 2 +- doc/ci/pipelines/pipeline_efficiency.md | 2 +- doc/ci/runners/index.md | 2 +- doc/ci/triggers/index.md | 2 +- doc/ci/troubleshooting.md | 6 +- doc/ci/variables/index.md | 4 +- doc/ci/yaml/index.md | 20 +- doc/development/cicd/index.md | 2 +- doc/development/documentation/index.md | 2 +- doc/development/redis.md | 1 - doc/integration/jira/issues.md | 13 +- doc/user/admin_area/diff_limits.md | 11 +- .../application_security/coverage_fuzzing/index.md | 2 +- doc/user/group/epics/epic_boards.md | 36 +-- doc/user/group/iterations/index.md | 101 ++++++- doc/user/index.md | 2 +- .../testing_and_reports_in_merge_requests.md | 2 +- lib/api/entities/basic_project_details.rb | 2 +- .../groups/graphql/get_members_query.rb | 1 + .../groups/pipelines/members_pipeline.rb | 3 + .../transformers/member_attributes_transformer.rb | 16 +- lib/bulk_imports/ndjson_pipeline.rb | 6 +- lib/bulk_imports/users_mapper.rb | 51 ++++ lib/gitlab/cache/import/caching.rb | 28 ++ locale/gitlab.pot | 9 +- spec/fast_spec_helper.rb | 2 + .../projects/settings/monitor_settings_spec.rb | 2 +- spec/features/projects/terraform_spec.rb | 2 +- .../components/instance_counts_spec.js | 54 ---- .../usage_trends/components/usage_counts_spec.js | 62 ++++ spec/frontend/boards/stores/actions_spec.js | 7 +- spec/frontend/diffs/components/diff_view_spec.js | 8 +- .../assignees/sidebar_assignees_widget_spec.js | 44 ++- .../lib/api/entities/basic_project_details_spec.rb | 27 ++ .../groups/pipelines/members_pipeline_spec.rb | 8 + .../member_attributes_transformer_spec.rb | 28 +- spec/lib/bulk_imports/ndjson_pipeline_spec.rb | 7 +- spec/lib/bulk_imports/users_mapper_spec.rb | 68 +++++ spec/lib/gitlab/cache/import/caching_spec.rb | 24 ++ spec/models/namespace_spec.rb | 8 + spec/services/git/wiki_push_service_spec.rb | 25 +- spec/spec_helper.rb | 3 + workhorse/internal/api/api.go | 46 +++ workhorse/internal/api/api_test.go | 74 +++++ workhorse/internal/upstream/routes.go | 7 +- workhorse/internal/upstream/upstream.go | 33 ++- 152 files changed, 1417 insertions(+), 842 deletions(-) create mode 100644 config/feature_flags/development/recursive_approach_for_all_projects.yml delete mode 100644 doc/ci/img/multi_pipeline_mini_graph.gif delete mode 100644 doc/ci/img/multi_project_pipeline_graph.png delete mode 100644 doc/ci/img/parent_pipeline_graph_expanded_v12_6.png create mode 100644 doc/ci/pipelines/img/multi_pipeline_mini_graph.gif create mode 100644 doc/ci/pipelines/img/multi_project_pipeline_graph.png create mode 100644 doc/ci/pipelines/img/parent_pipeline_graph_expanded_v12_6.png create mode 100644 doc/ci/pipelines/multi_project_pipelines.md create mode 100644 doc/ci/pipelines/parent_child_pipelines.md create mode 100644 lib/bulk_imports/users_mapper.rb delete mode 100644 spec/frontend/analytics/usage_trends/components/instance_counts_spec.js create mode 100644 spec/frontend/analytics/usage_trends/components/usage_counts_spec.js create mode 100644 spec/lib/api/entities/basic_project_details_spec.rb create mode 100644 spec/lib/bulk_imports/users_mapper_spec.rb create mode 100644 workhorse/internal/api/api_test.go diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 17a43ba2c3c..7b249908114 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -d5777441938369d512a7825c57ccf6115d7afdfa +21e7c85471a8d7401fad69be300eaff1c0384577 diff --git a/app/assets/javascripts/analytics/usage_trends/components/usage_counts.vue b/app/assets/javascripts/analytics/usage_trends/components/usage_counts.vue index 0b4fa879b03..1eb4832a2a3 100644 --- a/app/assets/javascripts/analytics/usage_trends/components/usage_counts.vue +++ b/app/assets/javascripts/analytics/usage_trends/components/usage_counts.vue @@ -1,5 +1,6 @@ diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue index 9c0d2dee313..53b071aaed1 100644 --- a/app/assets/javascripts/boards/components/board_content.vue +++ b/app/assets/javascripts/boards/components/board_content.vue @@ -12,10 +12,8 @@ import BoardColumnDeprecated from './board_column_deprecated.vue'; export default { components: { BoardAddNewColumn, - BoardColumn: - gon.features?.graphqlBoardLists || gon.features?.epicBoards - ? BoardColumn - : BoardColumnDeprecated, + BoardColumn, + BoardColumnDeprecated, BoardContentSidebar: () => import('~/boards/components/board_content_sidebar.vue'), EpicBoardContentSidebar: () => import('ee_component/boards/components/epic_board_content_sidebar.vue'), @@ -38,11 +36,14 @@ export default { computed: { ...mapState(['boardLists', 'error', 'addColumnForm']), ...mapGetters(['isSwimlanesOn', 'isEpicBoard']), + useNewBoardColumnComponent() { + return this.glFeatures.graphqlBoardLists || this.isSwimlanesOn || this.isEpicBoard; + }, addColumnFormVisible() { return this.addColumnForm?.visible; }, boardListsToUse() { - return this.glFeatures.graphqlBoardLists || this.isSwimlanesOn || this.isEpicBoard + return this.useNewBoardColumnComponent ? sortBy([...Object.values(this.boardLists)], 'position') : this.lists; }, @@ -65,6 +66,9 @@ export default { return this.canDragColumns ? options : {}; }, + boardColumnComponent() { + return this.useNewBoardColumnComponent ? BoardColumn : BoardColumnDeprecated; + }, }, methods: { ...mapActions(['moveList', 'unsetError']), @@ -102,7 +106,8 @@ export default { class="boards-list gl-w-full gl-py-5 gl-px-3 gl-white-space-nowrap" @end="handleDragOnEnd" > - { + setAssignees: ({ commit }, { id, assignees }) => { commit('UPDATE_BOARD_ITEM_BY_ID', { - itemId: getters.activeBoardItem.id, + itemId: id, prop: 'assignees', - value: assigneeUsernames, + value: assignees, }); }, diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue index d38a703688a..5cf547c1423 100644 --- a/app/assets/javascripts/diffs/components/diff_file.vue +++ b/app/assets/javascripts/diffs/components/diff_file.vue @@ -2,6 +2,7 @@ import { GlButton, GlLoadingIcon, GlSafeHtmlDirective as SafeHtml, GlSprintf } from '@gitlab/ui'; import { escape } from 'lodash'; import { mapActions, mapGetters, mapState } from 'vuex'; +import { IdState } from 'vendor/vue-virtual-scroller'; import createFlash from '~/flash'; import { hasDiff } from '~/helpers/diffs_helper'; import { diffViewerErrors } from '~/ide/constants'; @@ -34,7 +35,7 @@ export default { directives: { SafeHtml, }, - mixins: [glFeatureFlagsMixin()], + mixins: [glFeatureFlagsMixin(), IdState({ idProp: (vm) => vm.file.file_hash })], props: { file: { type: Object, @@ -79,7 +80,7 @@ export default { default: false, }, }, - data() { + idState() { return { isLoadingCollapsedDiff: false, forkMessageVisible: false, @@ -101,7 +102,9 @@ export default { return getShortShaFromFile(this.file); }, showLoadingIcon() { - return this.isLoadingCollapsedDiff || (!this.file.renderIt && !this.isCollapsed); + return ( + this.idState.isLoadingCollapsedDiff || (!this.file.renderIt && !this.idState.isCollapsed) + ); }, hasDiff() { return hasDiff(this.file); @@ -145,13 +148,13 @@ export default { return collapsedType(this.file) === DIFF_FILE_MANUAL_COLLAPSE; }, showBody() { - return !this.isCollapsed || this.automaticallyCollapsed; + return !this.idState.isCollapsed || this.automaticallyCollapsed; }, showWarning() { - return this.isCollapsed && this.automaticallyCollapsed && !this.viewDiffsFileByFile; + return this.idState.isCollapsed && this.automaticallyCollapsed && !this.viewDiffsFileByFile; }, showContent() { - return !this.isCollapsed && !this.isFileTooLarge; + return !this.idState.isCollapsed && !this.isFileTooLarge; }, showLocalFileReviews() { const loggedIn = Boolean(gon.current_user_id); @@ -179,23 +182,16 @@ export default { this.requestDiff(); } }, - immediate: true, }, 'file.viewer.automaticallyCollapsed': { handler: function autoChangeWatch(automaticValue) { - if (collapsedType(this.file) !== DIFF_FILE_MANUAL_COLLAPSE) { - this.isCollapsed = this.viewDiffsFileByFile ? false : automaticValue; - } + this.handleAutomaticallyCollapsed(automaticValue); }, - immediate: true, }, 'file.viewer.manuallyCollapsed': { handler: function manualChangeWatch(manualValue) { - if (manualValue !== null) { - this.isCollapsed = manualValue; - } + this.handleManualChangeWatch(manualValue); }, - immediate: true, }, }, created() { @@ -212,6 +208,8 @@ export default { } this.manageViewedEffects(); + this.handleAutomaticallyCollapsed(this.file.viewer.automaticallyCollapsed); + this.handleManualChangeWatch(this.file.viewer.manuallyCollapsed); }, beforeDestroy() { if (this.preRender) return; @@ -226,12 +224,12 @@ export default { 'setFileCollapsedByUser', ]), manageViewedEffects() { - if (this.reviewed && !this.isCollapsed && this.showLocalFileReviews) { + if (this.reviewed && !this.idState.isCollapsed && this.showLocalFileReviews) { this.handleToggle(); } }, expandAllListener() { - if (this.isCollapsed) { + if (this.idState.isCollapsed) { this.handleToggle(); } }, @@ -253,7 +251,7 @@ export default { }); }, handleToggle({ viaUserInteraction = false } = {}) { - const collapsingNow = !this.isCollapsed; + const collapsingNow = !this.idState.isCollapsed; const contentElement = this.$el.querySelector(`#diff-content-${this.file.file_hash}`); this.setFileCollapsedByUser({ @@ -270,11 +268,11 @@ export default { } }, requestDiff() { - this.isLoadingCollapsedDiff = true; + this.idState.isLoadingCollapsedDiff = true; this.loadCollapsedDiff(this.file) .then(() => { - this.isLoadingCollapsedDiff = false; + this.idState.isLoadingCollapsedDiff = false; this.setRenderIt(this.file); }) .then(() => { @@ -287,17 +285,27 @@ export default { ); }) .catch(() => { - this.isLoadingCollapsedDiff = false; + this.idState.isLoadingCollapsedDiff = false; createFlash({ message: this.$options.i18n.genericError, }); }); }, showForkMessage() { - this.forkMessageVisible = true; + this.idState.forkMessageVisible = true; }, hideForkMessage() { - this.forkMessageVisible = false; + this.idState.forkMessageVisible = false; + }, + handleAutomaticallyCollapsed(automaticValue) { + if (collapsedType(this.file) !== DIFF_FILE_MANUAL_COLLAPSE) { + this.idState.isCollapsed = this.viewDiffsFileByFile ? false : automaticValue; + } + }, + handleManualChangeWatch(manualValue) { + if (manualValue !== null) { + this.idState.isCollapsed = manualValue; + } }, }, }; @@ -320,7 +328,7 @@ export default { :diff-file="file" :collapsible="true" :reviewed="reviewed" - :expanded="!isCollapsed" + :expanded="!idState.isCollapsed" :add-merge-request-buttons="true" :view-diffs-file-by-file="viewDiffsFileByFile" :show-local-file-reviews="showLocalFileReviews" @@ -331,7 +339,10 @@ export default { @showForkMessage="showForkMessage" /> -