From 698fe342b9fff4e569aa0f14a1973271144ff1a5 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 4 Mar 2022 18:20:01 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../dirty_submit/dirty_submit_form.js | 12 + .../components/graph/graph_component.vue | 5 + .../components/graph/linked_pipeline.vue | 68 +++- .../graph/linked_pipelines_column.vue | 5 + .../pipelines/components/jobs/jobs_app.vue | 15 +- .../pipelines_list/pipeline_url.vue | 126 +++---- .../pipelines_list/pipelines_commit.vue | 85 ----- .../pipelines_list/pipelines_status_badge.vue | 7 +- .../pipelines_list/pipelines_table.vue | 47 +-- .../components/pipelines_list/time_ago.vue | 8 +- .../pipelines/pipeline_details_graph.js | 3 +- .../components/notes/noteable_warning.vue | 42 ++- .../vue_shared/components/tier_badge.vue | 40 +++ app/controllers/admin/cohorts_controller.rb | 2 + .../admin/dev_ops_report_controller.rb | 2 + .../admin/instance_review_controller.rb | 2 + .../admin/usage_trends_controller.rb | 2 + .../projects/merge_requests_controller.rb | 1 - .../projects/pipelines_controller.rb | 3 - .../get_pipeline_details.query.graphql | 9 + app/graphql/types/base_enum.rb | 2 +- app/helpers/projects/pipeline_helper.rb | 15 + .../boards/base_items_list_service.rb | 27 +- .../issuable_links/destroy_service.rb | 9 +- app/services/issue_links/destroy_service.rb | 13 - app/services/system_note_service.rb | 4 +- .../system_notes/issuables_service.rb | 4 +- .../web_hooks/log_execution_service.rb | 10 + app/views/projects/pipelines/show.html.haml | 2 +- config/feature_categories.yml | 4 +- ...ding_builds_maintain_denormalized_data.yml | 2 +- .../ci_pending_builds_queue_source.yml | 2 +- ...queuing_use_denormalized_data_strategy.yml | 2 +- ..._registry_follow_redirects_middleware.yml} | 12 +- config/metrics/aggregates/common.yml | 24 ++ .../counts_28d/20220222215951_xmau_plan.yml | 21 ++ ...20220222215952_xmau_project_management.yml | 21 ++ .../20220222215955_users_work_items.yml | 21 ++ .../counts_7d/20220222215851_xmau_plan.yml | 21 ++ ...20220222215852_xmau_project_management.yml | 21 ++ .../20220222215855_users_work_items.yml | 21 ++ ...precation-of-vsa-filtering-calculation.yml | 4 +- ...Enforce-validation-of-security-schemas.yml | 6 +- ...precation-license-compliance-api-terms.yml | 6 +- ...cure-dependency-scanning-bundler-audit.yml | 8 +- data/deprecations/14-6-job_char_limit.yml | 2 +- .../14-7-deprecate-merged_by-api-field.yml | 6 +- .../14-7-deprecate-static-site-editor.yml | 8 +- ...n-secure-dependency-scanning-retire-js.yml | 8 +- .../14-8-enforce-pat-expiration.yml | 4 +- .../14-8-enforce-ssh-expiration.yml | 4 +- data/deprecations/14-8-grpc-proxy.yml | 2 +- .../14-8-iteration-started-field.yml | 2 +- data/deprecations/14-8-nfs_support.yml | 2 +- ...ve_ff_push_rules_supersede_code_owners.yml | 6 +- .../14-8-secure-and-protect-analyzer-bump.yml | 6 +- .../14-8-secure-ca-python-deprecation.yml | 10 +- .../15-0-deprecate-monitor-logging.yml | 10 +- .../15-0-deprecate-monitor-metrics.yml | 10 +- .../15-0-deprecate-monitor-tracing.yml | 10 +- data/deprecations/15-0-oauth-noexpiry.yml | 4 +- data/deprecations/15-0-oauth.yml | 2 +- .../14_2/removal-verify-build-log.yml | 4 +- .../14_3/removal_legacy_storage_setting.yml | 2 +- .../removals/14_6/limit_trigger_pipelines.yml | 4 +- data/removals/14_6/removal-release-cli-s3.yml | 4 +- .../20220124200927_add_index_to_issues.rb | 17 + ...l_namespace_project_maintainer_to_owner.rb | 25 ++ db/schema_migrations/20220124200927 | 1 + db/schema_migrations/20220208080921 | 1 + db/structure.sql | 2 + doc/administration/instance_limits.md | 17 +- doc/api/graphql/reference/index.md | 29 +- doc/user/admin_area/analytics/usage_trends.md | 3 - doc/user/application_security/index.md | 2 +- doc/user/clusters/agent/ci_cd_tunnel.md | 9 +- doc/user/clusters/agent/index.md | 19 +- lib/api/statistics.rb | 2 +- lib/container_registry/client.rb | 19 ++ ...l_namespace_project_maintainer_to_owner.rb | 45 +++ locale/gitlab.pot | 44 ++- qa/qa/page/project/pipeline/show.rb | 3 +- ...variables_to_downstream_via_bridge_spec.rb | 104 ------ .../auto_devops/auto_devops_templates_spec.rb | 2 +- .../merge_request/user_sees_pipelines_spec.rb | 1 - .../projects/pipelines/pipelines_spec.rb | 119 +------ .../dirty_submit/dirty_submit_form_spec.js | 33 ++ .../components/jobs/jobs_app_spec.js | 29 +- .../pipelines/graph/graph_component_spec.js | 1 - .../pipelines/graph/linked_pipeline_spec.js | 87 +++-- .../graph/linked_pipelines_column_spec.js | 5 +- spec/frontend/pipelines/graph/mock_data.js | 18 + spec/frontend/pipelines/pipeline_url_spec.js | 311 +++++++++--------- .../pipelines/pipelines_table_spec.js | 63 +--- .../noteable_warning_spec.js.snap | 10 +- .../components/notes/noteable_warning_spec.js | 5 +- .../vue_shared/components/tier_badge_spec.js | 51 +++ spec/graphql/types/base_enum_spec.rb | 6 +- spec/helpers/projects/pipeline_helper_spec.rb | 22 ++ spec/lib/container_registry/client_spec.rb | 100 +++++- ...espace_project_maintainer_to_owner_spec.rb | 82 +++++ ...espace_project_maintainer_to_owner_spec.rb | 20 ++ .../issue_links/destroy_service_spec.rb | 61 +--- spec/services/system_note_service_spec.rb | 6 +- .../system_notes/issuables_service_spec.rb | 4 +- .../web_hooks/log_execution_service_spec.rb | 48 ++- ...troyable_issuable_links_shared_examples.rb | 42 +++ 107 files changed, 1394 insertions(+), 950 deletions(-) delete mode 100644 app/assets/javascripts/pipelines/components/pipelines_list/pipelines_commit.vue create mode 100644 app/assets/javascripts/vue_shared/components/tier_badge.vue create mode 100644 app/helpers/projects/pipeline_helper.rb rename config/feature_flags/development/{rearrange_pipelines_table.yml => container_registry_follow_redirects_middleware.yml} (51%) create mode 100644 config/metrics/counts_28d/20220222215951_xmau_plan.yml create mode 100644 config/metrics/counts_28d/20220222215952_xmau_project_management.yml create mode 100644 config/metrics/counts_28d/20220222215955_users_work_items.yml create mode 100644 config/metrics/counts_7d/20220222215851_xmau_plan.yml create mode 100644 config/metrics/counts_7d/20220222215852_xmau_project_management.yml create mode 100644 config/metrics/counts_7d/20220222215855_users_work_items.yml create mode 100644 db/migrate/20220124200927_add_index_to_issues.rb create mode 100644 db/post_migrate/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner.rb create mode 100644 db/schema_migrations/20220124200927 create mode 100644 db/schema_migrations/20220208080921 create mode 100644 lib/gitlab/background_migration/migrate_personal_namespace_project_maintainer_to_owner.rb delete mode 100644 qa/qa/specs/features/browser_ui/4_verify/pipeline/pass_dotenv_variables_to_downstream_via_bridge_spec.rb create mode 100644 spec/frontend/vue_shared/components/tier_badge_spec.js create mode 100644 spec/helpers/projects/pipeline_helper_spec.rb create mode 100644 spec/lib/gitlab/background_migration/migrate_personal_namespace_project_maintainer_to_owner_spec.rb create mode 100644 spec/migrations/20220208080921_schedule_migrate_personal_namespace_project_maintainer_to_owner_spec.rb create mode 100644 spec/support/shared_examples/services/issuable_links/destroyable_issuable_links_shared_examples.rb diff --git a/app/assets/javascripts/dirty_submit/dirty_submit_form.js b/app/assets/javascripts/dirty_submit/dirty_submit_form.js index db13daf0799..83dd4b0a124 100644 --- a/app/assets/javascripts/dirty_submit/dirty_submit_form.js +++ b/app/assets/javascripts/dirty_submit/dirty_submit_form.js @@ -1,11 +1,13 @@ import $ from 'jquery'; import { memoize, throttle } from 'lodash'; +import createEventHub from '~/helpers/event_hub_factory'; class DirtySubmitForm { constructor(form) { this.form = form; this.dirtyInputs = []; this.isDisabled = true; + this.events = createEventHub(); this.init(); } @@ -36,11 +38,21 @@ class DirtySubmitForm { this.form.addEventListener('submit', (event) => this.formSubmit(event)); } + addInputsListener(callback) { + this.events.$on('input', callback); + } + + removeInputsListener(callback) { + this.events.$off('input', callback); + } + updateDirtyInput(event) { const { target } = event; if (!target.dataset.isDirtySubmitInput) return; + this.events.$emit('input', event); + this.updateDirtyInputs(target); this.toggleSubmission(); } diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component.vue b/app/assets/javascripts/pipelines/components/graph/graph_component.vue index 015f0519c72..adb9f8604ff 100644 --- a/app/assets/javascripts/pipelines/components/graph/graph_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/graph_component.vue @@ -92,6 +92,9 @@ export default { hasUpstreamPipelines() { return Boolean(this.pipeline?.upstream?.length > 0); }, + isMultiProjectVizAvailable() { + return Boolean(this.pipeline?.user?.namespace?.crossProjectPipelineAvailable); + }, isStageView() { return this.viewType === STAGE_VIEW; }, @@ -178,6 +181,7 @@ export default { -import { GlBadge, GlButton, GlLink, GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui'; +import { + GlBadge, + GlButton, + GlLink, + GlLoadingIcon, + GlPopover, + GlSprintf, + GlTooltipDirective, +} from '@gitlab/ui'; +import TierBadge from '~/vue_shared/components/tier_badge.vue'; import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; -import { __, sprintf } from '~/locale'; +import { __, s__, sprintf } from '~/locale'; import CiStatus from '~/vue_shared/components/ci_icon.vue'; import { reportToSentry } from '../../utils'; import { DOWNSTREAM, UPSTREAM } from './constants'; export default { + i18n: { + popover: { + title: s__('Pipelines|Multi-project pipeline graphs'), + description: s__( + 'Pipelines|Gitlab Premium users have access to the multi-project pipeline graph to improve the visualization of these pipelines. %{linkStart}Learn More%{linkEnd}', + ), + }, + }, directives: { GlTooltip: GlTooltipDirective, }, @@ -16,7 +33,11 @@ export default { GlButton, GlLink, GlLoadingIcon, + GlPopover, + GlSprintf, + TierBadge, }, + inject: ['multiProjectHelpPath'], props: { columnTitle: { type: String, @@ -26,6 +47,10 @@ export default { type: Boolean, required: true, }, + isMultiProjectVizAvailable: { + type: Boolean, + required: true, + }, isLoading: { type: Boolean, required: true, @@ -90,6 +115,9 @@ export default { pipelineStatus() { return this.pipeline.status; }, + popoverContainerId() { + return `popoverContainer-${this.pipeline.id}`; + }, projectName() { return this.pipeline.project.name; }, @@ -128,16 +156,21 @@ export default { diff --git a/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue b/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue index 3c1208afbf0..2f444eebbd5 100644 --- a/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue +++ b/app/assets/javascripts/pipelines/components/graph/linked_pipelines_column.vue @@ -28,6 +28,10 @@ export default { required: true, validator: validateConfigPaths, }, + isMultiProjectVizAvailable: { + type: Boolean, + required: true, + }, linkedPipelines: { type: Array, required: true, @@ -208,6 +212,7 @@ export default {
-
+
@@ -118,7 +127,7 @@ export default { - +
diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue index 2fb5e3c536a..54bd42cbf22 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_list/pipeline_url.vue @@ -1,8 +1,7 @@ - - - - diff --git a/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue b/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue index c45e3f24567..cde963e4051 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_list/time_ago.vue @@ -1,6 +1,5 @@