diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-07 03:09:45 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-07 03:09:45 +0300 |
commit | d8f61f6383a930a4b25455fd8ccf624fa313bb07 (patch) | |
tree | d1a4eca43aa9a251ae37e9747f4461bebe9445fa | |
parent | 179a30a49dbbbf4de03f28ac0fe9a8925d5f4883 (diff) |
Add latest changes from gitlab-org/gitlab@master
225 files changed, 847 insertions, 2084 deletions
diff --git a/.gitlab/ci/build-images.gitlab-ci.yml b/.gitlab/ci/build-images.gitlab-ci.yml index 1361f1fe412..d4a9582ded3 100644 --- a/.gitlab/ci/build-images.gitlab-ci.yml +++ b/.gitlab/ci/build-images.gitlab-ci.yml @@ -34,7 +34,7 @@ build-gdk-image: - .base-image-build-buildx - .build-images:rules:build-gdk-image tags: - - high-cpu + - saas-linux-xlarge-amd64 stage: build-images needs: [] script: diff --git a/.gitlab/ci/qa-common/rules.gitlab-ci.yml b/.gitlab/ci/qa-common/rules.gitlab-ci.yml index 16440aa4cbc..c0a4e8d206f 100644 --- a/.gitlab/ci/qa-common/rules.gitlab-ci.yml +++ b/.gitlab/ci/qa-common/rules.gitlab-ci.yml @@ -43,6 +43,10 @@ .not-canonical-project: ¬-canonical-project if: '$CI_PROJECT_PATH != "gitlab-org/gitlab" && $CI_PROJECT_PATH != "gitlab-cn/gitlab"' +# If Schedule pipeline +.if-schedule-pipeline: &if-schedule-pipeline + if: '$CI_PIPELINE_SOURCE == "schedule"' + # Selective test execution against omnibus instance have following execution scenarios: # * only e2e spec files changed - runs only changed specs # * qa framework changes - runs full test suite @@ -149,6 +153,17 @@ when: never - !reference [.rules:test:qa, rules] +.rules:test:never-schedule-pipeline: + rules: + - <<: *if-schedule-pipeline + when: never + +.rules:test:gdk-load-balancer-changes: + rules: + - changes: + - ".gitlab/ci/test-on-gdk/**" + - "lib/gitlab/database/load_balancing/**/*" + .rules:test:qa-default-branch: rules: - *qa-run-all-e2e-label diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 3ccd5995531..9361563c1d9 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -923,16 +923,9 @@ - !reference [".qa:rules:package-and-test-never-run", rules] - <<: *if-default-branch-schedule-nightly # already executed in the 2-hourly schedule when: never - # Rebuild base only when relevant components change - - <<: *if-default-branch-refs - changes: *gdk-component-patterns - variables: - BUILD_GDK_BASE: "true" - <<: *if-default-branch-refs - <<: *if-merge-request changes: *gdk-component-patterns - variables: - BUILD_GDK_BASE: "true" # The rest are included to be consistent with .qa:rules:e2e:test-on-gdk - <<: *if-merge-request-targeting-stable-branch changes: *setup-test-env-patterns diff --git a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml index 8f60a8505f3..8e94338bb68 100644 --- a/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml +++ b/.gitlab/ci/test-on-gdk/main.gitlab-ci.yml @@ -146,9 +146,8 @@ gdk-qa-smoke-with-load-balancer: reports: dotenv: "" rules: - - changes: - - ".gitlab/ci/test-on-gdk/**" - - "lib/gitlab/database/load_balancing/**/*" + - !reference [".rules:test:never-schedule-pipeline", rules] + - !reference [".rules:test:gdk-load-balancer-changes", rules] allow_failure: true gdk-qa-reliable: @@ -177,9 +176,8 @@ gdk-qa-reliable-with-load-balancer: reports: dotenv: "" rules: - - changes: - - ".gitlab/ci/test-on-gdk/**" - - "lib/gitlab/database/load_balancing/**/*" + - !reference [".rules:test:never-schedule-pipeline", rules] + - !reference [".rules:test:gdk-load-balancer-changes", rules] allow_failure: true gdk-qa-non-blocking: diff --git a/app/assets/javascripts/ci/pipeline_details/components/jobs_shared/action_component.vue b/app/assets/javascripts/ci/common/private/job_action_component.vue index ffb6ab71b22..f649750ce8a 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/jobs_shared/action_component.vue +++ b/app/assets/javascripts/ci/common/private/job_action_component.vue @@ -5,7 +5,7 @@ import axios from '~/lib/utils/axios_utils'; import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; import { dasherize } from '~/lib/utils/text_utility'; import { __ } from '~/locale'; -import { reportToSentry } from '../../utils'; +import { reportToSentry } from '~/ci/utils'; /** * Renders either a cancel, retry or play icon button and handles the post request diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/links_layer.vue b/app/assets/javascripts/ci/common/private/job_links_layer.vue index ef24694e494..59260ca3f81 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/links_layer.vue +++ b/app/assets/javascripts/ci/common/private/job_links_layer.vue @@ -1,8 +1,8 @@ <script> import { memoize } from 'lodash'; -import { reportToSentry } from '../../utils'; -import { parseData } from '../parsing_utils'; -import LinksInner from './links_inner.vue'; +import { reportToSentry } from '~/ci/utils'; +import { parseData } from '~/ci/pipeline_details/utils/parsing_utils'; +import LinksInner from '~/ci/pipeline_details/graph/components/links_inner.vue'; const parseForLinksBare = (pipeline) => { const arrayOfJobs = pipeline.flatMap(({ groups }) => groups); diff --git a/app/assets/javascripts/ci/pipeline_details/components/jobs_shared/job_name_component.vue b/app/assets/javascripts/ci/common/private/job_name_component.vue index 1c7f5a7476d..1c7f5a7476d 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/jobs_shared/job_name_component.vue +++ b/app/assets/javascripts/ci/common/private/job_name_component.vue diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/mutations/retry_mr_failed_job.mutation.graphql b/app/assets/javascripts/ci/merge_requests/graphql/mutations/retry_mr_failed_job.mutation.graphql index 022d461dbec..022d461dbec 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/mutations/retry_mr_failed_job.mutation.graphql +++ b/app/assets/javascripts/ci/merge_requests/graphql/mutations/retry_mr_failed_job.mutation.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_merge_request_pipelines.query.graphql b/app/assets/javascripts/ci/merge_requests/graphql/queries/get_merge_request_pipelines.query.graphql index 8c235032e6c..8c235032e6c 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_merge_request_pipelines.query.graphql +++ b/app/assets/javascripts/ci/merge_requests/graphql/queries/get_merge_request_pipelines.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/components/dag/dag_annotations.vue b/app/assets/javascripts/ci/pipeline_details/dag/components/dag_annotations.vue index a1500166cdc..a1500166cdc 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/dag/dag_annotations.vue +++ b/app/assets/javascripts/ci/pipeline_details/dag/components/dag_annotations.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/dag/dag_graph.vue b/app/assets/javascripts/ci/pipeline_details/dag/components/dag_graph.vue index 7646c11773c..67e80145e83 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/dag/dag_graph.vue +++ b/app/assets/javascripts/ci/pipeline_details/dag/components/dag_graph.vue @@ -1,10 +1,10 @@ <script> import * as d3 from 'd3'; import { uniqueId } from 'lodash'; +import { getMaxNodes, removeOrphanNodes } from '~/ci/pipeline_details/utils/parsing_utils'; import { PARSE_FAILURE } from '../../constants'; -import { getMaxNodes, removeOrphanNodes } from '../parsing_utils'; -import { LINK_SELECTOR, NODE_SELECTOR, ADD_NOTE, REMOVE_NOTE, REPLACE_NOTES } from './constants'; -import { calculateClip, createLinkPath, createSankey, labelPosition } from './drawing_utils'; +import { LINK_SELECTOR, NODE_SELECTOR, ADD_NOTE, REMOVE_NOTE, REPLACE_NOTES } from '../constants'; +import { calculateClip, createLinkPath, createSankey, labelPosition } from '../drawing_utils'; import { currentIsLive, getLiveLinksAsDict, @@ -12,7 +12,7 @@ import { restoreLinks, toggleLinkHighlight, togglePathHighlights, -} from './interactions'; +} from '../interactions'; export default { viewOptions: { diff --git a/app/assets/javascripts/ci/pipeline_details/components/dag/constants.js b/app/assets/javascripts/ci/pipeline_details/dag/constants.js index cd89055737f..cd89055737f 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/dag/constants.js +++ b/app/assets/javascripts/ci/pipeline_details/dag/constants.js diff --git a/app/assets/javascripts/ci/pipeline_details/components/dag/dag.vue b/app/assets/javascripts/ci/pipeline_details/dag/dag.vue index afb5aa05098..5415340c956 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/dag/dag.vue +++ b/app/assets/javascripts/ci/pipeline_details/dag/dag.vue @@ -4,12 +4,17 @@ import { GlAlert, GlButton, GlEmptyState, GlLink, GlSprintf } from '@gitlab/ui'; import { isEmpty } from 'lodash'; import { fetchPolicies } from '~/lib/graphql'; import { __ } from '~/locale'; -import { DEFAULT, PARSE_FAILURE, LOAD_FAILURE, UNSUPPORTED_DATA } from '../../constants'; -import getDagVisData from '../../graphql/queries/get_dag_vis_data.query.graphql'; -import { parseData } from '../parsing_utils'; +import { + DEFAULT, + PARSE_FAILURE, + LOAD_FAILURE, + UNSUPPORTED_DATA, +} from '~/ci/pipeline_details/constants'; +import { parseData } from '~/ci/pipeline_details/utils/parsing_utils'; +import getDagVisData from './graphql/queries/get_dag_vis_data.query.graphql'; import { ADD_NOTE, REMOVE_NOTE, REPLACE_NOTES } from './constants'; -import DagAnnotations from './dag_annotations.vue'; -import DagGraph from './dag_graph.vue'; +import DagAnnotations from './components/dag_annotations.vue'; +import DagGraph from './components/dag_graph.vue'; export default { // eslint-disable-next-line @gitlab/require-i18n-strings diff --git a/app/assets/javascripts/ci/pipeline_details/components/dag/drawing_utils.js b/app/assets/javascripts/ci/pipeline_details/dag/drawing_utils.js index 3cd09d57ffb..3cd09d57ffb 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/dag/drawing_utils.js +++ b/app/assets/javascripts/ci/pipeline_details/dag/drawing_utils.js diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_dag_vis_data.query.graphql b/app/assets/javascripts/ci/pipeline_details/dag/graphql/queries/get_dag_vis_data.query.graphql index 2a0b13dd0cc..2a0b13dd0cc 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_dag_vis_data.query.graphql +++ b/app/assets/javascripts/ci/pipeline_details/dag/graphql/queries/get_dag_vis_data.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/components/dag/interactions.js b/app/assets/javascripts/ci/pipeline_details/dag/interactions.js index 69f36feeee4..69f36feeee4 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/dag/interactions.js +++ b/app/assets/javascripts/ci/pipeline_details/dag/interactions.js diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/api.js b/app/assets/javascripts/ci/pipeline_details/graph/api_utils.js index 0fe7d9ffda3..f9f47d1ea15 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/api.js +++ b/app/assets/javascripts/ci/pipeline_details/graph/api_utils.js @@ -1,5 +1,5 @@ import axios from '~/lib/utils/axios_utils'; -import { reportToSentry } from '../../utils'; +import { reportToSentry } from '~/ci/utils'; export const reportPerformance = (path, stats) => { // FIXME: https://gitlab.com/gitlab-org/gitlab/-/issues/330245 diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/graph_component.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/graph_component.vue index 49df71beeec..f098d790736 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/graph_component.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/graph_component.vue @@ -1,15 +1,15 @@ <script> -import { reportToSentry } from '../../utils'; -import LinkedGraphWrapper from '../graph_shared/linked_graph_wrapper.vue'; -import LinksLayer from '../graph_shared/links_layer.vue'; +import { reportToSentry } from '~/ci/utils'; import { generateColumnsFromLayersListMemoized, keepLatestDownstreamPipelines, -} from '../parsing_utils'; -import { DOWNSTREAM, MAIN, UPSTREAM, ONE_COL_WIDTH, STAGE_VIEW } from './constants'; +} from '~/ci/pipeline_details/utils/parsing_utils'; +import LinksLayer from '../../../common/private/job_links_layer.vue'; +import { DOWNSTREAM, MAIN, UPSTREAM, ONE_COL_WIDTH, STAGE_VIEW } from '../constants'; +import { validateConfigPaths } from '../utils'; +import LinkedGraphWrapper from './linked_graph_wrapper.vue'; import LinkedPipelinesColumn from './linked_pipelines_column.vue'; import StageColumnComponent from './stage_column_component.vue'; -import { validateConfigPaths } from './utils'; export default { name: 'PipelineGraph', diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/graph_view_selector.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/graph_view_selector.vue index 73143c981ed..fb7dcb300f1 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/graph_view_selector.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/graph_view_selector.vue @@ -1,7 +1,7 @@ <script> import { GlAlert, GlButton, GlButtonGroup, GlLoadingIcon, GlToggle } from '@gitlab/ui'; import { __, s__ } from '~/locale'; -import { STAGE_VIEW, LAYER_VIEW } from './constants'; +import { STAGE_VIEW, LAYER_VIEW } from '../constants'; export default { name: 'GraphViewSelector', diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/job_group_dropdown.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/job_group_dropdown.vue index d4852224df5..7538ad87af8 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/job_group_dropdown.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/job_group_dropdown.vue @@ -1,6 +1,6 @@ <script> -import { reportToSentry } from '../../utils'; -import { JOB_DROPDOWN, SINGLE_JOB } from './constants'; +import { reportToSentry } from '~/ci/utils'; +import { JOB_DROPDOWN, SINGLE_JOB } from '../constants'; import JobItem from './job_item.vue'; /** diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/job_item.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/job_item.vue index 22895a31082..bab05d0c232 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/job_item.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/job_item.vue @@ -1,14 +1,14 @@ <script> import { GlBadge, GlForm, GlFormCheckbox, GlLink, GlModal, GlTooltipDirective } from '@gitlab/ui'; +import { reportToSentry } from '~/ci/utils'; import delayedJobMixin from '~/jobs/mixins/delayed_job_mixin'; import { helpPagePath } from '~/helpers/help_page_helper'; import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; import { __, s__, sprintf } from '~/locale'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; -import { reportToSentry } from '../../utils'; -import ActionComponent from '../jobs_shared/action_component.vue'; -import JobNameComponent from '../jobs_shared/job_name_component.vue'; -import { BRIDGE_KIND, RETRY_ACTION_TITLE, SINGLE_JOB, SKIP_RETRY_MODAL_KEY } from './constants'; +import ActionComponent from '../../../common/private/job_action_component.vue'; +import JobNameComponent from '../../../common/private/job_name_component.vue'; +import { BRIDGE_KIND, RETRY_ACTION_TITLE, SINGLE_JOB, SKIP_RETRY_MODAL_KEY } from '../constants'; /** * Renders the badge for the pipeline graph and the job's dropdown. diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/linked_graph_wrapper.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/linked_graph_wrapper.vue index fb2280d971a..fb2280d971a 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/linked_graph_wrapper.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/linked_graph_wrapper.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/linked_pipeline.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/linked_pipeline.vue index 8aa49e03718..cc52ff57c13 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/linked_pipeline.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/linked_pipeline.vue @@ -14,8 +14,8 @@ import { __, sprintf } from '~/locale'; import CancelPipelineMutation from '~/ci/pipeline_details/graphql/mutations/cancel_pipeline.mutation.graphql'; import RetryPipelineMutation from '~/ci/pipeline_details/graphql/mutations/retry_pipeline.mutation.graphql'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; -import { reportToSentry } from '../../utils'; -import { ACTION_FAILURE, DOWNSTREAM, UPSTREAM } from './constants'; +import { reportToSentry } from '~/ci/utils'; +import { ACTION_FAILURE, DOWNSTREAM, UPSTREAM } from '../constants'; export default { directives: { diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/linked_pipelines_column.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/linked_pipelines_column.vue index 02e426064c9..2de7e43c9b1 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/linked_pipelines_column.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/linked_pipelines_column.vue @@ -1,9 +1,8 @@ <script> import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.query.graphql'; +import { reportToSentry } from '~/ci/utils'; import { LOAD_FAILURE } from '../../constants'; -import { reportToSentry } from '../../utils'; -import { ONE_COL_WIDTH, UPSTREAM, LAYER_VIEW, STAGE_VIEW } from './constants'; -import LinkedPipeline from './linked_pipeline.vue'; +import { ONE_COL_WIDTH, UPSTREAM, LAYER_VIEW, STAGE_VIEW } from '../constants'; import { calculatePipelineLayersInfo, getQueryHeaders, @@ -11,7 +10,8 @@ import { toggleQueryPollingByVisibility, unwrapPipelineData, validateConfigPaths, -} from './utils'; +} from '../utils'; +import LinkedPipeline from './linked_pipeline.vue'; export default { components: { diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/links_inner.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/links_inner.vue index 1189c2ebad8..09285525c38 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/links_inner.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/links_inner.vue @@ -1,9 +1,10 @@ <script> import { isEmpty } from 'lodash'; +import { STAGE_VIEW } from '~/ci/pipeline_details/graph/constants'; +import { createJobsHash, generateJobNeedsDict } from '~/ci/pipeline_details/utils'; +import { reportToSentry } from '~/ci/utils'; import { DRAW_FAILURE } from '../../constants'; -import { createJobsHash, generateJobNeedsDict, reportToSentry } from '../../utils'; -import { STAGE_VIEW } from '../graph/constants'; -import { generateLinksData } from './drawing_utils'; +import { generateLinksData } from '../../utils/drawing_utils'; export default { name: 'LinksInner', diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/main_graph_wrapper.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/root_graph_layout.vue index bcd7705669e..bcd7705669e 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/main_graph_wrapper.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/root_graph_layout.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/stage_column_component.vue b/app/assets/javascripts/ci/pipeline_details/graph/components/stage_column_component.vue index ffd0fec2ca8..1401bdba5ca 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/stage_column_component.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/components/stage_column_component.vue @@ -1,9 +1,9 @@ <script> import { escape, isEmpty } from 'lodash'; +import ActionComponent from '~/ci/common/private/job_action_component.vue'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import { reportToSentry } from '../../utils'; -import MainGraphWrapper from '../graph_shared/main_graph_wrapper.vue'; -import ActionComponent from '../jobs_shared/action_component.vue'; +import { reportToSentry } from '~/ci/utils'; +import RootGraphLayout from './root_graph_layout.vue'; import JobGroupDropdown from './job_group_dropdown.vue'; import JobItem from './job_item.vue'; @@ -12,7 +12,7 @@ export default { ActionComponent, JobGroupDropdown, JobItem, - MainGraphWrapper, + RootGraphLayout, }, mixins: [glFeatureFlagMixin()], props: { @@ -135,7 +135,7 @@ export default { }; </script> <template> - <main-graph-wrapper :class="columnSpacingClass" data-testid="stage-column"> + <root-graph-layout :class="columnSpacingClass" data-testid="stage-column"> <template #stages> <div data-testid="stage-column-title" @@ -192,5 +192,5 @@ export default { </div> </div> </template> - </main-graph-wrapper> + </root-graph-layout> </template> diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/constants.js b/app/assets/javascripts/ci/pipeline_details/graph/constants.js index e650a48bc2a..e650a48bc2a 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/constants.js +++ b/app/assets/javascripts/ci/pipeline_details/graph/constants.js diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/graph_component_wrapper.vue b/app/assets/javascripts/ci/pipeline_details/graph/graph_component_wrapper.vue index b2cef7c37b9..bd7325f7925 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/graph_component_wrapper.vue +++ b/app/assets/javascripts/ci/pipeline_details/graph/graph_component_wrapper.vue @@ -4,10 +4,10 @@ import getPipelineDetails from 'shared_queries/pipelines/get_pipeline_details.qu import getUserCallouts from '~/graphql_shared/queries/get_user_callouts.query.graphql'; import { __, s__ } from '~/locale'; import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue'; -import { DEFAULT, DRAW_FAILURE, LOAD_FAILURE } from '../../constants'; -import DismissPipelineGraphCallout from '../../graphql/mutations/dismiss_pipeline_notification.graphql'; -import getPipelineQuery from '../../graphql/queries/get_pipeline_header_data.query.graphql'; -import { reportToSentry, reportMessageToSentry } from '../../utils'; +import { DEFAULT, DRAW_FAILURE, LOAD_FAILURE } from '~/ci/pipeline_details/constants'; +import getPipelineQuery from '~/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql'; +import { reportToSentry, reportMessageToSentry } from '~/ci/utils'; +import DismissPipelineGraphCallout from './graphql/mutations/dismiss_pipeline_notification.graphql'; import { ACTION_FAILURE, IID_FAILURE, @@ -16,8 +16,8 @@ import { STAGE_VIEW, VIEW_TYPE_KEY, } from './constants'; -import PipelineGraph from './graph_component.vue'; -import GraphViewSelector from './graph_view_selector.vue'; +import PipelineGraph from './components/graph_component.vue'; +import GraphViewSelector from './components/graph_view_selector.vue'; import { calculatePipelineLayersInfo, getQueryHeaders, diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/mutations/dismiss_pipeline_notification.graphql b/app/assets/javascripts/ci/pipeline_details/graph/graphql/mutations/dismiss_pipeline_notification.graphql index e8af1db9592..e8af1db9592 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/mutations/dismiss_pipeline_notification.graphql +++ b/app/assets/javascripts/ci/pipeline_details/graph/graphql/mutations/dismiss_pipeline_notification.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/perf_utils.js b/app/assets/javascripts/ci/pipeline_details/graph/perf_utils.js index 3737a209f5c..511dcbe6889 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/perf_utils.js +++ b/app/assets/javascripts/ci/pipeline_details/graph/perf_utils.js @@ -8,7 +8,7 @@ import { } from '~/performance/constants'; import { performanceMarkAndMeasure } from '~/performance/utils'; -import { reportPerformance } from '../graph_shared/api'; +import { reportPerformance } from './api_utils'; export const beginPerfMeasure = () => { performanceMarkAndMeasure({ mark: PIPELINES_DETAIL_LINKS_MARK_CALCULATE_START }); diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph/utils.js b/app/assets/javascripts/ci/pipeline_details/graph/utils.js index c888c8a5537..9a8d6440d4d 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph/utils.js +++ b/app/assets/javascripts/ci/pipeline_details/graph/utils.js @@ -1,8 +1,9 @@ import { isEmpty } from 'lodash'; import { getIdFromGraphQLId, etagQueryHeaders } from '~/graphql_shared/utils'; -import { reportToSentry } from '../../utils'; -import { listByLayers } from '../parsing_utils'; -import { unwrapStagesWithNeedsAndLookup } from '../unwrapping_utils'; +import { reportToSentry } from '~/ci/utils'; + +import { listByLayers } from '~/ci/pipeline_details/utils/parsing_utils'; +import { unwrapStagesWithNeedsAndLookup } from '~/ci/pipeline_details/utils/unwrapping_utils'; import { beginPerfMeasure, finishPerfMeasureAndSend } from './perf_utils'; export { toggleQueryPollingByVisibility } from '~/graphql_shared/utils'; diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_header_data.query.graphql b/app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql index eb5643126a2..eb5643126a2 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_header_data.query.graphql +++ b/app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_details_header.vue b/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue index 98798d3b8ad..4a15f5b581a 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_details_header.vue +++ b/app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue @@ -30,8 +30,8 @@ import { import cancelPipelineMutation from '../graphql/mutations/cancel_pipeline.mutation.graphql'; import deletePipelineMutation from '../graphql/mutations/delete_pipeline.mutation.graphql'; import retryPipelineMutation from '../graphql/mutations/retry_pipeline.mutation.graphql'; -import getPipelineQuery from '../graphql/queries/get_pipeline_header_data.query.graphql'; -import { getQueryHeaders } from './graph/utils'; +import { getQueryHeaders } from '../graph/utils'; +import getPipelineQuery from './graphql/queries/get_pipeline_header_data.query.graphql'; const DELETE_MODAL_ID = 'pipeline-delete-modal'; const POLL_INTERVAL = 10000; diff --git a/app/assets/javascripts/ci/pipeline_details/components/jobs/failed_jobs_table.vue b/app/assets/javascripts/ci/pipeline_details/jobs/components/failed_jobs_table.vue index f84ae13180d..98431bd1fcc 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/jobs/failed_jobs_table.vue +++ b/app/assets/javascripts/ci/pipeline_details/jobs/components/failed_jobs_table.vue @@ -6,7 +6,7 @@ import { createAlert } from '~/alert'; import Tracking from '~/tracking'; import { redirectTo } from '~/lib/utils/url_utility'; // eslint-disable-line import/no-deprecated import CiBadgeLink from '~/vue_shared/components/ci_badge_link.vue'; -import RetryFailedJobMutation from '../../graphql/mutations/retry_failed_job.mutation.graphql'; +import RetryFailedJobMutation from '../graphql/mutations/retry_failed_job.mutation.graphql'; import { DEFAULT_FIELDS, TRACKING_CATEGORIES } from '../../constants'; export default { diff --git a/app/assets/javascripts/ci/pipeline_details/components/jobs/failed_jobs_app.vue b/app/assets/javascripts/ci/pipeline_details/jobs/failed_jobs_app.vue index c24862f828b..b946a40e590 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/jobs/failed_jobs_app.vue +++ b/app/assets/javascripts/ci/pipeline_details/jobs/failed_jobs_app.vue @@ -2,8 +2,8 @@ import { GlLoadingIcon } from '@gitlab/ui'; import { s__ } from '~/locale'; import { createAlert } from '~/alert'; -import GetFailedJobsQuery from '../../graphql/queries/get_failed_jobs.query.graphql'; -import FailedJobsTable from './failed_jobs_table.vue'; +import GetFailedJobsQuery from './graphql/queries/get_failed_jobs.query.graphql'; +import FailedJobsTable from './components/failed_jobs_table.vue'; export default { components: { diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/mutations/retry_failed_job.mutation.graphql b/app/assets/javascripts/ci/pipeline_details/jobs/graphql/mutations/retry_failed_job.mutation.graphql index 1955cc9b0ac..1955cc9b0ac 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/mutations/retry_failed_job.mutation.graphql +++ b/app/assets/javascripts/ci/pipeline_details/jobs/graphql/mutations/retry_failed_job.mutation.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_failed_jobs.query.graphql b/app/assets/javascripts/ci/pipeline_details/jobs/graphql/queries/get_failed_jobs.query.graphql index c1f994ece24..c1f994ece24 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_failed_jobs.query.graphql +++ b/app/assets/javascripts/ci/pipeline_details/jobs/graphql/queries/get_failed_jobs.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_jobs.query.graphql b/app/assets/javascripts/ci/pipeline_details/jobs/graphql/queries/get_pipeline_jobs.query.graphql index b0f875160d4..b0f875160d4 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_jobs.query.graphql +++ b/app/assets/javascripts/ci/pipeline_details/jobs/graphql/queries/get_pipeline_jobs.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/components/jobs/jobs_app.vue b/app/assets/javascripts/ci/pipeline_details/jobs/jobs_app.vue index 61748860983..7a09dd27ad8 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/jobs/jobs_app.vue +++ b/app/assets/javascripts/ci/pipeline_details/jobs/jobs_app.vue @@ -6,7 +6,7 @@ import { __ } from '~/locale'; import eventHub from '~/jobs/components/table/event_hub'; import JobsTable from '~/jobs/components/table/jobs_table.vue'; import { JOBS_TAB_FIELDS } from '~/jobs/components/table/constants'; -import getPipelineJobs from '../../graphql/queries/get_pipeline_jobs.query.graphql'; +import getPipelineJobs from './graphql/queries/get_pipeline_jobs.query.graphql'; export default { fields: JOBS_TAB_FIELDS, diff --git a/app/assets/javascripts/ci/pipeline_details/mixins/stage_column_mixin.js b/app/assets/javascripts/ci/pipeline_details/mixins/stage_column_mixin.js deleted file mode 100644 index 578ff498358..00000000000 --- a/app/assets/javascripts/ci/pipeline_details/mixins/stage_column_mixin.js +++ /dev/null @@ -1,14 +0,0 @@ -export default { - props: { - hasUpstream: { - type: Boolean, - required: false, - default: false, - }, - }, - methods: { - buildConnnectorClass(index) { - return index === 0 && (!this.isFirstColumn || this.hasUpstream) ? 'left-connector' : ''; - }, - }, -}; diff --git a/app/assets/javascripts/ci/pipeline_details/pipeline_details_header.js b/app/assets/javascripts/ci/pipeline_details/pipeline_details_header.js index c79aaef23e8..067ec3f305e 100644 --- a/app/assets/javascripts/ci/pipeline_details/pipeline_details_header.js +++ b/app/assets/javascripts/ci/pipeline_details/pipeline_details_header.js @@ -1,7 +1,7 @@ import Vue from 'vue'; import VueApollo from 'vue-apollo'; import { parseBoolean } from '~/lib/utils/common_utils'; -import PipelineDetailsHeader from './components/pipeline_details_header.vue'; +import PipelineDetailsHeader from './header/pipeline_details_header.vue'; Vue.use(VueApollo); diff --git a/app/assets/javascripts/ci/pipeline_details/pipeline_tabs.js b/app/assets/javascripts/ci/pipeline_details/pipeline_tabs.js index 8d4c9d1220a..0ca9a68e70d 100644 --- a/app/assets/javascripts/ci/pipeline_details/pipeline_tabs.js +++ b/app/assets/javascripts/ci/pipeline_details/pipeline_tabs.js @@ -4,10 +4,11 @@ import VueRouter from 'vue-router'; import Vuex from 'vuex'; import VueApollo from 'vue-apollo'; import { GlToast } from '@gitlab/ui'; -import PipelineTabs from 'ee_else_ce/ci/pipeline_details/components/pipeline_tabs.vue'; +import PipelineTabs from 'ee_else_ce/ci/pipeline_details/tabs/pipeline_tabs.vue'; +import { reportToSentry } from '~/ci/utils'; import { parseBoolean } from '~/lib/utils/common_utils'; import createTestReportsStore from './stores/test_reports'; -import { getPipelineDefaultTab, reportToSentry } from './utils'; +import { getPipelineDefaultTab } from './utils'; Vue.use(GlToast); Vue.use(VueApollo); diff --git a/app/assets/javascripts/ci/pipeline_details/pipelines_index.js b/app/assets/javascripts/ci/pipeline_details/pipelines_index.js index 20fd0915e28..86b565d7821 100644 --- a/app/assets/javascripts/ci/pipeline_details/pipelines_index.js +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_index.js @@ -10,7 +10,7 @@ import { import { doesHashExistInUrl } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; import Translate from '~/vue_shared/translate'; -import Pipelines from './components/pipelines_list/pipelines.vue'; +import Pipelines from './pipelines_list/pipelines.vue'; import PipelinesStore from './stores/pipelines_store'; Vue.use(Translate); diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/nav_controls.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/nav_controls.vue index 235126fea0c..235126fea0c 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/nav_controls.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/nav_controls.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_labels.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_labels.vue index f8b4299485e..082ede60244 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_labels.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_labels.vue @@ -1,7 +1,7 @@ <script> import { GlLink, GlPopover, GlSprintf, GlTooltipDirective, GlBadge } from '@gitlab/ui'; import { helpPagePath } from '~/helpers/help_page_helper'; -import { SCHEDULE_ORIGIN } from '../../constants'; +import { SCHEDULE_ORIGIN } from '~/ci/pipeline_details/constants'; export default { components: { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_multi_actions.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_multi_actions.vue index 747d94d92f2..747d94d92f2 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_multi_actions.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_multi_actions.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_operations.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_operations.vue index caeee7edefe..8f275bee91f 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_operations.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_operations.vue @@ -1,8 +1,8 @@ <script> import { GlButton, GlTooltipDirective, GlModalDirective } from '@gitlab/ui'; import Tracking from '~/tracking'; -import eventHub from '../../event_hub'; import { BUTTON_TOOLTIP_RETRY, BUTTON_TOOLTIP_CANCEL, TRACKING_CATEGORIES } from '../../constants'; +import eventHub from '../../event_hub'; import PipelineMultiActions from './pipeline_multi_actions.vue'; import PipelinesManualActions from './pipelines_manual_actions.vue'; diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_stop_modal.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_stop_modal.vue index 9f38be668f2..9f38be668f2 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_stop_modal.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_stop_modal.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_triggerer.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_triggerer.vue index 2a73795db0a..2a73795db0a 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_triggerer.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_triggerer.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_url.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_url.vue index ff1a01d5037..ff1a01d5037 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_url.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_url.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_artifacts.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_artifacts.vue index 4452db64b0a..4452db64b0a 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_artifacts.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_artifacts.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_filtered_search.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_filtered_search.vue index 7dc1e60610e..6aadb6b73c8 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_filtered_search.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_filtered_search.vue @@ -5,11 +5,11 @@ import { s__ } from '~/locale'; import Tracking from '~/tracking'; import { OPERATORS_IS } from '~/vue_shared/components/filtered_search_bar/constants'; import { TRACKING_CATEGORIES } from '../../constants'; -import PipelineBranchNameToken from './tokens/pipeline_branch_name_token.vue'; -import PipelineSourceToken from './tokens/pipeline_source_token.vue'; -import PipelineStatusToken from './tokens/pipeline_status_token.vue'; -import PipelineTagNameToken from './tokens/pipeline_tag_name_token.vue'; -import PipelineTriggerAuthorToken from './tokens/pipeline_trigger_author_token.vue'; +import PipelineBranchNameToken from '../tokens/pipeline_branch_name_token.vue'; +import PipelineSourceToken from '../tokens/pipeline_source_token.vue'; +import PipelineStatusToken from '../tokens/pipeline_status_token.vue'; +import PipelineTagNameToken from '../tokens/pipeline_tag_name_token.vue'; +import PipelineTriggerAuthorToken from '../tokens/pipeline_trigger_author_token.vue'; export default { userType: 'username', diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_manual_actions.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_manual_actions.vue index 262e82677a7..4dacd474bde 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_manual_actions.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_manual_actions.vue @@ -8,7 +8,7 @@ import Tracking from '~/tracking'; import GlCountdown from '~/vue_shared/components/gl_countdown.vue'; import eventHub from '../../event_hub'; import { TRACKING_CATEGORIES } from '../../constants'; -import getPipelineActionsQuery from '../../graphql/queries/get_pipeline_actions.query.graphql'; +import getPipelineActionsQuery from '../graphql/queries/get_pipeline_actions.query.graphql'; export default { name: 'PipelinesManualActions', diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_status_badge.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_status_badge.vue index 050dd486cbd..050dd486cbd 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_status_badge.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_status_badge.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_table.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_table.vue index 2dadc78b904..9784186ac67 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_table.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_table.vue @@ -4,9 +4,9 @@ import { cleanLeadingSeparator } from '~/lib/utils/url_utility'; import { s__, __ } from '~/locale'; import Tracking from '~/tracking'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; -import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/components/parsing_utils'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; -import PipelineFailedJobsWidget from '~/ci/pipeline_details/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue'; +import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/utils/parsing_utils'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import PipelineFailedJobsWidget from '~/ci/pipeline_details/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue'; import eventHub from '../../event_hub'; import { TRACKING_CATEGORIES } from '../../constants'; import PipelineOperations from './pipeline_operations.vue'; diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/time_ago.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/time_ago.vue index 70343544638..70343544638 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/time_ago.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/components/time_ago.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/empty_state/ci_templates.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/empty_state/ci_templates.vue index 439dc0eb253..439dc0eb253 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/empty_state/ci_templates.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/empty_state/ci_templates.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/empty_state/ios_templates.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/empty_state/ios_templates.vue index 1a2021df9c8..1a2021df9c8 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/empty_state/ios_templates.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/empty_state/ios_templates.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/empty_state.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/empty_state/no_ci_empty_state.vue index 3bbdfc73e1b..6e7d6908cd9 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/empty_state.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/empty_state/no_ci_empty_state.vue @@ -2,8 +2,8 @@ import { GlEmptyState } from '@gitlab/ui'; import { s__ } from '~/locale'; import GitlabExperiment from '~/experimentation/components/gitlab_experiment.vue'; -import PipelinesCiTemplates from './empty_state/pipelines_ci_templates.vue'; -import IosTemplates from './empty_state/ios_templates.vue'; +import PipelinesCiTemplates from './pipelines_ci_templates.vue'; +import IosTemplates from './ios_templates.vue'; export default { i18n: { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/empty_state/pipelines_ci_templates.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/empty_state/pipelines_ci_templates.vue index a6297213402..a6297213402 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/empty_state/pipelines_ci_templates.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/empty_state/pipelines_ci_templates.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/failure_widget/failed_job_details.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/failure_widget/failed_job_details.vue index edf397f4797..82f1d57912a 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/failure_widget/failed_job_details.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/failure_widget/failed_job_details.vue @@ -5,8 +5,8 @@ import { __, s__, sprintf } from '~/locale'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; import SafeHtml from '~/vue_shared/directives/safe_html'; -import { BRIDGE_KIND } from '~/ci/pipeline_details/components/graph/constants'; -import RetryMrFailedJobMutation from '../../../graphql/mutations/retry_mr_failed_job.mutation.graphql'; +import { BRIDGE_KIND } from '~/ci/pipeline_details/graph/constants'; +import RetryMrFailedJobMutation from '~/ci/merge_requests/graphql/mutations/retry_mr_failed_job.mutation.graphql'; export default { components: { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/failure_widget/failed_jobs_list.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/failure_widget/failed_jobs_list.vue index 343036d2049..375f72bb72f 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/failure_widget/failed_jobs_list.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/failure_widget/failed_jobs_list.vue @@ -2,9 +2,9 @@ import { GlLoadingIcon } from '@gitlab/ui'; import { createAlert } from '~/alert'; import { __, s__, sprintf } from '~/locale'; -import { getQueryHeaders } from '~/ci/pipeline_details/components/graph/utils'; +import { getQueryHeaders } from '~/ci/pipeline_details/graph/utils'; import { graphqlEtagPipelinePath } from '~/ci/pipeline_details/utils'; -import getPipelineFailedJobs from '../../../graphql/queries/get_pipeline_failed_jobs.query.graphql'; +import getPipelineFailedJobs from '~/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_failed_jobs.query.graphql'; import { sortJobsByStatus } from './utils'; import FailedJobDetails from './failed_job_details.vue'; diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue index c01037e9791..c01037e9791 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/failure_widget/utils.js b/app/assets/javascripts/ci/pipeline_details/pipelines_list/failure_widget/utils.js index 3f395fff7e0..3f395fff7e0 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/failure_widget/utils.js +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/failure_widget/utils.js diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_actions.query.graphql b/app/assets/javascripts/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_actions.query.graphql index d1878c01e91..d1878c01e91 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_actions.query.graphql +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_actions.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_failed_jobs.query.graphql b/app/assets/javascripts/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_failed_jobs.query.graphql index 6b553866f63..6b553866f63 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_failed_jobs.query.graphql +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_failed_jobs.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_failed_jobs_count.query.graphql b/app/assets/javascripts/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_failed_jobs_count.query.graphql index b70e95deab6..b70e95deab6 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_failed_jobs_count.query.graphql +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_failed_jobs_count.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/pipelines.vue index 574d291a767..26db10505ef 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/pipelines.vue @@ -17,19 +17,19 @@ import { FILTER_TAG_IDENTIFIER, PipelineKeyOptions, TRACKING_CATEGORIES, -} from '../../constants'; -import PipelinesMixin from '../../mixins/pipelines_mixin'; -import PipelinesService from '../../services/pipelines_service'; -import { validateParams } from '../../utils'; -import EmptyState from './empty_state.vue'; -import NavigationControls from './nav_controls.vue'; -import PipelinesFilteredSearch from './pipelines_filtered_search.vue'; -import PipelinesTableComponent from './pipelines_table.vue'; +} from '../constants'; +import PipelinesMixin from '../mixins/pipelines_mixin'; +import PipelinesService from '../services/pipelines_service'; +import { validateParams } from '../utils'; +import NoCiEmptyState from './empty_state/no_ci_empty_state.vue'; +import NavigationControls from './components/nav_controls.vue'; +import PipelinesFilteredSearch from './components/pipelines_filtered_search.vue'; +import PipelinesTableComponent from './components/pipelines_table.vue'; export default { PipelineKeyOptions, components: { - EmptyState, + NoCiEmptyState, GlCollapsibleListbox, GlEmptyState, GlIcon, @@ -409,7 +409,7 @@ export default { class="prepend-top-20" /> - <empty-state + <no-ci-empty-state v-else-if="stateToRender === $options.stateMap.emptyState" :empty-state-svg-path="emptyStateSvgPath" :can-set-ci="canCreatePipeline" diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/constants.js b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/constants.js index d8f15cfde91..d8f15cfde91 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/constants.js +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/constants.js diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_branch_name_token.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_branch_name_token.vue index 81f46d5f2f9..5c2c1aa03d5 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_branch_name_token.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_branch_name_token.vue @@ -3,7 +3,7 @@ import { GlFilteredSearchToken, GlFilteredSearchSuggestion, GlLoadingIcon } from import { debounce } from 'lodash'; import Api from '~/api'; import { createAlert } from '~/alert'; -import { FETCH_BRANCH_ERROR_MESSAGE, FILTER_PIPELINES_SEARCH_DELAY } from '../../../constants'; +import { FETCH_BRANCH_ERROR_MESSAGE, FILTER_PIPELINES_SEARCH_DELAY } from '../../constants'; export default { components: { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_source_token.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_source_token.vue index 28c2e28dd91..03d9e6478ac 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_source_token.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_source_token.vue @@ -1,6 +1,6 @@ <script> import { GlFilteredSearchToken, GlFilteredSearchSuggestion } from '@gitlab/ui'; -import { PIPELINE_SOURCES } from 'ee_else_ce/ci/pipeline_details/components/pipelines_list/tokens/constants'; +import { PIPELINE_SOURCES } from 'ee_else_ce/ci/pipeline_details/pipelines_list/tokens/constants'; export default { PIPELINE_SOURCES, diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_status_token.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_status_token.vue index 020a08b8cee..020a08b8cee 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_status_token.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_status_token.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_tag_name_token.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_tag_name_token.vue index b32f5de2d7e..ceb6176df3d 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_tag_name_token.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_tag_name_token.vue @@ -3,7 +3,7 @@ import { GlFilteredSearchToken, GlFilteredSearchSuggestion, GlLoadingIcon } from import { debounce } from 'lodash'; import Api from '~/api'; import { createAlert } from '~/alert'; -import { FETCH_TAG_ERROR_MESSAGE, FILTER_PIPELINES_SEARCH_DELAY } from '../../../constants'; +import { FETCH_TAG_ERROR_MESSAGE, FILTER_PIPELINES_SEARCH_DELAY } from '../../constants'; export default { components: { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_trigger_author_token.vue b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_trigger_author_token.vue index a89354c671a..8c516cc8cb3 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipelines_list/tokens/pipeline_trigger_author_token.vue +++ b/app/assets/javascripts/ci/pipeline_details/pipelines_list/tokens/pipeline_trigger_author_token.vue @@ -13,7 +13,7 @@ import { ANY_TRIGGER_AUTHOR, FETCH_AUTHOR_ERROR_MESSAGE, FILTER_PIPELINES_SEARCH_DELAY, -} from '../../../constants'; +} from '../../constants'; export default { anyTriggerAuthor: ANY_TRIGGER_AUTHOR, diff --git a/app/assets/javascripts/ci/pipeline_details/routes.js b/app/assets/javascripts/ci/pipeline_details/routes.js index 0e1414ec390..84207f3ab0c 100644 --- a/app/assets/javascripts/ci/pipeline_details/routes.js +++ b/app/assets/javascripts/ci/pipeline_details/routes.js @@ -1,8 +1,8 @@ -import PipelineGraphWrapper from './components/graph/graph_component_wrapper.vue'; -import Dag from './components/dag/dag.vue'; -import FailedJobsApp from './components/jobs/failed_jobs_app.vue'; -import JobsApp from './components/jobs/jobs_app.vue'; -import TestReports from './components/test_reports/test_reports.vue'; +import PipelineGraphWrapper from './graph/graph_component_wrapper.vue'; +import Dag from './dag/dag.vue'; +import FailedJobsApp from './jobs/failed_jobs_app.vue'; +import JobsApp from './jobs/jobs_app.vue'; +import TestReports from './test_reports/test_reports.vue'; import { pipelineTabName, needsTabName, diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_tabs.vue b/app/assets/javascripts/ci/pipeline_details/tabs/pipeline_tabs.vue index 35dde6379dd..35dde6379dd 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_tabs.vue +++ b/app/assets/javascripts/ci/pipeline_details/tabs/pipeline_tabs.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/test_reports/empty_state.vue b/app/assets/javascripts/ci/pipeline_details/test_reports/empty_state.vue index 3e7827dc416..3e7827dc416 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/test_reports/empty_state.vue +++ b/app/assets/javascripts/ci/pipeline_details/test_reports/empty_state.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_case_details.vue b/app/assets/javascripts/ci/pipeline_details/test_reports/test_case_details.vue index 3e6faa6b346..3e6faa6b346 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_case_details.vue +++ b/app/assets/javascripts/ci/pipeline_details/test_reports/test_case_details.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_reports.vue b/app/assets/javascripts/ci/pipeline_details/test_reports/test_reports.vue index a7737d33285..a7737d33285 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_reports.vue +++ b/app/assets/javascripts/ci/pipeline_details/test_reports/test_reports.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_suite_table.vue b/app/assets/javascripts/ci/pipeline_details/test_reports/test_suite_table.vue index d8af926a796..d8af926a796 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_suite_table.vue +++ b/app/assets/javascripts/ci/pipeline_details/test_reports/test_suite_table.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_summary.vue b/app/assets/javascripts/ci/pipeline_details/test_reports/test_summary.vue index 6b723ad5481..f6090678ca4 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_summary.vue +++ b/app/assets/javascripts/ci/pipeline_details/test_reports/test_summary.vue @@ -1,7 +1,7 @@ <script> import { GlButton, GlProgressBar } from '@gitlab/ui'; import { __ } from '~/locale'; -import { formattedTime } from '../../stores/test_reports/utils'; +import { formattedTime } from '../stores/test_reports/utils'; export default { name: 'TestSummary', diff --git a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_summary_table.vue b/app/assets/javascripts/ci/pipeline_details/test_reports/test_summary_table.vue index 9141947ea04..9141947ea04 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/test_reports/test_summary_table.vue +++ b/app/assets/javascripts/ci/pipeline_details/test_reports/test_summary_table.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/drawing_utils.js b/app/assets/javascripts/ci/pipeline_details/utils/drawing_utils.js index d6d9ea94c13..d6d9ea94c13 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/graph_shared/drawing_utils.js +++ b/app/assets/javascripts/ci/pipeline_details/utils/drawing_utils.js diff --git a/app/assets/javascripts/ci/pipeline_details/utils.js b/app/assets/javascripts/ci/pipeline_details/utils/index.js index f030ca943fd..9109342707e 100644 --- a/app/assets/javascripts/ci/pipeline_details/utils.js +++ b/app/assets/javascripts/ci/pipeline_details/utils/index.js @@ -1,4 +1,3 @@ -import * as Sentry from '@sentry/browser'; import { pickBy } from 'lodash'; import { parseUrlPathname } from '~/lib/utils/url_utility'; import { @@ -6,7 +5,7 @@ import { SUPPORTED_FILTER_PARAMETERS, validPipelineTabNames, pipelineTabName, -} from './constants'; +} from '../constants'; /* The following functions are the main engine in transforming the data as received from the endpoint into the format the d3 graph expects. @@ -128,22 +127,6 @@ export const generateJobNeedsDict = (jobs = {}) => { }, {}); }; -export const reportToSentry = (component, failureType) => { - Sentry.withScope((scope) => { - scope.setTag('component', component); - Sentry.captureException(failureType); - }); -}; - -export const reportMessageToSentry = (component, message, context) => { - Sentry.withScope((scope) => { - // eslint-disable-next-line @gitlab/require-i18n-strings - scope.setContext('Vue data', context); - scope.setTag('component', component); - Sentry.captureMessage(message); - }); -}; - export const getPipelineDefaultTab = (url) => { const strippedUrl = parseUrlPathname(url); const regexp = /\w*$/; diff --git a/app/assets/javascripts/ci/pipeline_details/components/parsing_utils.js b/app/assets/javascripts/ci/pipeline_details/utils/parsing_utils.js index e158f8809b5..cfe488b7d14 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/parsing_utils.js +++ b/app/assets/javascripts/ci/pipeline_details/utils/parsing_utils.js @@ -1,7 +1,7 @@ import { memoize } from 'lodash'; -import { createNodeDict } from '../utils'; import { EXPLICIT_NEEDS_PROPERTY, NEEDS_PROPERTY } from '../constants'; -import { createSankey } from './dag/drawing_utils'; +import { createSankey } from '../dag/drawing_utils'; +import { createNodeDict } from './index'; /* A peformant alternative to lodash's isEqual. Because findIndex always finds diff --git a/app/assets/javascripts/ci/pipeline_details/components/unwrapping_utils.js b/app/assets/javascripts/ci/pipeline_details/utils/unwrapping_utils.js index d42a11c3aba..7ac813bd527 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/unwrapping_utils.js +++ b/app/assets/javascripts/ci/pipeline_details/utils/unwrapping_utils.js @@ -1,4 +1,4 @@ -import { reportToSentry } from '../utils'; +import { reportToSentry } from '~/ci/utils'; import { EXPLICIT_NEEDS_PROPERTY, NEEDS_PROPERTY } from '../constants'; const unwrapGroups = (stages) => { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_graph/job_pill.vue b/app/assets/javascripts/ci/pipeline_editor/components/graph/job_pill.vue index 3f1d7255a2b..3f1d7255a2b 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_graph/job_pill.vue +++ b/app/assets/javascripts/ci/pipeline_editor/components/graph/job_pill.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_graph/pipeline_graph.vue b/app/assets/javascripts/ci/pipeline_editor/components/graph/pipeline_graph.vue index 64210576b29..eb906cfc486 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_graph/pipeline_graph.vue +++ b/app/assets/javascripts/ci/pipeline_editor/components/graph/pipeline_graph.vue @@ -1,8 +1,8 @@ <script> import { GlAlert } from '@gitlab/ui'; import { __ } from '~/locale'; -import { DRAW_FAILURE, DEFAULT } from '../../constants'; -import LinksLayer from '../graph_shared/links_layer.vue'; +import { DRAW_FAILURE, DEFAULT } from '~/ci/pipeline_details/constants'; +import LinksLayer from '~/ci/common/private/job_links_layer.vue'; import JobPill from './job_pill.vue'; import StageName from './stage_name.vue'; diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_graph/stage_name.vue b/app/assets/javascripts/ci/pipeline_editor/components/graph/stage_name.vue index 600832b7633..600832b7633 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_graph/stage_name.vue +++ b/app/assets/javascripts/ci/pipeline_editor/components/graph/stage_name.vue diff --git a/app/assets/javascripts/ci/pipeline_editor/components/header/pipeline_editor_mini_graph.vue b/app/assets/javascripts/ci/pipeline_editor/components/header/pipeline_editor_mini_graph.vue index d1c9439e4cd..f00098105d3 100644 --- a/app/assets/javascripts/ci/pipeline_editor/components/header/pipeline_editor_mini_graph.vue +++ b/app/assets/javascripts/ci/pipeline_editor/components/header/pipeline_editor_mini_graph.vue @@ -1,7 +1,7 @@ <script> import { __ } from '~/locale'; -import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/components/parsing_utils'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/utils/parsing_utils'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; import getLinkedPipelinesQuery from '~/ci/pipeline_details/graphql/queries/get_linked_pipelines.query.graphql'; import { PIPELINE_FAILURE } from '../../constants'; diff --git a/app/assets/javascripts/ci/pipeline_editor/components/header/pipeline_status.vue b/app/assets/javascripts/ci/pipeline_editor/components/header/pipeline_status.vue index cdc53175729..5ce3c645145 100644 --- a/app/assets/javascripts/ci/pipeline_editor/components/header/pipeline_status.vue +++ b/app/assets/javascripts/ci/pipeline_editor/components/header/pipeline_status.vue @@ -5,13 +5,10 @@ import { truncateSha } from '~/lib/utils/text_utility'; import { s__ } from '~/locale'; import getPipelineQuery from '~/ci/pipeline_editor/graphql/queries/pipeline.query.graphql'; import getPipelineEtag from '~/ci/pipeline_editor/graphql/queries/client/pipeline_etag.query.graphql'; -import { - getQueryHeaders, - toggleQueryPollingByVisibility, -} from '~/ci/pipeline_details/components/graph/utils'; +import { getQueryHeaders, toggleQueryPollingByVisibility } from '~/ci/pipeline_details/graph/utils'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; -import PipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/pipeline_mini_graph.vue'; +import PipelineMiniGraph from '~/ci/pipeline_mini_graph/pipeline_mini_graph.vue'; import PipelineEditorMiniGraph from './pipeline_editor_mini_graph.vue'; const POLL_INTERVAL = 10000; diff --git a/app/assets/javascripts/ci/pipeline_editor/components/pipeline_editor_tabs.vue b/app/assets/javascripts/ci/pipeline_editor/components/pipeline_editor_tabs.vue index 265ca742275..c7c15cdd76e 100644 --- a/app/assets/javascripts/ci/pipeline_editor/components/pipeline_editor_tabs.vue +++ b/app/assets/javascripts/ci/pipeline_editor/components/pipeline_editor_tabs.vue @@ -2,7 +2,7 @@ import { GlAlert, GlLoadingIcon, GlTabs } from '@gitlab/ui'; import CiEditorHeader from 'ee_else_ce/ci/pipeline_editor/components/editor/ci_editor_header.vue'; import { s__, __ } from '~/locale'; -import PipelineGraph from '~/ci/pipeline_details/components/pipeline_graph/pipeline_graph.vue'; +import PipelineGraph from '~/ci/pipeline_editor/components/graph/pipeline_graph.vue'; import { getParameterValues, setUrlParams, updateHistory } from '~/lib/utils/url_utility'; import { CREATE_TAB, diff --git a/app/assets/javascripts/ci/pipeline_editor/pipeline_editor_app.vue b/app/assets/javascripts/ci/pipeline_editor/pipeline_editor_app.vue index 0a1da8bcd11..49562b0be28 100644 --- a/app/assets/javascripts/ci/pipeline_editor/pipeline_editor_app.vue +++ b/app/assets/javascripts/ci/pipeline_editor/pipeline_editor_app.vue @@ -4,7 +4,7 @@ import { fetchPolicies } from '~/lib/graphql'; import { mergeUrlParams, queryToObject, redirectTo } from '~/lib/utils/url_utility'; // eslint-disable-line import/no-deprecated import { __, s__ } from '~/locale'; -import { unwrapStagesWithNeeds } from '~/ci/pipeline_details/components/unwrapping_utils'; +import { unwrapStagesWithNeeds } from '~/ci/pipeline_details/utils/unwrapping_utils'; import ConfirmUnsavedChangesDialog from './components/ui/confirm_unsaved_changes_dialog.vue'; import PipelineEditorEmptyState from './components/ui/pipeline_editor_empty_state.vue'; diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/accessors/linked_pipelines_accessors.js b/app/assets/javascripts/ci/pipeline_mini_graph/accessors/linked_pipelines_accessors.js index 1ca9e35c008..1ca9e35c008 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/accessors/linked_pipelines_accessors.js +++ b/app/assets/javascripts/ci/pipeline_mini_graph/accessors/linked_pipelines_accessors.js diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_stage.query.graphql b/app/assets/javascripts/ci/pipeline_mini_graph/graphql/queries/get_pipeline_stage.query.graphql index 64a5964dbeb..64a5964dbeb 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_stage.query.graphql +++ b/app/assets/javascripts/ci/pipeline_mini_graph/graphql/queries/get_pipeline_stage.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_stages.query.graphql b/app/assets/javascripts/ci/pipeline_mini_graph/graphql/queries/get_pipeline_stages.query.graphql index 69a29947b16..69a29947b16 100644 --- a/app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_stages.query.graphql +++ b/app/assets/javascripts/ci/pipeline_mini_graph/graphql/queries/get_pipeline_stages.query.graphql diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/job_item.vue b/app/assets/javascripts/ci/pipeline_mini_graph/job_item.vue index 7f97097def6..7f97097def6 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/job_item.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/job_item.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/legacy_job_item.vue b/app/assets/javascripts/ci/pipeline_mini_graph/legacy_job_item.vue index d6e585d093b..27917d029b3 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/legacy_job_item.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/legacy_job_item.vue @@ -1,11 +1,11 @@ <script> import { GlTooltipDirective, GlLink } from '@gitlab/ui'; +import ActionComponent from '~/ci/common/private/job_action_component.vue'; +import JobNameComponent from '~/ci/common/private/job_name_component.vue'; +import { ICONS } from '~/ci/pipeline_details/constants'; import delayedJobMixin from '~/jobs/mixins/delayed_job_mixin'; import { s__, sprintf } from '~/locale'; -import { reportToSentry } from '../../utils'; -import ActionComponent from '../jobs_shared/action_component.vue'; -import JobNameComponent from '../jobs_shared/job_name_component.vue'; -import { ICONS } from '../../constants'; +import { reportToSentry } from '../utils'; /** * Renders the badge for the pipeline graph and the job's dropdown. diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue b/app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue index 8c0e65d1d39..8c0e65d1d39 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_stage.vue b/app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_stage.vue index 048e42731c7..682393d8901 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_stage.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/legacy_pipeline_stage.vue @@ -15,9 +15,9 @@ import { GlDropdown, GlLoadingIcon, GlTooltipDirective } from '@gitlab/ui'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; import { createAlert } from '~/alert'; +import eventHub from '~/ci/pipeline_details/event_hub'; import axios from '~/lib/utils/axios_utils'; import { __, s__, sprintf } from '~/locale'; -import eventHub from '../../event_hub'; import LegacyJobItem from './legacy_job_item.vue'; export default { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/linked_pipelines_mini_list.vue b/app/assets/javascripts/ci/pipeline_mini_graph/linked_pipelines_mini_list.vue index 8567654a89e..8567654a89e 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/linked_pipelines_mini_list.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/linked_pipelines_mini_list.vue diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/pipeline_mini_graph.vue b/app/assets/javascripts/ci/pipeline_mini_graph/pipeline_mini_graph.vue index a4e6fec1625..358d3dc826e 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/pipeline_mini_graph.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/pipeline_mini_graph.vue @@ -2,14 +2,11 @@ import { GlLoadingIcon } from '@gitlab/ui'; import { createAlert } from '~/alert'; import { __ } from '~/locale'; -import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/components/parsing_utils'; -import { - getQueryHeaders, - toggleQueryPollingByVisibility, -} from '~/ci/pipeline_details/components/graph/utils'; +import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/utils/parsing_utils'; +import { getQueryHeaders, toggleQueryPollingByVisibility } from '~/ci/pipeline_details/graph/utils'; import { PIPELINE_MINI_GRAPH_POLL_INTERVAL } from '~/ci/pipeline_details/constants'; import getLinkedPipelinesQuery from '~/ci/pipeline_details/graphql/queries/get_linked_pipelines.query.graphql'; -import getPipelineStagesQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_stages.query.graphql'; +import getPipelineStagesQuery from './graphql/queries/get_pipeline_stages.query.graphql'; import LegacyPipelineMiniGraph from './legacy_pipeline_mini_graph.vue'; export default { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/pipeline_stage.vue b/app/assets/javascripts/ci/pipeline_mini_graph/pipeline_stage.vue index 44e2849cdac..747b5d33b1a 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/pipeline_stage.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/pipeline_stage.vue @@ -2,11 +2,8 @@ import { createAlert } from '~/alert'; import { __ } from '~/locale'; import { PIPELINE_MINI_GRAPH_POLL_INTERVAL } from '~/ci/pipeline_details/constants'; -import { - getQueryHeaders, - toggleQueryPollingByVisibility, -} from '~/ci/pipeline_details/components/graph/utils'; -import getPipelineStageQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_stage.query.graphql'; +import { getQueryHeaders, toggleQueryPollingByVisibility } from '~/ci/pipeline_details/graph/utils'; +import getPipelineStageQuery from './graphql/queries/get_pipeline_stage.query.graphql'; import JobItem from './job_item.vue'; export default { diff --git a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/pipeline_stages.vue b/app/assets/javascripts/ci/pipeline_mini_graph/pipeline_stages.vue index f883833f7ea..f883833f7ea 100644 --- a/app/assets/javascripts/ci/pipeline_details/components/pipeline_mini_graph/pipeline_stages.vue +++ b/app/assets/javascripts/ci/pipeline_mini_graph/pipeline_stages.vue diff --git a/app/assets/javascripts/ci/utils.js b/app/assets/javascripts/ci/utils.js new file mode 100644 index 00000000000..eb9e9538b75 --- /dev/null +++ b/app/assets/javascripts/ci/utils.js @@ -0,0 +1,17 @@ +import * as Sentry from '@sentry/browser'; + +export const reportToSentry = (component, failureType) => { + Sentry.withScope((scope) => { + scope.setTag('component', component); + Sentry.captureException(failureType); + }); +}; + +export const reportMessageToSentry = (component, message, context) => { + Sentry.withScope((scope) => { + // eslint-disable-next-line @gitlab/require-i18n-strings + scope.setContext('Vue data', context); + scope.setTag('component', component); + Sentry.captureMessage(message); + }); +}; diff --git a/app/assets/javascripts/commit/pipelines/pipelines_table.vue b/app/assets/javascripts/commit/pipelines/pipelines_table.vue index f398e5e5ac8..589acc76926 100644 --- a/app/assets/javascripts/commit/pipelines/pipelines_table.vue +++ b/app/assets/javascripts/commit/pipelines/pipelines_table.vue @@ -2,7 +2,7 @@ import { GlButton, GlEmptyState, GlLoadingIcon, GlModal, GlLink, GlSprintf } from '@gitlab/ui'; import { helpPagePath } from '~/helpers/help_page_helper'; import { getParameterByName } from '~/lib/utils/url_utility'; -import PipelinesTableComponent from '~/ci/pipeline_details/components/pipelines_list/pipelines_table.vue'; +import PipelinesTableComponent from '~/ci/pipeline_details/pipelines_list/components/pipelines_table.vue'; import { PipelineKeyOptions } from '~/ci/pipeline_details/constants'; import eventHub from '~/ci/pipeline_details/event_hub'; import PipelinesMixin from '~/ci/pipeline_details/mixins/pipelines_mixin'; diff --git a/app/assets/javascripts/commit/pipelines/pipelines_table_wrapper.vue b/app/assets/javascripts/commit/pipelines/pipelines_table_wrapper.vue index 2fa8060abb3..f9b95c233ad 100644 --- a/app/assets/javascripts/commit/pipelines/pipelines_table_wrapper.vue +++ b/app/assets/javascripts/commit/pipelines/pipelines_table_wrapper.vue @@ -1,9 +1,9 @@ <script> import { GlLoadingIcon } from '@gitlab/ui'; -import getMergeRequestPipelines from '~/ci/pipeline_details/graphql/queries/get_merge_request_pipelines.query.graphql'; +import getMergeRequestPipelines from '~/ci/merge_requests/graphql/queries/get_merge_request_pipelines.query.graphql'; import { createAlert } from '~/alert'; import { __ } from '~/locale'; -import { getQueryHeaders } from '~/ci/pipeline_details/components/graph/utils'; +import { getQueryHeaders } from '~/ci/pipeline_details/graph/utils'; import { graphqlEtagMergeRequestPipelines } from '~/ci/pipeline_details/utils'; export default { diff --git a/app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_mini_graph.vue b/app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_mini_graph.vue index c4ec8ea4033..b7355b909a1 100644 --- a/app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_mini_graph.vue +++ b/app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_mini_graph.vue @@ -2,16 +2,13 @@ import { GlLoadingIcon } from '@gitlab/ui'; import { createAlert } from '~/alert'; import { __ } from '~/locale'; -import { - getQueryHeaders, - toggleQueryPollingByVisibility, -} from '~/ci/pipeline_details/components/graph/utils'; -import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/components/parsing_utils'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; -import PipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/pipeline_mini_graph.vue'; +import { getQueryHeaders, toggleQueryPollingByVisibility } from '~/ci/pipeline_details/graph/utils'; +import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/utils/parsing_utils'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import PipelineMiniGraph from '~/ci/pipeline_mini_graph/pipeline_mini_graph.vue'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import getLinkedPipelinesQuery from '~/ci/pipeline_details/graphql/queries/get_linked_pipelines.query.graphql'; -import getPipelineStagesQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_stages.query.graphql'; +import getPipelineStagesQuery from '~/ci/pipeline_mini_graph/graphql/queries/get_pipeline_stages.query.graphql'; import { formatStages } from '../utils'; import { COMMIT_BOX_POLL_INTERVAL } from '../constants'; diff --git a/app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_status.vue b/app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_status.vue index b5cc2a320db..ccecc914cf1 100644 --- a/app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_status.vue +++ b/app/assets/javascripts/projects/commit_box/info/components/commit_box_pipeline_status.vue @@ -2,10 +2,7 @@ import { GlLoadingIcon, GlLink } from '@gitlab/ui'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; import { createAlert } from '~/alert'; -import { - getQueryHeaders, - toggleQueryPollingByVisibility, -} from '~/ci/pipeline_details/components/graph/utils'; +import { getQueryHeaders, toggleQueryPollingByVisibility } from '~/ci/pipeline_details/graph/utils'; import getLatestPipelineStatusQuery from '../graphql/queries/get_latest_pipeline_status.query.graphql'; import { COMMIT_BOX_POLL_INTERVAL, PIPELINE_STATUS_FETCH_ERROR } from '../constants'; diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue index 6250bedb2ec..206b6c7699e 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue @@ -11,9 +11,9 @@ import { import SafeHtml from '~/vue_shared/directives/safe_html'; import { s__, n__ } from '~/locale'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; -import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/components/parsing_utils'; -import PipelineArtifacts from '~/ci/pipeline_details/components/pipelines_list/pipelines_artifacts.vue'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import { keepLatestDownstreamPipelines } from '~/ci/pipeline_details/utils/parsing_utils'; +import PipelineArtifacts from '~/ci/pipeline_details/pipelines_list/components/pipelines_artifacts.vue'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue'; import { MT_MERGE_STRATEGY } from '../constants'; diff --git a/app/assets/javascripts/vue_merge_request_widget/extensions/test_report/index.vue b/app/assets/javascripts/vue_merge_request_widget/extensions/test_report/index.vue index a4637c24726..1b03b9c04e1 100644 --- a/app/assets/javascripts/vue_merge_request_widget/extensions/test_report/index.vue +++ b/app/assets/javascripts/vue_merge_request_widget/extensions/test_report/index.vue @@ -3,7 +3,7 @@ import { uniqueId, uniq } from 'lodash'; import { __ } from '~/locale'; import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_NO_CONTENT } from '~/lib/utils/http_status'; -import TestCaseDetails from '~/ci/pipeline_details/components/test_reports/test_case_details.vue'; +import TestCaseDetails from '~/ci/pipeline_details/test_reports/test_case_details.vue'; import MrWidget from '~/vue_merge_request_widget/components/widget/widget.vue'; import MrWidgetRow from '~/vue_merge_request_widget/components/widget/widget_content_row.vue'; import { DynamicScroller, DynamicScrollerItem } from 'vendor/vue-virtual-scroller'; diff --git a/config/metrics/counts_7d/20230714160504_batched_background_migration_failed_jobs_metric.yml b/config/metrics/counts_7d/20230714160504_batched_background_migration_failed_jobs_metric.yml index fb8a0f24f7b..e5364020c4d 100644 --- a/config/metrics/counts_7d/20230714160504_batched_background_migration_failed_jobs_metric.yml +++ b/config/metrics/counts_7d/20230714160504_batched_background_migration_failed_jobs_metric.yml @@ -5,7 +5,7 @@ product_section: enablement product_stage: data_stores product_group: database value_type: number -status: active +status: removed milestone: "16.3" introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/126165 time_frame: 7d @@ -20,4 +20,5 @@ tier: - free - premium - ultimate -value_json_schema: "config/metrics/objects_schemas/batched_background_migration_failed_jobs_metric.json" +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130760 +milestone_removed: "16.4" diff --git a/config/metrics/objects_schemas/batched_background_migration_failed_jobs_metric.json b/config/metrics/objects_schemas/batched_background_migration_failed_jobs_metric.json deleted file mode 100644 index daeb7459cde..00000000000 --- a/config/metrics/objects_schemas/batched_background_migration_failed_jobs_metric.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "array", - "items": { - "type": [ - { - "type": "object", - "properties": { - "job_class_name": { - "type": "string" - }, - "table_name": { - "type": "string" - }, - "failed_jobs": { - "type": "integer" - } - } - } - ] - } -} diff --git a/doc/ci/environments/kubernetes_dashboard.md b/doc/ci/environments/kubernetes_dashboard.md index 45419704cca..f2e8d1f3c89 100644 --- a/doc/ci/environments/kubernetes_dashboard.md +++ b/doc/ci/environments/kubernetes_dashboard.md @@ -71,7 +71,14 @@ To view a configured dashboard: > - Customizing the name of the Flux resource [introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128857) in GitLab 16.3 [with a flag](../../administration/feature_flags.md) named `flux_resource_for_environment`. > - Customizing the name of the Flux resource [generally available](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/130648) in GitLab 16.4. Feature flag `flux_resource_for_environment` removed. -A dashboard displays the sync status of your Flux deployments. +You can review the sync status of your Flux deployments from a dashboard. +To display the deployment status, your dashboard must be able to retrieve the `Kustomization` and `HelmRelease` resources, +which requires a namespace to be configured for the environment. + +By default, GitLab searches the `Kustomization` and `HelmRelease` resources for the name of the project slug. +You can specify the resource names with the **Flux resource** dropdown list in the environment settings. + +A dashboard displays one of the following status badges: | Status | Description | |---------|-------------| @@ -82,11 +89,6 @@ A dashboard displays the sync status of your Flux deployments. | **Unknown** | The sync status of the deployment couldn't be retrieved. | | **Unavailable** | The `Kustomization` or `HelmRelease` resource couldn't be retrieved. | -Deployments rely on Flux `Kustomization` and `HelmRelease` resources to gather -the status of a given environment, which requires a namespace to be configured for the environment. -By default, GitLab searches the `Kustomization` and `HelmRelease` resources for the name of the project slug. -You can customize the name GitLab looks for in the environment settings. - ## Troubleshooting When working with the Dashboard for Kubernetes, you might encounter the following issues. diff --git a/doc/development/activitypub/actor.md b/doc/development/activitypub/actor.md new file mode 100644 index 00000000000..044dd730c2b --- /dev/null +++ b/doc/development/activitypub/actor.md @@ -0,0 +1,134 @@ +--- +stage: Create +group: Source Code +info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments" +--- + +# Implement an ActivityPub actor **(EXPERIMENT)** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127023) in GitLab 16.5 [with two flags](../../administration/feature_flags.md) named `activity_pub` and `activity_pub_project`. Disabled by default. This feature is an [Experiment](../../policy/experiment-beta-support.md). + +FLAG: +On self-managed GitLab, by default this feature is not available. To make it available, +an administrator can [enable the feature flags](../../administration/feature_flags.md) +named `activity_pub` and `activity_pub_project`. +On GitLab.com, this feature is not available. +The feature is not ready for production use. + +ActivityPub is based on three standard documents: + +- [ActivityPub](https://www.w3.org/TR/activitypub/) defines the HTTP + requests happening to implement federation. +- [ActivityStreams](https://www.w3.org/TR/activitystreams-core/) defines the + format of the JSON messages exchanged by the users of the protocol. +- [Activity Vocabulary](https://www.w3.org/TR/activitystreams-vocabulary/) + defines the various messages recognized by default. + +The first one is typically handled by controllers, while the two others are +related to what happen in serializers. + +To implement an ActivityPub actor, you must: + +- Implement the profile page of the resource. +- Implement the outbox page. +- Handle incoming requests on the inbox. + +All requests are made using +`application/ld+json; profile="https://www.w3.org/ns/activitystreams"` as `Accept` HTTP header. + +## Profile page + +Querying the profile page is used to retrieve: + +- General information about it, like name and description. +- URLs for the inbox and the outbox. + +To implement a profile page, create an ActivityStreams +serializer in `app/serializers/activity_pub/`, making your serializer +inherit from `ActivityStreamsSerializer`. See below in the serializers +section about the mandatory fields. + +To call your serializer in your controller: + +```ruby +opts = { + inbox: nil, + outbox: outbox_project_releases_url(project) +} + +render json: ActivityPub::ReleasesActorSerializer.new.represent(project, opts) +``` + +- `outbox` is the endpoint where to find the activities feed for this +actor. +- `inbox` is where to POST to subscribe to the feed. Not yet implemented, so pass `nil`. + +## Outbox page + +The outbox is the list of activities for the resource. It's a feed for the +resource, and it allows ActivityPub clients to show public activities for +this actor without having yet subscribed to it. + +To implement an outbox page, create an ActivityStreams +serializer in `app/serializers/activity_pub/`, making your serializer +inherit from `ActivityStreamsSerializer`. See below in the serializers +section about the mandatory fields. + +You call your serializer in your controller like this: + +```ruby +serializer = ActivityPub::ReleasesOutboxSerializer.new.with_pagination(request, response) +render json: serializer.represent(releases) +``` + +This converts the response to an `OrderedCollection` +ActivityPub type, with all the correct fields. + +## Inbox + +Not yet implemented. + +The inbox is where the ActivityPub compatible third-parties makes their +requests, to subscribe to the actor or send it messages. + +## ActivityStreams serializers + +The serializers implement half the core of ActivityPub support: they're all +about [ActivityStreams](https://www.w3.org/TR/activitystreams-core/), the +message format used by ActivityPub. + +To leverage the features doing most of the formatting for you, your +serializer should inherit from `ActivityPub::ActivityStreamsSerializer`. + +To use it, call the `#represent` method. It requires you to provide +`inbox` and `outbox` options (as mentioned above) if it +is an actor profile page. You don't need those if your serializer +represents an object that is just meant to be embedded as part of actors, +like the object representing the contact information for a user. + +Each resource serialized (included other objects embedded in your +actor) must provide an `id` and a `type` field. + +`id` is a URL. It's meant to be a unique identifier for the resource, and +it must point to an existing page: ideally, an actor. Otherwise, you can +just reference the closest actor and use an anchor, like this: + +```plaintext +https://gitlab.com/user/project/-/releases#release-1 +``` + +`type` should be taken from ActivityStreams core vocabulary: + +- [Activity types](https://www.w3.org/TR/activitystreams-vocabulary/#activity-types) +- [Actor types](https://www.w3.org/TR/activitystreams-vocabulary/#actor-types) +- [Object types](https://www.w3.org/TR/activitystreams-vocabulary/#object-types) + +The properties you can use are all documented in +[the ActivityStreams vocabulary document](https://www.w3.org/TR/activitystreams-vocabulary). +Given the type you have chosen for your resource, find the +`properties` list, telling you all available properties, direct or +inherited. + +It's worth noting that Mastodon adds one more property, `preferredName`. +Mastodon expects it to be set on any actor, or that actor is not recognized by +Mastodon. diff --git a/doc/development/activitypub/index.md b/doc/development/activitypub/index.md new file mode 100644 index 00000000000..82249ed3856 --- /dev/null +++ b/doc/development/activitypub/index.md @@ -0,0 +1,207 @@ +--- +stage: Create +group: Source Code +info: "To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments" +--- + +# ActivityPub **(EXPERIMENT)** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/127023) in GitLab 16.5 [with two flags](../../administration/feature_flags.md) named `activity_pub` and `activity_pub_project`. Disabled by default. This feature is an [Experiment](../../policy/experiment-beta-support.md). + +FLAG: +On self-managed GitLab, by default this feature is not available. To make it available, +an administrator can [enable the feature flags](../../administration/feature_flags.md) +named `activity_pub` and `activity_pub_project`. +On GitLab.com, this feature is not available. +The feature is not ready for production use. + +The goal of those documents is to provide an implementation path for adding +Fediverse capabilities to GitLab. + +This page describes the conceptual and high level point of view, while +sub-pages discuss implementation in more technical depth (as in, how to +implement this in the actual rails codebase of GitLab). + +## What + +Feel free to jump to [the Why section](#why) if you already know what +ActivityPub and the Fediverse are. + +Among the push for [decentralization of the web](https://en.wikipedia.org/wiki/Decentralized_web), +several projects tried different protocols with different ideals behind their reasoning. +Some examples: + +- [Secure Scuttlebutt](https://en.wikipedia.org/wiki/Secure_Scuttlebutt) (or SSB for short) +- [Dat](https://en.wikipedia.org/wiki/Dat_%28software%29) +- [IPFS](https://en.wikipedia.org/wiki/InterPlanetary_File_System), +- [Solid](https://en.wikipedia.org/wiki/Solid_%28web_decentralization_project%29) + +One gained traction recently: [ActivityPub](https://en.wikipedia.org/wiki/ActivityPub), +better known for the colloquial [Fediverse](https://en.wikipedia.org/wiki/Fediverse) built +on top of it, through applications like +[Mastodon](https://en.wikipedia.org/wiki/Mastodon_%28social_network%29) +(which could be described as some sort of decentralized Facebook) or +[Lemmy](https://en.wikipedia.org/wiki/Lemmy_%28software%29) (which could be +described as some sort of decentralized Reddit). + +ActivityPub has several advantages that makes it attractive +to implementers and could explain its current success: + +- **It's built on top of HTTP**. You don't need to install new software or + to tinker with TCP/UDP to implement ActivityPub, if you have a webserver + or an application that provides an HTTP API (like a rails application), + you already have everything you need. +- **It's built on top of JSON**. All communications are basically JSON + objects, which web developers are already used to, which simplifies adoption. +- **It's a W3C standard and already has multiple implementations**. Being + piloted by the W3C is a guarantee of stability and quality work. They + have profusely demonstrated in the past through their work on HTML, CSS + or other web standards that we can build on top of their work without + the fear of it becoming deprecated or irrelevant after a few years. + +### The Fediverse + +The core idea behind Mastodon and Lemmy is called the Fediverse. Rather +than full decentralization, those applications rely on federation, in the +sense that there still are servers and clients. It's not P2P like SSB, +Dat and IPFS, but instead a galaxy of servers chatting with each other +instead of having central servers controlled by a single entity. + +The user signs up to one of those servers (called **instances**), and they +can then interact with users either on this instance, or on other ones. +From the perspective of the user, they access a global network, and not +only their instance. They see the articles posted on other instances, they +can comment on them, upvote them, etc. + +What happens behind the scenes: +their instance knows where the user they reply to is hosted. It +contacts that other instance to let them know there is a message for them - +somewhat similar to SMTP. Similarly, when a user subscribes +to a feed, their instance informs the instance where the feed is +hosted of this subscription. That target instance then posts back +messages when new activities are created. This allows for a push model, rather +than a constant poll model like RSS. Of course, what was just described is +the happy path; there is moderation, validation and fault tolerance +happening all the way. + +### ActivityPub + +Behind the Fediverse is the ActivityPub protocol. It's a HTTP API +attempting to be as general a social network implementation as possible, +while giving options to be extendable. + +The basic idea is that an `actor` sends and receives `activities`. Activities +are structured JSON messages with well-defined properties, but are extensible +to cover any need. An actor is defined by four endpoints, which are +contacted with the +`application/ld+json; profile="https://www.w3.org/ns/activitystreams"` HTTP Accept header: + +- `GET /inbox`: used by the actor to find new activities intended for them. +- `POST /inbox`: used by instances to push new activities intended for the actor. +- `GET /outbox`: used by anyone to read the activities created by the actor. +- `POST /outbox`: used by the actor to publish new activities. + +Among those, Mastodon and Lemmy only use `POST /inbox` and `GET /outbox`, which +are the minimum needed to implement federation: + +- Instances push new activities for the actor on the inbox. +- Reading the outbox allows reading the feed of an actor. + +Additionally, Mastodon and Lemmy implement a `GET /` endpoint (with the +mentioned Accept header). This endpoint responds with general information about the +actor, like name and URL of the inbox and outbox. While not required by the +standard, it makes discovery easier. + +While a person is the main use case for an actor, an actor does not +necessarily map to a person. Anything can be an actor: a topic, a +subreddit, a group, an event. For GitLab, anything with activities (in the sense +of what GitLab means by "activity") can be an ActivityPub actor. This includes +items like projects, groups, and releases. In those more abstract examples, +an actor can be thought of as an actionable feed. + +ActivityPub by itself does not cover everything that is needed to implement +the Fediverse. Most notably, these are left for the implementers to figure out: + +- Finding a way to deal with spam. Spam is handled by authorizing or + blocking ("defederating") other instances. +- Discovering new instances. +- Performing network-wide searches. + +## Why + +Why would a social media protocol be useful for GitLab? People want a single, +global GitLab network to interact between various projects, without having to +register on each of their hosts. + +Several very popular discussions around this have already happened: + +- [Share events externally via ActivityPub](https://gitlab.com/gitlab-org/gitlab/-/issues/21582) +- [Implement cross-server (federated) merge requests](https://gitlab.com/gitlab-org/gitlab/-/issues/14116) +- [Distributed merge requests](https://gitlab.com/groups/gitlab-org/-/epics/260). + +The ideal workflow would be: + +1. Alice registers to her favorite GitLab instance, like `gitlab.example.org`. +1. She looks for a project on a given topic, and sees Bob's project, even though + Bob is on `gitlab.com`. +1. Alice selects **Fork**, and the `gitlab.com/Bob/project.git` is + forked to `gitlab.example.org/Alice/project.git`. +1. She makes her edits, and opens a merge request, which appears in Bob's + project on `gitlab.com`. +1. Alice and Bob discuss the merge request, each one from their own GitLab + instance. +1. Bob can send additional commits, which are picked up by Alice's instance. +1. When Bob accepts the merge request, his instance picks up the code from + Alice's instance. + +In this process, ActivityPub would help in: + +- Letting Bob know a fork happened. +- Sending the merge request to Bob. +- Enabling Alice and Bob to discuss the merge request. +- Letting Alice know the code was merged. + +It does _not_ help in these cases, which need specific implementations: + +- Implementing a network-wide search. +- Implementing cross-instance forks. (Not needed, thanks to Git.) + +Why use ActivityPub here rather than implementing cross-instance merge requests +in a custom way? Two reasons: + +1. **Building on top of a standard helps reach beyond GitLab**. + While the workflow presented above only mentions GitLab, building on top + of a W3C standard means other forges can follow GitLab + there, and build a massive Fediverse of code sharing. +1. **An opportunity to make GitLab more social**. To prepare the + architecture for the workflow above, smaller steps can be taken, allowing + people to subscribe to activity feeds from their Fediverse social + network. Anything that has a RSS feed could become an ActivityPub feed. + People on Mastodon could follow their favorite developer, project, or topic + from GitLab and see the news in their feed on Mastodon, hopefully raising + engagement with GitLab. + +## How + +The idea of this implementation path is not to take the fastest route to +the feature with the most value added (cross-instance merge requests), but +to go on with the smallest useful step at each iteration, making sure each step +brings something immediately. + +1. **Implement ActivityPub for social following**. + After this, the Fediverse can follow activities on GitLab instances. + 1. ActivityPub to subscribe to project releases. + 1. ActivityPub to subscribe to project creation in topics. + 1. ActivityPub to subscribe to project activities. + 1. ActivityPub to subscribe to group activities. + 1. ActivityPub to subscribe to user activities. +1. **Implement cross-instance search** to enable discovering projects on other instances. +1. **Implement cross-instance forks** to enable forking a project from an other instance. +1. **Implement ActivityPub for cross-instance discussions** to enable discussing + issues and merge requests from another instance: + 1. In issues. + 1. In merge requests. +1. **Implement ActivityPub to submit cross-instance merge requests** to enable + submitting merge requests to other instances. + +For now, see [how to implement an ActivityPub actor](actor.md). diff --git a/lib/gitlab/database/load_balancing/service_discovery/sampler.rb b/lib/gitlab/database/load_balancing/service_discovery/sampler.rb index 71870214156..4fc11cc1035 100644 --- a/lib/gitlab/database/load_balancing/service_discovery/sampler.rb +++ b/lib/gitlab/database/load_balancing/service_discovery/sampler.rb @@ -16,7 +16,7 @@ module Gitlab def sample(addresses) return addresses if @max_replica_pools.nil? || addresses.count <= @max_replica_pools - ::Gitlab::Database::LoadBalancing::Logger.info( + ::Gitlab::Database::LoadBalancing::Logger.debug( event: :host_list_limit_exceeded, message: "Host list length exceeds max_replica_pools so random hosts will be chosen.", max_replica_pools: @max_replica_pools, diff --git a/lib/gitlab/email/message/in_product_marketing.rb b/lib/gitlab/email/message/in_product_marketing.rb deleted file mode 100644 index bd2c91755c8..00000000000 --- a/lib/gitlab/email/message/in_product_marketing.rb +++ /dev/null @@ -1,18 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - UnknownTrackError = Class.new(StandardError) - - def self.for(track) - valid_tracks = Namespaces::InProductMarketingEmailsService::TRACKS.keys - raise UnknownTrackError unless valid_tracks.include?(track) - - "Gitlab::Email::Message::InProductMarketing::#{track.to_s.classify}".constantize - end - end - end - end -end diff --git a/lib/gitlab/email/message/in_product_marketing/admin_verify.rb b/lib/gitlab/email/message/in_product_marketing/admin_verify.rb deleted file mode 100644 index 888f84cde23..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/admin_verify.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class AdminVerify < Base - def subject_line - s_('InProductMarketing|Create a custom CI runner with just a few clicks') - end - - def tagline - nil - end - - def title - s_('InProductMarketing|Spin up an autoscaling runner in GitLab') - end - - def subtitle - s_('InProductMarketing|Use our AWS cloudformation template to spin up your runners in just a few clicks!') - end - - def body_line1 - '' - end - - def body_line2 - '' - end - - def cta_text - s_('InProductMarketing|Create a custom runner') - end - - def progress - super(track_name: 'Admin') - end - - def invite_members? - user.can?(:admin_group_member, group) - end - end - end - end - end -end diff --git a/lib/gitlab/email/message/in_product_marketing/base.rb b/lib/gitlab/email/message/in_product_marketing/base.rb deleted file mode 100644 index fcd8c6ff58c..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/base.rb +++ /dev/null @@ -1,132 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class Base - include Gitlab::Email::Message::InProductMarketing::Helper - include Gitlab::Routing - include Gitlab::Experiment::Dsl - - attr_accessor :format - - def initialize(group:, user:, series:, format: :html) - @series = series - @group = group - @user = user - @format = format - - validate_series! - end - - def subject_line - raise NotImplementedError - end - - def tagline - raise NotImplementedError - end - - def title - raise NotImplementedError - end - - def subtitle - raise NotImplementedError - end - - def body_line1 - raise NotImplementedError - end - - def body_line2 - raise NotImplementedError - end - - def cta_text - raise NotImplementedError - end - - # rubocop:disable Gitlab/NoCodeCoverageComment - # :nocov: Not used, will be removed with next MR, no need to cover - def cta_link - # Switching to root_url, will be removed with next MR - case format - when :html - ActionController::Base.helpers.link_to cta_text, root_url, target: '_blank', rel: 'noopener noreferrer' - else - [cta_text, root_url].join(' >> ') - end - end - # :nocov: - # rubocop:enable Gitlab/NoCodeCoverageComment - - def invite_members? - false - end - - def invite_text - s_('InProductMarketing|Do you have a teammate who would be perfect for this task?') - end - - def invite_link - action_link(s_('InProductMarketing|Invite them to help out.'), group_url(group, open_modal: 'invite_members_for_task')) - end - - def unsubscribe - self_managed_preferences_link = marketing_preference_link(track, series) - unsubscribe_message(self_managed_preferences_link) - end - - def progress(current: series + 1, total: total_series, track_name: track.to_s.humanize) - if Gitlab.com? - s_('InProductMarketing|This is email %{current_series} of %{total_series} in the %{track} series.') % { current_series: current, total_series: total, track: track_name } - else - s_('InProductMarketing|This is email %{current_series} of %{total_series} in the %{track} series. To disable notification emails sent by your local GitLab instance, either contact your administrator or %{unsubscribe_link}.') % { current_series: current, total_series: total, track: track_name, unsubscribe_link: unsubscribe_link } - end - end - - def logo_path - ["mailers/in_product_marketing", "#{track}-#{series}.png"].join('/') - end - - def series? - total_series > 0 - end - - protected - - attr_reader :group, :user, :series - - private - - def track - self.class.name.demodulize.underscore.to_sym - end - - def total_series - Namespaces::InProductMarketingEmailsService::TRACKS[track][:interval_days].size - end - - def marketing_preference_link(track, series) - params = { - utm_source: 'SM', - utm_medium: 'email', - utm_campaign: 'onboarding', - utm_term: "#{track}_#{series}" - } - - preference_link = "https://about.gitlab.com/company/preference-center/?#{params.to_query}" - - link(s_('InProductMarketing|update your preferences'), preference_link) - end - - def validate_series! - raise ArgumentError, "Only #{total_series} series available for this track." unless @series.between?(0, total_series - 1) - end - end - end - end - end -end diff --git a/lib/gitlab/email/message/in_product_marketing/create.rb b/lib/gitlab/email/message/in_product_marketing/create.rb deleted file mode 100644 index 68f9a9a21c9..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/create.rb +++ /dev/null @@ -1,105 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class Create < Base - def subject_line - [ - s_('InProductMarketing|Create a project in GitLab in 5 minutes'), - s_('InProductMarketing|Import your project and code from GitHub, Bitbucket and others'), - s_('InProductMarketing|Understand repository mirroring') - ][series] - end - - def tagline - [ - s_('InProductMarketing|Get started today'), - s_('InProductMarketing|Get our import guides'), - s_('InProductMarketing|Need an alternative to importing?') - ][series] - end - - def title - [ - s_('InProductMarketing|Take your first steps with GitLab'), - s_('InProductMarketing|Start by importing your projects'), - s_('InProductMarketing|How (and why) mirroring makes sense') - ][series] - end - - def subtitle - [ - s_('InProductMarketing|Dig in and create a project and a repo'), - s_("InProductMarketing|Here's what you need to know"), - s_('InProductMarketing|Try it out') - ][series] - end - - def body_line1 - [ - s_("InProductMarketing|To understand and get the most out of GitLab, start at the beginning and %{project_link}. In GitLab, repositories are part of a project, so after you've created your project you can go ahead and %{repo_link}.") % { project_link: project_link, repo_link: repo_link }, - s_("InProductMarketing|Making the switch? It's easier than you think to import your projects into GitLab. Move %{github_link}, or import something %{bitbucket_link}.") % { github_link: github_link, bitbucket_link: bitbucket_link }, - s_("InProductMarketing|Sometimes you're not ready to make a full transition to a new tool. If you're not ready to fully commit, %{mirroring_link} gives you a safe way to try out GitLab in parallel with your current tool.") % { mirroring_link: mirroring_link } - ][series] - end - - def body_line2 - [ - s_("InProductMarketing|That's all it takes to get going with GitLab, but if you're new to working with Git, check out our %{basics_link} for helpful tips and tricks for getting started.") % { basics_link: basics_link }, - s_("InProductMarketing|Have a different instance you'd like to import? Here's our %{import_link}.") % { import_link: import_link }, - s_("InProductMarketing|It's also possible to simply %{external_repo_link} in order to take advantage of GitLab's CI/CD.") % { external_repo_link: external_repo_link } - ][series] - end - - def cta_text - [ - s_('InProductMarketing|Create your first project!'), - s_('InProductMarketing|Master the art of importing!'), - s_('InProductMarketing|Understand your project options') - ][series] - end - - def invite_members? - user.can?(:admin_group_member, group) - end - - private - - def project_link - link(s_('InProductMarketing|create a project'), help_page_url('user/project/index')) - end - - def repo_link - link(s_('InProductMarketing|set up a repo'), help_page_url('user/project/repository/index', anchor: 'create-a-repository')) - end - - def github_link - link(s_('InProductMarketing|GitHub Enterprise projects to GitLab'), help_page_url('user/project/import/github')) - end - - def bitbucket_link - link(s_('InProductMarketing|from Bitbucket'), help_page_url('user/project/import/bitbucket_server')) - end - - def mirroring_link - link(s_('InProductMarketing|repository mirroring'), help_page_url('user/project/repository/mirror/index')) - end - - def basics_link - link(s_('InProductMarketing|Git basics'), help_page_url('topics/git/index')) - end - - def import_link - link(s_('InProductMarketing|comprehensive guide'), help_page_url('user/project/import/index')) - end - - def external_repo_link - link(s_('InProductMarketing|connect an external repository'), new_project_url(anchor: 'cicd_for_external_repo')) - end - end - end - end - end -end diff --git a/lib/gitlab/email/message/in_product_marketing/helper.rb b/lib/gitlab/email/message/in_product_marketing/helper.rb index 73d1e0743cc..0770e5f4d76 100644 --- a/lib/gitlab/email/message/in_product_marketing/helper.rb +++ b/lib/gitlab/email/message/in_product_marketing/helper.rb @@ -64,15 +64,6 @@ module Gitlab ] end - def list(array) - case format - when :html - tag.ul { array.map { |item| tag.li item } } - else - '- ' + array.join("\n- ") - end - end - def strong_options case format when :html diff --git a/lib/gitlab/email/message/in_product_marketing/team.rb b/lib/gitlab/email/message/in_product_marketing/team.rb deleted file mode 100644 index ca99dd12c8e..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/team.rb +++ /dev/null @@ -1,84 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class Team < Base - def subject_line - [ - s_('InProductMarketing|Working in GitLab = more efficient'), - s_("InProductMarketing|Multiple owners, confusing workstreams? We've got you covered"), - s_('InProductMarketing|Your teams can be more efficient') - ][series] - end - - def tagline - [ - s_('InProductMarketing|Invite your colleagues to join in less than one minute'), - s_('InProductMarketing|Get your team set up on GitLab'), - nil - ][series] - end - - def title - [ - s_('InProductMarketing|Team work makes the dream work'), - s_('InProductMarketing|*GitLab*, noun: a synonym for efficient teams'), - s_('InProductMarketing|Find out how your teams are really doing') - ][series] - end - - def subtitle - [ - s_('InProductMarketing|Actually, GitLab makes the team work (better)'), - s_('InProductMarketing|Our tool brings all the things together'), - s_("InProductMarketing|It's all in the stats") - ][series] - end - - def body_line1 - [ - [ - s_('InProductMarketing|Did you know teams that use GitLab are far more efficient?'), - list([ - s_('InProductMarketing|Goldman Sachs went from 1 build every two weeks to thousands of builds a day'), - s_('InProductMarketing|Ticketmaster decreased their CI build time by 15X') - ]) - ].join("\n"), - s_("InProductMarketing|We know a thing or two about efficiency and we don't want to keep that to ourselves. Sign up for a free trial of GitLab Ultimate and your teams will be on it from day one."), - [ - s_('InProductMarketing|Stop wondering and use GitLab to answer questions like:'), - list([ - s_('InProductMarketing|How long does it take us to close issues/MRs by types like feature requests, bugs, tech debt, security?'), - s_('InProductMarketing|How many days does it take our team to complete various tasks?'), - s_('InProductMarketing|What does our value stream timeline look like from product to development to review and production?') - ]) - ].join("\n") - ][series] - end - - def body_line2 - [ - s_('InProductMarketing|Invite your colleagues and start shipping code faster.'), - s_("InProductMarketing|Streamline code review, know at a glance who's unavailable, communicate in comments or in email and integrate with Slack so everyone's on the same page."), - s_('InProductMarketing|When your team is on GitLab these answers are a click away.') - ][series] - end - - def cta_text - [ - s_('InProductMarketing|Invite your colleagues today'), - s_('InProductMarketing|Invite your team in less than 60 seconds'), - s_('InProductMarketing|Invite your team now') - ][series] - end - - def progress - super(current: series + 2, total: 4) - end - end - end - end - end -end diff --git a/lib/gitlab/email/message/in_product_marketing/team_short.rb b/lib/gitlab/email/message/in_product_marketing/team_short.rb deleted file mode 100644 index 1d60a5fe4e5..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/team_short.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class TeamShort < Base - def subject_line - s_('InProductMarketing|Team up in GitLab for greater efficiency') - end - - def tagline - nil - end - - def title - s_('InProductMarketing|Turn coworkers into collaborators') - end - - def subtitle - s_('InProductMarketing|Invite your team today to build better code (and processes) together') - end - - def body_line1 - '' - end - - def body_line2 - '' - end - - def cta_text - s_('InProductMarketing|Invite your colleagues today') - end - - def progress - super(total: 4, track_name: 'Team') - end - - def logo_path - 'mailers/in_product_marketing/team-0.png' - end - end - end - end - end -end diff --git a/lib/gitlab/email/message/in_product_marketing/trial.rb b/lib/gitlab/email/message/in_product_marketing/trial.rb deleted file mode 100644 index 720262816b4..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/trial.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class Trial < Base - def subject_line - [ - s_('InProductMarketing|Go farther with GitLab'), - s_('InProductMarketing|Automated security scans directly within GitLab'), - s_('InProductMarketing|Take your source code management to the next level') - ][series] - end - - def tagline - [ - s_('InProductMarketing|Start a free trial of GitLab Ultimate – no credit card required'), - s_('InProductMarketing|Improve app security with a 30-day trial'), - s_('InProductMarketing|Start with a GitLab Ultimate free trial') - ][series] - end - - def title - [ - s_('InProductMarketing|Give us one minute...'), - s_("InProductMarketing|Security that's integrated into your development lifecycle"), - s_('InProductMarketing|Improve code quality and streamline reviews') - ][series] - end - - def subtitle - [ - s_('InProductMarketing|...and you can get a free trial of GitLab Ultimate'), - s_('InProductMarketing|Try GitLab Ultimate for free'), - s_('InProductMarketing|Better code in less time') - ][series] - end - - def body_line1 - [ - [ - s_("InProductMarketing|GitLab's premium tiers are designed to make you, your team and your application more efficient and more secure with features including but not limited to:"), - list([ - s_('InProductMarketing|%{strong_start}Company wide portfolio management%{strong_end} — including multi-level epics, scoped labels').html_safe % strong_options, - s_('InProductMarketing|%{strong_start}Multiple approval roles%{strong_end} — including code owners and required merge approvals').html_safe % strong_options, - s_('InProductMarketing|%{strong_start}Advanced application security%{strong_end} — including SAST, DAST scanning, FUZZ testing, dependency scanning, license compliance, secrete detection').html_safe % strong_options, - s_('InProductMarketing|%{strong_start}Executive level insights%{strong_end} — including reporting on productivity, tasks by type, days to completion, value stream').html_safe % strong_options - ]) - ].join("\n"), - s_('InProductMarketing|GitLab provides static application security testing (SAST), dynamic application security testing (DAST), container scanning, and dependency scanning to help you deliver secure applications along with license compliance.'), - s_('InProductMarketing|By enabling code owners and required merge approvals the right person will review the right MR. This is a win-win: cleaner code and a more efficient review process.') - ][series] - end - - def body_line2 - [ - s_('InProductMarketing|Start a GitLab Ultimate trial today in less than one minute, no credit card required.'), - s_('InProductMarketing|Get started today with a 30-day GitLab Ultimate trial, no credit card required.'), - s_('InProductMarketing|Code owners and required merge approvals are part of the paid tiers of GitLab. You can start a free 30-day trial of GitLab Ultimate and enable these features in less than 5 minutes with no credit card required.') - ][series] - end - - def cta_text - [ - s_('InProductMarketing|Start a trial'), - s_('InProductMarketing|Beef up your security'), - s_('InProductMarketing|Start your trial now!') - ][series] - end - - def progress - super(current: series + 2, total: 4) - end - end - end - end - end -end diff --git a/lib/gitlab/email/message/in_product_marketing/trial_short.rb b/lib/gitlab/email/message/in_product_marketing/trial_short.rb deleted file mode 100644 index 0fcd3fde4a6..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/trial_short.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class TrialShort < Base - def subject_line - s_('InProductMarketing|Be a DevOps hero') - end - - def tagline - nil - end - - def title - s_('InProductMarketing|Expand your DevOps journey with a free GitLab trial') - end - - def subtitle - s_('InProductMarketing|Start your trial today to experience single application success and discover all the features of GitLab Ultimate for free!') - end - - def body_line1 - '' - end - - def body_line2 - '' - end - - def cta_text - s_('InProductMarketing|Start a trial') - end - - def progress - super(total: 4, track_name: 'Trial') - end - - def logo_path - 'mailers/in_product_marketing/trial-0.png' - end - end - end - end - end -end diff --git a/lib/gitlab/email/message/in_product_marketing/verify.rb b/lib/gitlab/email/message/in_product_marketing/verify.rb deleted file mode 100644 index 3982a8b87fd..00000000000 --- a/lib/gitlab/email/message/in_product_marketing/verify.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Email - module Message - module InProductMarketing - class Verify < Base - def subject_line - [ - s_('InProductMarketing|Feel the need for speed?'), - s_('InProductMarketing|3 ways to dive into GitLab CI/CD'), - s_('InProductMarketing|Explore the power of GitLab CI/CD') - ][series] - end - - def tagline - [ - s_('InProductMarketing|Use GitLab CI/CD'), - s_('InProductMarketing|Test, create, deploy'), - s_('InProductMarketing|Are your runners ready?') - ][series] - end - - def title - [ - s_('InProductMarketing|Rapid development, simplified'), - s_('InProductMarketing|Get started with GitLab CI/CD'), - s_('InProductMarketing|Launch GitLab CI/CD in 20 minutes or less') - ][series] - end - - def subtitle - [ - s_('InProductMarketing|How to build and test faster'), - s_('InProductMarketing|Explore the options'), - s_('InProductMarketing|Follow our steps') - ][series] - end - - def body_line1 - [ - s_("InProductMarketing|Tired of wrestling with disparate tool chains, information silos and inefficient processes? GitLab's CI/CD is built on a DevOps platform with source code management, planning, monitoring and more ready to go. Find out %{ci_link}.") % { ci_link: ci_link }, - s_("InProductMarketing|GitLab's CI/CD makes software development easier. Don't believe us? Here are three ways you can take it for a fast (and satisfying) test drive:"), - s_("InProductMarketing|Get going with CI/CD quickly using our %{quick_start_link}. Start with an available runner and then create a CI .yml file – it's really that easy.") % { quick_start_link: quick_start_link } - ][series] - end - - def body_line2 - [ - nil, - list([ - s_('InProductMarketing|Start by %{performance_link}').html_safe % { performance_link: performance_link }, - s_('InProductMarketing|Move on to easily creating a Pages website %{ci_template_link}').html_safe % { ci_template_link: ci_template_link }, - s_('InProductMarketing|And finally %{deploy_link} a Python application.').html_safe % { deploy_link: deploy_link } - ]), - nil - ][series] - end - - def cta_text - [ - s_('InProductMarketing|Get to know GitLab CI/CD'), - s_('InProductMarketing|Try it yourself'), - s_('InProductMarketing|Explore GitLab CI/CD') - ][series] - end - - def invite_members? - user.can?(:admin_group_member, group) - end - - private - - def ci_link - link(s_('InProductMarketing|how easy it is to get started'), help_page_url('ci/index')) - end - - def quick_start_link - link(s_('InProductMarketing|quick start guide'), help_page_url('ci/quick_start/index')) - end - - def performance_link - link(s_('InProductMarketing|testing browser performance'), help_page_url('user/project/merge_requests/browser_performance_testing')) - end - - def ci_template_link - link(s_('InProductMarketing|using a CI/CD template'), help_page_url('user/project/pages/getting_started/pages_ci_cd_template')) - end - - def deploy_link - link(s_('InProductMarketing|test and deploy'), help_page_url('ci/examples/test-and-deploy-python-application-to-heroku')) - end - end - end - end - end -end diff --git a/lib/gitlab/usage/metrics/instrumentations/batched_background_migration_failed_jobs_metric.rb b/lib/gitlab/usage/metrics/instrumentations/batched_background_migration_failed_jobs_metric.rb deleted file mode 100644 index f5d963cf522..00000000000 --- a/lib/gitlab/usage/metrics/instrumentations/batched_background_migration_failed_jobs_metric.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module Usage - module Metrics - module Instrumentations - class BatchedBackgroundMigrationFailedJobsMetric < DatabaseMetric - relation do - Gitlab::Database::BackgroundMigration::BatchedMigration - .joins(:batched_jobs) - .where(batched_jobs: { status: '2' }) - .group(%w[table_name job_class_name]) - .order(%w[table_name job_class_name]) - .select(['table_name', 'job_class_name', 'COUNT(batched_jobs) AS number_of_failed_jobs']) - end - - timestamp_column(:created_at) - - operation :count - - def value - relation.map do |batched_migration| - { - job_class_name: batched_migration.job_class_name, - table_name: batched_migration.table_name, - number_of_failed_jobs: batched_migration.number_of_failed_jobs - } - end - end - end - end - end - end -end diff --git a/locale/gitlab.pot b/locale/gitlab.pot index bf76f6cdbc4..471eaa43f5b 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -24322,381 +24322,72 @@ msgstr "" msgid "InProductMarketing|%{organization_name} logo" msgstr "" -msgid "InProductMarketing|%{strong_start}Advanced application security%{strong_end} — including SAST, DAST scanning, FUZZ testing, dependency scanning, license compliance, secrete detection" -msgstr "" - -msgid "InProductMarketing|%{strong_start}Company wide portfolio management%{strong_end} — including multi-level epics, scoped labels" -msgstr "" - -msgid "InProductMarketing|%{strong_start}Executive level insights%{strong_end} — including reporting on productivity, tasks by type, days to completion, value stream" -msgstr "" - msgid "InProductMarketing|%{strong_start}GitLab Inc.%{strong_end} 268 Bush Street, #350, San Francisco, CA 94104, USA" msgstr "" -msgid "InProductMarketing|%{strong_start}Multiple approval roles%{strong_end} — including code owners and required merge approvals" -msgstr "" - -msgid "InProductMarketing|*GitLab*, noun: a synonym for efficient teams" -msgstr "" - -msgid "InProductMarketing|...and you can get a free trial of GitLab Ultimate" -msgstr "" - -msgid "InProductMarketing|3 ways to dive into GitLab CI/CD" -msgstr "" - -msgid "InProductMarketing|Actually, GitLab makes the team work (better)" -msgstr "" - msgid "InProductMarketing|Advanced security testing" msgstr "" -msgid "InProductMarketing|And finally %{deploy_link} a Python application." -msgstr "" - -msgid "InProductMarketing|Are your runners ready?" -msgstr "" - -msgid "InProductMarketing|Automated security scans directly within GitLab" -msgstr "" - -msgid "InProductMarketing|Be a DevOps hero" -msgstr "" - -msgid "InProductMarketing|Beef up your security" -msgstr "" - -msgid "InProductMarketing|Better code in less time" -msgstr "" - msgid "InProductMarketing|Blog" msgstr "" msgid "InProductMarketing|Building for iOS? We've got you covered." msgstr "" -msgid "InProductMarketing|By enabling code owners and required merge approvals the right person will review the right MR. This is a win-win: cleaner code and a more efficient review process." -msgstr "" - -msgid "InProductMarketing|Code owners and required merge approvals are part of the paid tiers of GitLab. You can start a free 30-day trial of GitLab Ultimate and enable these features in less than 5 minutes with no credit card required." -msgstr "" - -msgid "InProductMarketing|Create a custom CI runner with just a few clicks" -msgstr "" - -msgid "InProductMarketing|Create a custom runner" -msgstr "" - -msgid "InProductMarketing|Create a project in GitLab in 5 minutes" -msgstr "" - -msgid "InProductMarketing|Create your first project!" -msgstr "" - msgid "InProductMarketing|Deliver Better Products Faster" msgstr "" -msgid "InProductMarketing|Did you know teams that use GitLab are far more efficient?" -msgstr "" - -msgid "InProductMarketing|Dig in and create a project and a repo" -msgstr "" - -msgid "InProductMarketing|Do you have a teammate who would be perfect for this task?" -msgstr "" - -msgid "InProductMarketing|Expand your DevOps journey with a free GitLab trial" -msgstr "" - -msgid "InProductMarketing|Explore GitLab CI/CD" -msgstr "" - -msgid "InProductMarketing|Explore the options" -msgstr "" - -msgid "InProductMarketing|Explore the power of GitLab CI/CD" -msgstr "" - msgid "InProductMarketing|Facebook" msgstr "" -msgid "InProductMarketing|Feel the need for speed?" -msgstr "" - -msgid "InProductMarketing|Find out how your teams are really doing" -msgstr "" - -msgid "InProductMarketing|Follow our steps" -msgstr "" - msgid "InProductMarketing|Free 30-day trial" msgstr "" msgid "InProductMarketing|Free guest users" msgstr "" -msgid "InProductMarketing|Get going with CI/CD quickly using our %{quick_start_link}. Start with an available runner and then create a CI .yml file – it's really that easy." -msgstr "" - -msgid "InProductMarketing|Get our import guides" -msgstr "" - msgid "InProductMarketing|Get set up to build for iOS" msgstr "" -msgid "InProductMarketing|Get started today" -msgstr "" - -msgid "InProductMarketing|Get started today with a 30-day GitLab Ultimate trial, no credit card required." -msgstr "" - -msgid "InProductMarketing|Get started with GitLab CI/CD" -msgstr "" - -msgid "InProductMarketing|Get to know GitLab CI/CD" -msgstr "" - -msgid "InProductMarketing|Get your team set up on GitLab" -msgstr "" - -msgid "InProductMarketing|Git basics" -msgstr "" - -msgid "InProductMarketing|GitHub Enterprise projects to GitLab" -msgstr "" - -msgid "InProductMarketing|GitLab provides static application security testing (SAST), dynamic application security testing (DAST), container scanning, and dependency scanning to help you deliver secure applications along with license compliance." -msgstr "" - -msgid "InProductMarketing|GitLab's CI/CD makes software development easier. Don't believe us? Here are three ways you can take it for a fast (and satisfying) test drive:" -msgstr "" - -msgid "InProductMarketing|GitLab's premium tiers are designed to make you, your team and your application more efficient and more secure with features including but not limited to:" -msgstr "" - -msgid "InProductMarketing|Give us one minute..." -msgstr "" - -msgid "InProductMarketing|Go farther with GitLab" -msgstr "" - -msgid "InProductMarketing|Goldman Sachs went from 1 build every two weeks to thousands of builds a day" -msgstr "" - -msgid "InProductMarketing|Have a different instance you'd like to import? Here's our %{import_link}." -msgstr "" - -msgid "InProductMarketing|Here's what you need to know" -msgstr "" - -msgid "InProductMarketing|How (and why) mirroring makes sense" -msgstr "" - -msgid "InProductMarketing|How long does it take us to close issues/MRs by types like feature requests, bugs, tech debt, security?" -msgstr "" - -msgid "InProductMarketing|How many days does it take our team to complete various tasks?" -msgstr "" - -msgid "InProductMarketing|How to build and test faster" -msgstr "" - msgid "InProductMarketing|If you don't want to receive marketing emails directly from GitLab, %{marketing_preference_link}." msgstr "" msgid "InProductMarketing|If you no longer wish to receive marketing emails from us," msgstr "" -msgid "InProductMarketing|Import your project and code from GitHub, Bitbucket and others" -msgstr "" - -msgid "InProductMarketing|Improve app security with a 30-day trial" -msgstr "" - -msgid "InProductMarketing|Improve code quality and streamline reviews" -msgstr "" - msgid "InProductMarketing|Increase Operational Efficiencies" msgstr "" -msgid "InProductMarketing|Invite them to help out." -msgstr "" - msgid "InProductMarketing|Invite unlimited colleagues" msgstr "" -msgid "InProductMarketing|Invite your colleagues and start shipping code faster." -msgstr "" - -msgid "InProductMarketing|Invite your colleagues to join in less than one minute" -msgstr "" - -msgid "InProductMarketing|Invite your colleagues today" -msgstr "" - -msgid "InProductMarketing|Invite your team in less than 60 seconds" -msgstr "" - -msgid "InProductMarketing|Invite your team now" -msgstr "" - -msgid "InProductMarketing|Invite your team today to build better code (and processes) together" -msgstr "" - -msgid "InProductMarketing|It's all in the stats" -msgstr "" - -msgid "InProductMarketing|It's also possible to simply %{external_repo_link} in order to take advantage of GitLab's CI/CD." -msgstr "" - -msgid "InProductMarketing|Launch GitLab CI/CD in 20 minutes or less" -msgstr "" - msgid "InProductMarketing|Learn how to build for iOS" msgstr "" -msgid "InProductMarketing|Making the switch? It's easier than you think to import your projects into GitLab. Move %{github_link}, or import something %{bitbucket_link}." -msgstr "" - -msgid "InProductMarketing|Master the art of importing!" -msgstr "" - -msgid "InProductMarketing|Move on to easily creating a Pages website %{ci_template_link}" -msgstr "" - -msgid "InProductMarketing|Multiple owners, confusing workstreams? We've got you covered" -msgstr "" - -msgid "InProductMarketing|Need an alternative to importing?" -msgstr "" - msgid "InProductMarketing|No credit card required." msgstr "" -msgid "InProductMarketing|Our tool brings all the things together" -msgstr "" - msgid "InProductMarketing|Portfolio management" msgstr "" -msgid "InProductMarketing|Rapid development, simplified" -msgstr "" - msgid "InProductMarketing|Reduce Security and Compliance Risk" msgstr "" msgid "InProductMarketing|Security risk mitigation" msgstr "" -msgid "InProductMarketing|Security that's integrated into your development lifecycle" -msgstr "" - -msgid "InProductMarketing|Sometimes you're not ready to make a full transition to a new tool. If you're not ready to fully commit, %{mirroring_link} gives you a safe way to try out GitLab in parallel with your current tool." -msgstr "" - -msgid "InProductMarketing|Spin up an autoscaling runner in GitLab" -msgstr "" - -msgid "InProductMarketing|Start a GitLab Ultimate trial today in less than one minute, no credit card required." -msgstr "" - msgid "InProductMarketing|Start a Self-Managed trial" msgstr "" -msgid "InProductMarketing|Start a free trial of GitLab Ultimate – no credit card required" -msgstr "" - -msgid "InProductMarketing|Start a trial" -msgstr "" - -msgid "InProductMarketing|Start by %{performance_link}" -msgstr "" - -msgid "InProductMarketing|Start by importing your projects" -msgstr "" - -msgid "InProductMarketing|Start with a GitLab Ultimate free trial" -msgstr "" - -msgid "InProductMarketing|Start your trial now!" -msgstr "" - -msgid "InProductMarketing|Start your trial today to experience single application success and discover all the features of GitLab Ultimate for free!" -msgstr "" - -msgid "InProductMarketing|Stop wondering and use GitLab to answer questions like:" -msgstr "" - -msgid "InProductMarketing|Streamline code review, know at a glance who's unavailable, communicate in comments or in email and integrate with Slack so everyone's on the same page." -msgstr "" - -msgid "InProductMarketing|Take your first steps with GitLab" -msgstr "" - -msgid "InProductMarketing|Take your source code management to the next level" -msgstr "" - msgid "InProductMarketing|Team members collaborating" msgstr "" -msgid "InProductMarketing|Team up in GitLab for greater efficiency" -msgstr "" - -msgid "InProductMarketing|Team work makes the dream work" -msgstr "" - -msgid "InProductMarketing|Test, create, deploy" -msgstr "" - -msgid "InProductMarketing|That's all it takes to get going with GitLab, but if you're new to working with Git, check out our %{basics_link} for helpful tips and tricks for getting started." -msgstr "" - -msgid "InProductMarketing|This is email %{current_series} of %{total_series} in the %{track} series." -msgstr "" - -msgid "InProductMarketing|This is email %{current_series} of %{total_series} in the %{track} series. To disable notification emails sent by your local GitLab instance, either contact your administrator or %{unsubscribe_link}." -msgstr "" - -msgid "InProductMarketing|Ticketmaster decreased their CI build time by 15X" -msgstr "" - -msgid "InProductMarketing|Tired of wrestling with disparate tool chains, information silos and inefficient processes? GitLab's CI/CD is built on a DevOps platform with source code management, planning, monitoring and more ready to go. Find out %{ci_link}." -msgstr "" - msgid "InProductMarketing|To opt out of these onboarding emails, %{unsubscribe_link}." msgstr "" -msgid "InProductMarketing|To understand and get the most out of GitLab, start at the beginning and %{project_link}. In GitLab, repositories are part of a project, so after you've created your project you can go ahead and %{repo_link}." -msgstr "" - -msgid "InProductMarketing|Try GitLab Ultimate for free" -msgstr "" - -msgid "InProductMarketing|Try it out" -msgstr "" - -msgid "InProductMarketing|Try it yourself" -msgstr "" - -msgid "InProductMarketing|Turn coworkers into collaborators" -msgstr "" - msgid "InProductMarketing|Twitter" msgstr "" -msgid "InProductMarketing|Understand repository mirroring" -msgstr "" - -msgid "InProductMarketing|Understand your project options" -msgstr "" - -msgid "InProductMarketing|Use GitLab CI/CD" -msgstr "" - -msgid "InProductMarketing|Use our AWS cloudformation template to spin up your runners in just a few clicks!" -msgstr "" - msgid "InProductMarketing|Used by more than 100,000 organizations from around the globe:" msgstr "" @@ -24712,66 +24403,15 @@ msgstr "" msgid "InProductMarketing|Watch iOS building in action." msgstr "" -msgid "InProductMarketing|We know a thing or two about efficiency and we don't want to keep that to ourselves. Sign up for a free trial of GitLab Ultimate and your teams will be on it from day one." -msgstr "" - -msgid "InProductMarketing|What does our value stream timeline look like from product to development to review and production?" -msgstr "" - -msgid "InProductMarketing|When your team is on GitLab these answers are a click away." -msgstr "" - -msgid "InProductMarketing|Working in GitLab = more efficient" -msgstr "" - msgid "InProductMarketing|YouTube" msgstr "" -msgid "InProductMarketing|Your teams can be more efficient" -msgstr "" - -msgid "InProductMarketing|comprehensive guide" -msgstr "" - -msgid "InProductMarketing|connect an external repository" -msgstr "" - -msgid "InProductMarketing|create a project" -msgstr "" - -msgid "InProductMarketing|from Bitbucket" -msgstr "" - msgid "InProductMarketing|go to about.gitlab.com" msgstr "" -msgid "InProductMarketing|how easy it is to get started" -msgstr "" - -msgid "InProductMarketing|quick start guide" -msgstr "" - -msgid "InProductMarketing|repository mirroring" -msgstr "" - -msgid "InProductMarketing|set up a repo" -msgstr "" - -msgid "InProductMarketing|test and deploy" -msgstr "" - -msgid "InProductMarketing|testing browser performance" -msgstr "" - msgid "InProductMarketing|unsubscribe" msgstr "" -msgid "InProductMarketing|update your preferences" -msgstr "" - -msgid "InProductMarketing|using a CI/CD template" -msgstr "" - msgid "InProductMarketing|you may %{unsubscribe_link} at any time." msgstr "" diff --git a/package.json b/package.json index b636f313db2..3d139fb3aa8 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "markdownlint": "markdownlint --config .markdownlint.yml", "markdownlint:no-trailing-spaces": "markdownlint --config doc/.markdownlint/markdownlint-no-trailing-spaces.yml", "markdownlint:no-trailing-spaces:fix": "yarn run markdownlint:no-trailing-spaces --fix", + "preinstall": "node ./scripts/frontend/preinstall.mjs", "postinstall": "node ./scripts/frontend/postinstall.js", "storybook:install": "yarn --cwd ./storybook install", "storybook:build": "yarn --cwd ./storybook build --quiet", diff --git a/qa/gdk/Dockerfile.gdk b/qa/gdk/Dockerfile.gdk index 34895fba406..0926883d00f 100644 --- a/qa/gdk/Dockerfile.gdk +++ b/qa/gdk/Dockerfile.gdk @@ -1,6 +1,7 @@ -ARG BASE_TAG=master +FROM registry.gitlab.com/gitlab-org/gitlab-development-kit/asdf-bootstrapped-verify:main@sha256:14fa752a80df21f840fc48f4be8561bee21b78886ac718652582fdd788d34c32 -FROM registry.gitlab.com/gitlab-org/gitlab-development-kit/asdf-bootstrapped-verify:main@sha256:14fa752a80df21f840fc48f4be8561bee21b78886ac718652582fdd788d34c32 as gdk-base +ENV GITLAB_LICENSE_MODE=test \ + GDK_KILL_CONFIRM=true # Allow passwordless /etc/hosts update by gdk user USER root @@ -8,58 +9,58 @@ RUN echo "gdk ALL=(ALL) NOPASSWD: /usr/bin/tee -a /etc/hosts" >> /etc/sudoers USER gdk -# Clone GDK and save gem cache location -ENV GEM_CACHE_LOCATION=/home/gdk/.gem_cache -ARG GDK_SHA=main -RUN set -eux; \ - git -c advice.detachedHead=false clone --depth 1 https://gitlab.com/gitlab-org/gitlab-development-kit.git; \ - git -C gitlab-development-kit fetch --depth 1 origin ${GDK_SHA}; \ - git -C gitlab-development-kit -c advice.detachedHead=false checkout ${GDK_SHA}; \ - mkdir -p gitlab-development-kit/gitlab; \ - cd gitlab-development-kit && make bootstrap; \ - echo "$(gem env | awk '/- GEM PATHS:/ {flag=1; next} flag && /^[[:space:]]*- / {print $2; exit}')/cache" > ${GEM_CACHE_LOCATION} +# Clone GDK at specific sha and bootstrap packages +# +ARG GDK_SHA=747ab64be815f5c239d5d63209527a42bd838e83 +ARG GEM_CACHE=/home/gdk/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/cache +RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ + set -eux; \ + git clone --depth 1 https://gitlab.com/gitlab-org/gitlab-development-kit.git && cd gitlab-development-kit; \ + git fetch --depth 1 origin ${GDK_SHA} && git -c advice.detachedHead=false checkout ${GDK_SHA}; \ + mkdir gitlab && make bootstrap WORKDIR /home/gdk/gitlab-development-kit COPY --chown=gdk:gdk qa/gdk/gdk.yml ./ -# Build gitaly -# -COPY --chown=gdk:gdk GITALY_SERVER_VERSION ./gitlab/ -RUN set -eux; \ - make gitaly-setup; \ - rm -rf gitaly/_build/cache \ - gitaly/_build/deps/git/source \ - gitaly/_build/deps/libgit2/source \ - gitaly/_build/deps \ - gitaly/_build/intermediate \ - $(cat $GEM_CACHE_LOCATION) \ - && go clean -cache - # Build gitlab-shell # COPY --chown=gdk:gdk GITLAB_SHELL_VERSION ./gitlab/ -RUN set -eux; \ - make gitlab-shell-setup; \ - rm -rf $(cat $GEM_CACHE_LOCATION) \ - && go clean -cache +RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ + set -eux; \ + make gitlab-shell-setup \ + && cd gitlab-shell && go clean -cache -modcache -r # Build gitlab-workhorse # COPY --chown=gdk:gdk VERSION GITLAB_WORKHORSE_VERSION ./gitlab/ COPY --chown=gdk:gdk workhorse ./gitlab/workhorse -RUN set -eux; \ - make gitlab-workhorse-setup \ - && mv gitlab/workhorse ./; \ - rm -rf $(cat $GEM_CACHE_LOCATION) \ - && go clean -cache +RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ + set -eux; \ + make gitlab-workhorse-setup && mv gitlab/workhorse ./ \ + && cd workhorse && go clean -cache -modcache -r + +# Build gitaly +# +COPY --chown=gdk:gdk GITALY_SERVER_VERSION ./gitlab/ +RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ + set -eux; \ + make gitaly-setup; \ + cd gitaly \ + && go clean -cache -modcache -r \ + && rm -rf _build/cache \ + _build/deps/git/source \ + _build/deps/libgit2/source \ + _build/deps \ + _build/intermediate # Install gitlab gem dependencies # COPY --chown=gdk:gdk Gemfile Gemfile.lock ./gitlab/ COPY --chown=gdk:gdk vendor/gems/ ./gitlab/vendor/gems/ COPY --chown=gdk:gdk gems/ ./gitlab/gems/ -RUN make .gitlab-bundle && rm -rf $(cat $GEM_CACHE_LOCATION) +RUN --mount=type=cache,target=${GEM_CACHE},uid=1000,gid=1000 \ + make .gitlab-bundle # Install gitlab npm dependencies # @@ -67,13 +68,6 @@ COPY --chown=gdk:gdk package.json yarn.lock ./gitlab/ COPY --chown=gdk:gdk scripts/frontend/postinstall.js ./gitlab/scripts/frontend/postinstall.js RUN make .gitlab-yarn && yarn cache clean -# Executable gdk image -# -FROM registry.gitlab.com/gitlab-org/gitlab/gitlab-qa-gdk-base:${BASE_TAG} as gdk - -ENV GITLAB_LICENSE_MODE=test \ - GDK_KILL_CONFIRM=true - # Copy code COPY --chown=gdk:gdk ./ ./gitlab/ COPY --chown=gdk:gdk qa/gdk/entrypoint ../ @@ -83,18 +77,9 @@ RUN mkdir -p gitlab/tmp/pids \ && rsync -a --remove-source-files workhorse/ gitlab/workhorse/ # Set up GDK -RUN make \ - redis/redis.conf \ - all \ - && gdk kill \ - && rm -rf $(cat $GEM_CACHE_LOCATION) \ - gitaly/_build/cache \ - gitaly/_build/deps/git/source \ - gitaly/_build/deps/libgit2/source \ - gitaly/_build/deps \ - gitaly/_build/intermediate \ - && go clean -modcache \ - && go clean -cache +RUN SKIP_WORKHORSE_SETUP=true SKIP_GITLAB_SHELL_SETUP=true SKIP_GITALY_SETUP=true \ + make redis/redis.conf all \ + && gdk kill ENTRYPOINT [ "/home/gdk/entrypoint" ] CMD [ "gdk", "tail" ] diff --git a/qa/gdk/Dockerfile.gdk.dockerignore b/qa/gdk/Dockerfile.gdk.dockerignore index d4b2ec7449a..6094d8e817c 100644 --- a/qa/gdk/Dockerfile.gdk.dockerignore +++ b/qa/gdk/Dockerfile.gdk.dockerignore @@ -1,4 +1,8 @@ .bundle/ +.gitlab/ +.lefthook/ +.rubocop_todo/ +.vscode/ builds/ changelogs/ danger/ @@ -10,6 +14,19 @@ log/*.log node_modules/ tmp/* +.eslint* +.gitlab-ci.yml +.haml-lint* +.prettier* +.rubocop* +.stylelintrc +.yamllint +docker-compose.yml +Dockerfile.assets +jest* +lefthook.yml +tests.yml + *.md db/fixtures/ diff --git a/qa/qa/page/project/pipeline/index.rb b/qa/qa/page/project/pipeline/index.rb index 8547cc87908..435d2008d87 100644 --- a/qa/qa/page/project/pipeline/index.rb +++ b/qa/qa/page/project/pipeline/index.rb @@ -5,23 +5,23 @@ module QA module Project module Pipeline class Index < QA::Page::Base - view 'app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_url.vue' do + view 'app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_url.vue' do element :pipeline_url_link end - view 'app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_status_badge.vue' do + view 'app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_status_badge.vue' do element :pipeline_commit_status end - view 'app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipeline_operations.vue' do + view 'app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipeline_operations.vue' do element :pipeline_retry_button end - view 'app/assets/javascripts/ci/pipeline_details/components/pipelines_list/nav_controls.vue' do + view 'app/assets/javascripts/ci/pipeline_details/pipelines_list/components/nav_controls.vue' do element :run_pipeline_button end - view 'app/assets/javascripts/ci/pipeline_details/components/pipelines_list/pipelines_table.vue' do + view 'app/assets/javascripts/ci/pipeline_details/pipelines_list/components/pipelines_table.vue' do element :pipeline_row_container end diff --git a/qa/qa/page/project/pipeline/show.rb b/qa/qa/page/project/pipeline/show.rb index 25b82709511..db678ab1285 100644 --- a/qa/qa/page/project/pipeline/show.rb +++ b/qa/qa/page/project/pipeline/show.rb @@ -7,21 +7,21 @@ module QA class Show < QA::Page::Base include Component::CiBadgeLink - view 'app/assets/javascripts/ci/pipeline_details/components/pipeline_details_header.vue' do + view 'app/assets/javascripts/ci/pipeline_details/header/pipeline_details_header.vue' do element :pipeline_details_header, required: true end - view 'app/assets/javascripts/ci/pipeline_details/components/graph/graph_component.vue' do + view 'app/assets/javascripts/ci/pipeline_details/graph/components/graph_component.vue' do element :pipeline_graph, /class.*pipeline-graph.*/ # rubocop:disable QA/ElementWithPattern end - view 'app/assets/javascripts/ci/pipeline_details/components/graph/job_item.vue' do + view 'app/assets/javascripts/ci/pipeline_details/graph/components/job_item.vue' do element :job_item_container, required: true element :job_link, required: true element :job_action_button end - view 'app/assets/javascripts/ci/pipeline_details/components/graph/linked_pipeline.vue' do + view 'app/assets/javascripts/ci/pipeline_details/graph/components/linked_pipeline.vue' do element :expand_linked_pipeline_button element :linked_pipeline_container element :downstream_title_content @@ -35,7 +35,7 @@ module QA element :status_icon, 'ci-status-icon-${status}' # rubocop:disable QA/ElementWithPattern end - view 'app/assets/javascripts/ci/pipeline_details/components/graph/job_group_dropdown.vue' do + view 'app/assets/javascripts/ci/pipeline_details/graph/components/job_group_dropdown.vue' do element :job_dropdown_container element :jobs_dropdown_menu end diff --git a/scripts/build_gdk_image b/scripts/build_gdk_image index 292d315b5ec..8b1fdec2d7d 100755 --- a/scripts/build_gdk_image +++ b/scripts/build_gdk_image @@ -7,11 +7,12 @@ source "$(dirname "$0")/utils.sh" REGISTRY="${CI_REGISTRY}/${CI_PROJECT_PATH}" SHA_TAG="${CI_COMMIT_SHA}" BRANCH_TAG="${CI_COMMIT_REF_SLUG}" -BASE_TAG=$([ "${BUILD_GDK_BASE}" == "true" ] && echo "${SHA_TAG}" || echo "master") -if [[ -z "${GDK_SHA}" ]]; then - GDK_SHA=$(git ls-remote https://gitlab.com/gitlab-org/gitlab-development-kit.git main | cut -f 1) -fi +# Fetch ruby version based on contents of .ruby-version +RUBY_VERSION=$(cat .ruby-version) +RUBY_VERSION_MINOR=$(echo "$RUBY_VERSION" | awk -F. '{$3=0; OFS="."; print $1,$2,$3}') + +IMAGE="${REGISTRY}/gitlab-qa-gdk" if [[ -n "${CI}" ]]; then OUTPUT_OPTION="--push" @@ -19,34 +20,18 @@ else OUTPUT_OPTION="--load" fi -function build_image() { - local image=$1 - local target=$2 - - echoinfo "Using GDK at SHA ${GDK_SHA}" - - docker buildx build \ - --cache-to="type=inline" \ - --cache-from="${image}:${BRANCH_TAG}" \ - --cache-from="${image}:master" \ - --file="qa/gdk/Dockerfile.gdk" \ - --target="${target}" \ - --platform=${ARCH:-amd64} \ - --tag="${image}:${SHA_TAG}" \ - --tag="${image}:${BRANCH_TAG}" \ - --build-arg="BASE_TAG=${BASE_TAG}" \ - --build-arg="GDK_SHA=${GDK_SHA:-main}" \ - ${OUTPUT_OPTION} \ - . -} - -# Rebuild base image when BUILD_GDK_BASE is set to true -if [[ "${BUILD_GDK_BASE}" == "true" ]]; then - echoinfo "Building GDK base image", "yes" - build_image "${REGISTRY}/gitlab-qa-gdk-base" "gdk-base" -fi - -echoinfo "Building GDK image", "yes" -build_image "${REGISTRY}/gitlab-qa-gdk" "gdk" +echoinfo "Building GDK image with GDK sha: '${GDK_SHA}'" "yes" + +docker buildx build \ + --cache-to="type=inline" \ + --cache-from="${IMAGE}:${BRANCH_TAG}" \ + --cache-from="${IMAGE}:master" \ + --file="qa/gdk/Dockerfile.gdk" \ + --platform=${ARCH:-amd64} \ + --tag="${IMAGE}:${SHA_TAG}" \ + --tag="${IMAGE}:${BRANCH_TAG}" \ + --build-arg="GEM_CACHE=/home/gdk/.asdf/installs/ruby/${RUBY_VERSION}/lib/ruby/gems/${RUBY_VERSION_MINOR}/cache" \ + ${OUTPUT_OPTION} \ + . echosuccess "Built image '${REGISTRY}/gitlab-qa-gdk:${SHA_TAG}'" diff --git a/scripts/frontend/preinstall.mjs b/scripts/frontend/preinstall.mjs new file mode 100644 index 00000000000..09d980344ea --- /dev/null +++ b/scripts/frontend/preinstall.mjs @@ -0,0 +1,59 @@ +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { readFile, rm } from 'node:fs/promises'; + +const ROOT_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..'); +const NODE_MODULES = join(ROOT_PATH, 'node_modules'); +const INTEGRITY_FILE = join(NODE_MODULES, '.yarn-integrity'); +const PACKAGE_JSON = join(ROOT_PATH, 'package.json'); + +function isAliasedDependency(x) { + return x.includes('@npm:'); +} +function serializeAliasedDependencyPatterns(obj) { + return Object.entries(obj).map(([key, version]) => `${key}@${version}`); +} + +async function readJSON(file) { + return JSON.parse(await readFile(file, { encoding: 'utf-8' })); +} + +async function getPrevTopLevelPatterns() { + try { + return (await readJSON(INTEGRITY_FILE))?.topLevelPatterns?.filter(isAliasedDependency); + } catch { + return []; + } +} +async function getCurrentTopLevelPatterns() { + try { + const { dependencies, devDependencies } = await readJSON(PACKAGE_JSON); + + return serializeAliasedDependencyPatterns(dependencies) + .concat(serializeAliasedDependencyPatterns(devDependencies)) + .filter(isAliasedDependency); + } catch { + return []; + } +} + +function arraysHaveSameItems(a1, a2) { + return JSON.stringify(a1.sort()) === JSON.stringify(a2.sort()); +} + +const [prevTopLevelPatterns, currentTopLevelPatterns] = await Promise.all([ + getPrevTopLevelPatterns(), + getCurrentTopLevelPatterns(), +]); + +/** + * Yarn seems to have problems at times, if one uses an <alias>@npm:<name> + * and those packages are being updated. In case one switches branches the + * node_modules folder seems to end up being a corrupted somehow + */ +if (!arraysHaveSameItems(prevTopLevelPatterns, currentTopLevelPatterns)) { + console.error( + '[WARNING] package.json changed significantly. Removing node_modules to be sure there are no problems.', + ); + await rm(NODE_MODULES, { recursive: true, force: true }); +} diff --git a/scripts/frontend/webpack_dev_server.js b/scripts/frontend/webpack_dev_server.js index a76e6dc024a..ae73c14b501 100755 --- a/scripts/frontend/webpack_dev_server.js +++ b/scripts/frontend/webpack_dev_server.js @@ -30,17 +30,15 @@ if (STATIC_MODE) { // run webpack through webpack-dev-server, optionally compiling a DLL to reduce memory else { - const watch = ['config/webpack.config.js']; + const watch = [ + 'config/webpack.config.js', + // ensure we refresh when running yarn install + 'node_modules/.yarn-integrity', + ]; // if utilizing the vendor DLL, we need to restart the process when dependency changes occur if (DLL_MODE) { - watch.push( - 'config/webpack.vendor.config.js', - // ensure we refresh when running yarn install - 'node_modules/.yarn-integrity', - 'package.json', - 'yarn.lock', - ); + watch.push('config/webpack.vendor.config.js', 'package.json', 'yarn.lock'); } nodemon({ exec: 'webpack-dev-server --config config/webpack.config.js', diff --git a/spec/contracts/consumer/resources/graphql/pipelines.js b/spec/contracts/consumer/resources/graphql/pipelines.js index 2675597e10a..201045e011f 100644 --- a/spec/contracts/consumer/resources/graphql/pipelines.js +++ b/spec/contracts/consumer/resources/graphql/pipelines.js @@ -5,7 +5,7 @@ import { extractGraphQLQuery } from '../../helpers/graphql_query_extractor'; export async function getPipelineHeaderDataRequest(endpoint) { const { url } = endpoint; const query = await extractGraphQLQuery( - 'app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_header_data.query.graphql', + 'app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql', ); const graphqlQuery = { query, diff --git a/spec/contracts/consumer/specs/project/pipelines/show.spec.js b/spec/contracts/consumer/specs/project/pipelines/show.spec.js index 423d85f21eb..d2743b1037f 100644 --- a/spec/contracts/consumer/specs/project/pipelines/show.spec.js +++ b/spec/contracts/consumer/specs/project/pipelines/show.spec.js @@ -27,7 +27,7 @@ pactWith( describe(GET_PIPELINE_HEADER_DATA_PROVIDER_NAME, () => { beforeEach(async () => { const query = await extractGraphQLQuery( - 'app/assets/javascripts/ci/pipeline_details/graphql/queries/get_pipeline_header_data.query.graphql', + 'app/assets/javascripts/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql', ); const graphqlQuery = new GraphQLInteraction() .given(PipelineHeaderData.scenario.state) diff --git a/spec/frontend/ci/pipeline_editor/components/header/pipeline_editor_mini_graph_spec.js b/spec/frontend/ci/pipeline_editor/components/header/pipeline_editor_mini_graph_spec.js index 57220dfbd74..4ec1dd4b605 100644 --- a/spec/frontend/ci/pipeline_editor/components/header/pipeline_editor_mini_graph_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/header/pipeline_editor_mini_graph_spec.js @@ -4,7 +4,7 @@ import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import PipelineEditorMiniGraph from '~/ci/pipeline_editor/components/header/pipeline_editor_mini_graph.vue'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; import getLinkedPipelinesQuery from '~/ci/pipeline_details/graphql/queries/get_linked_pipelines.query.graphql'; import { PIPELINE_FAILURE } from '~/ci/pipeline_editor/constants'; import { mockLinkedPipelines, mockProjectFullPath, mockProjectPipeline } from '../../mock_data'; diff --git a/spec/frontend/ci/pipeline_editor/components/header/pipeline_status_spec.js b/spec/frontend/ci/pipeline_editor/components/header/pipeline_status_spec.js index 5423e7d4e40..1a2ed60a6f4 100644 --- a/spec/frontend/ci/pipeline_editor/components/header/pipeline_status_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/header/pipeline_status_spec.js @@ -6,8 +6,9 @@ import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import PipelineStatus, { i18n } from '~/ci/pipeline_editor/components/header/pipeline_status.vue'; import getPipelineQuery from '~/ci/pipeline_editor/graphql/queries/pipeline.query.graphql'; -import PipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/pipeline_mini_graph.vue'; +import PipelineMiniGraph from '~/ci/pipeline_mini_graph/pipeline_mini_graph.vue'; import PipelineEditorMiniGraph from '~/ci/pipeline_editor/components/header/pipeline_editor_mini_graph.vue'; +import getPipelineEtag from '~/ci/pipeline_editor/graphql/queries/client/pipeline_etag.query.graphql'; import { mockCommitSha, mockProjectPipeline, mockProjectFullPath } from '../../mock_data'; Vue.use(VueApollo); @@ -21,6 +22,16 @@ describe('Pipeline Status', () => { const handlers = [[getPipelineQuery, mockPipelineQuery]]; mockApollo = createMockApollo(handlers); + mockApollo.clients.defaultClient.cache.writeQuery({ + query: getPipelineEtag, + data: { + etags: { + __typename: 'EtagValues', + pipeline: 'pipelines/1', + }, + }, + }); + wrapper = shallowMount(PipelineStatus, { apolloProvider: mockApollo, propsData: { diff --git a/spec/frontend/ci/pipeline_editor/components/pipeline_editor_tabs_spec.js b/spec/frontend/ci/pipeline_editor/components/pipeline_editor_tabs_spec.js index 914fdfbcc37..69e91f11309 100644 --- a/spec/frontend/ci/pipeline_editor/components/pipeline_editor_tabs_spec.js +++ b/spec/frontend/ci/pipeline_editor/components/pipeline_editor_tabs_spec.js @@ -19,7 +19,7 @@ import { VALIDATE_TAB, VALIDATE_TAB_BADGE_DISMISSED_KEY, } from '~/ci/pipeline_editor/constants'; -import PipelineGraph from '~/ci/pipeline_details/components/pipeline_graph/pipeline_graph.vue'; +import PipelineGraph from '~/ci/pipeline_editor/components/graph/pipeline_graph.vue'; import getBlobContent from '~/ci/pipeline_editor/graphql/queries/blob_content.query.graphql'; import { mockBlobContentQueryResponse, diff --git a/spec/frontend/ci/pipeline_editor/mock_data.js b/spec/frontend/ci/pipeline_editor/mock_data.js index 245cdfa7043..e08c35f1555 100644 --- a/spec/frontend/ci/pipeline_editor/mock_data.js +++ b/spec/frontend/ci/pipeline_editor/mock_data.js @@ -1,5 +1,5 @@ import { CI_CONFIG_STATUS_INVALID, CI_CONFIG_STATUS_VALID } from '~/ci/pipeline_editor/constants'; -import { unwrapStagesWithNeeds } from '~/ci/pipeline_details/components/unwrapping_utils'; +import { unwrapStagesWithNeeds } from '~/ci/pipeline_details/utils/unwrapping_utils'; import { DOCS_URL_IN_EE_DIR } from 'jh_else_ce/lib/utils/url_utility'; export const commonOptions = { diff --git a/spec/frontend/ci/pipeline_schedules/mock_data.js b/spec/frontend/ci/pipeline_schedules/mock_data.js index 8d4e0f1bea6..711b120c61e 100644 --- a/spec/frontend/ci/pipeline_schedules/mock_data.js +++ b/spec/frontend/ci/pipeline_schedules/mock_data.js @@ -1,8 +1,8 @@ // Fixture located at spec/frontend/fixtures/pipeline_schedules.rb +import mockGetSinglePipelineScheduleGraphQLResponse from 'test_fixtures/graphql/pipeline_schedules/get_pipeline_schedules.query.graphql.single.json'; import mockGetPipelineSchedulesGraphQLResponse from 'test_fixtures/graphql/pipeline_schedules/get_pipeline_schedules.query.graphql.json'; import mockGetPipelineSchedulesAsGuestGraphQLResponse from 'test_fixtures/graphql/pipeline_schedules/get_pipeline_schedules.query.graphql.as_guest.json'; import mockGetPipelineSchedulesTakeOwnershipGraphQLResponse from 'test_fixtures/graphql/pipeline_schedules/get_pipeline_schedules.query.graphql.take_ownership.json'; -import mockGetSinglePipelineScheduleGraphQLResponse from 'test_fixtures/graphql/pipeline_schedules/get_pipeline_schedules.query.graphql.single.json'; const { data: { diff --git a/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js b/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js index 6b0286bbbf3..891cd0a6b83 100644 --- a/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js +++ b/spec/frontend/commit/commit_box_pipeline_mini_graph_spec.js @@ -7,11 +7,11 @@ import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; import CommitBoxPipelineMiniGraph from '~/projects/commit_box/info/components/commit_box_pipeline_mini_graph.vue'; -import PipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/pipeline_mini_graph.vue'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import PipelineMiniGraph from '~/ci/pipeline_mini_graph/pipeline_mini_graph.vue'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; import { COMMIT_BOX_POLL_INTERVAL } from '~/projects/commit_box/info/constants'; import getLinkedPipelinesQuery from '~/ci/pipeline_details/graphql/queries/get_linked_pipelines.query.graphql'; -import getPipelineStagesQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_stages.query.graphql'; +import getPipelineStagesQuery from '~/ci/pipeline_mini_graph/graphql/queries/get_pipeline_stages.query.graphql'; import * as sharedGraphQlUtils from '~/graphql_shared/utils'; import { mockDownstreamQueryResponse, diff --git a/spec/frontend/commit/pipelines/pipelines_table_wrapper_spec.js b/spec/frontend/commit/pipelines/pipelines_table_wrapper_spec.js index f639c5f86a0..78e303bd6aa 100644 --- a/spec/frontend/commit/pipelines/pipelines_table_wrapper_spec.js +++ b/spec/frontend/commit/pipelines/pipelines_table_wrapper_spec.js @@ -8,7 +8,7 @@ import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; import PipelinesTableWrapper from '~/commit/pipelines/pipelines_table_wrapper.vue'; -import getMergeRequestsPipelines from '~/ci/pipeline_details/graphql/queries/get_merge_request_pipelines.query.graphql'; +import getMergeRequestsPipelines from '~/ci/merge_requests/graphql/queries/get_merge_request_pipelines.query.graphql'; import { mergeRequestPipelinesResponse } from '../mock_data'; diff --git a/spec/frontend/fixtures/pipeline_header.rb b/spec/frontend/fixtures/pipeline_header.rb index 25abfe47dc7..744df18a403 100644 --- a/spec/frontend/fixtures/pipeline_header.rb +++ b/spec/frontend/fixtures/pipeline_header.rb @@ -12,7 +12,7 @@ RSpec.describe "GraphQL Pipeline Header", '(JavaScript fixtures)', type: :reques let_it_be(:user) { project.first_owner } let_it_be(:commit) { create(:commit, project: project) } - let(:query_path) { 'ci/pipeline_details/graphql/queries/get_pipeline_header_data.query.graphql' } + let(:query_path) { 'ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql' } context 'with successful pipeline' do let_it_be(:pipeline) do diff --git a/spec/frontend/fixtures/pipelines.rb b/spec/frontend/fixtures/pipelines.rb index 44911e93dd1..61433363ce7 100644 --- a/spec/frontend/fixtures/pipelines.rb +++ b/spec/frontend/fixtures/pipelines.rb @@ -71,7 +71,7 @@ RSpec.describe Projects::PipelinesController, '(JavaScript fixtures)', type: :co end let_it_be(:query) do - get_graphql_query_as_string("ci/pipeline_details/graphql/queries/#{get_pipeline_actions_query}") + get_graphql_query_as_string("ci/pipeline_details/pipelines_list/graphql/queries/#{get_pipeline_actions_query}") end it "#{fixtures_path}#{get_pipeline_actions_query}.json" do diff --git a/spec/frontend/pipelines/components/dag/dag_annotations_spec.js b/spec/frontend/pipelines/components/dag/dag_annotations_spec.js index 03e4b79ca4a..be9d7a8b714 100644 --- a/spec/frontend/pipelines/components/dag/dag_annotations_spec.js +++ b/spec/frontend/pipelines/components/dag/dag_annotations_spec.js @@ -1,7 +1,7 @@ import { GlButton } from '@gitlab/ui'; import { shallowMount, mount } from '@vue/test-utils'; import { nextTick } from 'vue'; -import DagAnnotations from '~/ci/pipeline_details/components/dag/dag_annotations.vue'; +import DagAnnotations from '~/ci/pipeline_details/dag/components/dag_annotations.vue'; import { singleNote, multiNote } from './mock_data'; describe('The DAG annotations', () => { diff --git a/spec/frontend/pipelines/components/dag/dag_graph_spec.js b/spec/frontend/pipelines/components/dag/dag_graph_spec.js index e7d632bdeeb..23f62ab9d93 100644 --- a/spec/frontend/pipelines/components/dag/dag_graph_spec.js +++ b/spec/frontend/pipelines/components/dag/dag_graph_spec.js @@ -1,13 +1,9 @@ import { shallowMount } from '@vue/test-utils'; -import { - IS_HIGHLIGHTED, - LINK_SELECTOR, - NODE_SELECTOR, -} from '~/ci/pipeline_details/components/dag/constants'; -import DagGraph from '~/ci/pipeline_details/components/dag/dag_graph.vue'; -import { createSankey } from '~/ci/pipeline_details/components/dag/drawing_utils'; -import { highlightIn, highlightOut } from '~/ci/pipeline_details/components/dag/interactions'; -import { removeOrphanNodes } from '~/ci/pipeline_details/components/parsing_utils'; +import { IS_HIGHLIGHTED, LINK_SELECTOR, NODE_SELECTOR } from '~/ci/pipeline_details/dag/constants'; +import DagGraph from '~/ci/pipeline_details/dag/components/dag_graph.vue'; +import { createSankey } from '~/ci/pipeline_details/dag/drawing_utils'; +import { highlightIn, highlightOut } from '~/ci/pipeline_details/dag/interactions'; +import { removeOrphanNodes } from '~/ci/pipeline_details/utils/parsing_utils'; import { parsedData } from './mock_data'; describe('The DAG graph', () => { diff --git a/spec/frontend/pipelines/components/dag/dag_spec.js b/spec/frontend/pipelines/components/dag/dag_spec.js index 2cc1e9cd48f..de9490be607 100644 --- a/spec/frontend/pipelines/components/dag/dag_spec.js +++ b/spec/frontend/pipelines/components/dag/dag_spec.js @@ -1,14 +1,10 @@ import { GlAlert, GlEmptyState } from '@gitlab/ui'; import { mount, shallowMount } from '@vue/test-utils'; import { nextTick } from 'vue'; -import { - ADD_NOTE, - REMOVE_NOTE, - REPLACE_NOTES, -} from '~/ci/pipeline_details/components/dag/constants'; -import Dag from '~/ci/pipeline_details/components/dag/dag.vue'; -import DagAnnotations from '~/ci/pipeline_details/components/dag/dag_annotations.vue'; -import DagGraph from '~/ci/pipeline_details/components/dag/dag_graph.vue'; +import { ADD_NOTE, REMOVE_NOTE, REPLACE_NOTES } from '~/ci/pipeline_details/dag/constants'; +import Dag from '~/ci/pipeline_details/dag/dag.vue'; +import DagAnnotations from '~/ci/pipeline_details/dag/components/dag_annotations.vue'; +import DagGraph from '~/ci/pipeline_details/dag/components/dag_graph.vue'; import { PARSE_FAILURE, UNSUPPORTED_DATA } from '~/ci/pipeline_details/constants'; import { diff --git a/spec/frontend/pipelines/components/dag/drawing_utils_spec.js b/spec/frontend/pipelines/components/dag/drawing_utils_spec.js index 41daf7065d5..6f3fd05ae4b 100644 --- a/spec/frontend/pipelines/components/dag/drawing_utils_spec.js +++ b/spec/frontend/pipelines/components/dag/drawing_utils_spec.js @@ -1,5 +1,5 @@ -import { createSankey } from '~/ci/pipeline_details/components/dag/drawing_utils'; -import { parseData } from '~/ci/pipeline_details/components/parsing_utils'; +import { createSankey } from '~/ci/pipeline_details/dag/drawing_utils'; +import { parseData } from '~/ci/pipeline_details/utils/parsing_utils'; import { mockParsedGraphQLNodes } from './mock_data'; describe('DAG visualization drawing utilities', () => { diff --git a/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js b/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js index c58b09871b9..b2d443c18ca 100644 --- a/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js +++ b/spec/frontend/pipelines/components/jobs/failed_jobs_app_spec.js @@ -5,9 +5,9 @@ import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; -import FailedJobsApp from '~/ci/pipeline_details/components/jobs/failed_jobs_app.vue'; -import FailedJobsTable from '~/ci/pipeline_details/components/jobs/failed_jobs_table.vue'; -import GetFailedJobsQuery from '~/ci/pipeline_details/graphql/queries/get_failed_jobs.query.graphql'; +import FailedJobsApp from '~/ci/pipeline_details/jobs/failed_jobs_app.vue'; +import FailedJobsTable from '~/ci/pipeline_details/jobs/components/failed_jobs_table.vue'; +import GetFailedJobsQuery from '~/ci/pipeline_details/jobs/graphql/queries/get_failed_jobs.query.graphql'; import { mockFailedJobsQueryResponse } from '../../mock_data'; Vue.use(VueApollo); diff --git a/spec/frontend/pipelines/components/jobs/failed_jobs_table_spec.js b/spec/frontend/pipelines/components/jobs/failed_jobs_table_spec.js index 16f8cd1ea19..cb2d8ad85d5 100644 --- a/spec/frontend/pipelines/components/jobs/failed_jobs_table_spec.js +++ b/spec/frontend/pipelines/components/jobs/failed_jobs_table_spec.js @@ -7,8 +7,8 @@ import waitForPromises from 'helpers/wait_for_promises'; import { mountExtended } from 'helpers/vue_test_utils_helper'; import { createAlert } from '~/alert'; import { redirectTo } from '~/lib/utils/url_utility'; // eslint-disable-line import/no-deprecated -import FailedJobsTable from '~/ci/pipeline_details/components/jobs/failed_jobs_table.vue'; -import RetryFailedJobMutation from '~/ci/pipeline_details/graphql/mutations/retry_failed_job.mutation.graphql'; +import FailedJobsTable from '~/ci/pipeline_details/jobs/components/failed_jobs_table.vue'; +import RetryFailedJobMutation from '~/ci/pipeline_details/jobs/graphql/mutations/retry_failed_job.mutation.graphql'; import { TRACKING_CATEGORIES } from '~/ci/pipeline_details/constants'; import { successRetryMutationResponse, diff --git a/spec/frontend/pipelines/components/jobs/jobs_app_spec.js b/spec/frontend/pipelines/components/jobs/jobs_app_spec.js index 4e48d20d7e2..bdbbec15e1e 100644 --- a/spec/frontend/pipelines/components/jobs/jobs_app_spec.js +++ b/spec/frontend/pipelines/components/jobs/jobs_app_spec.js @@ -5,9 +5,9 @@ import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; -import JobsApp from '~/ci/pipeline_details/components/jobs/jobs_app.vue'; +import JobsApp from '~/ci/pipeline_details/jobs/jobs_app.vue'; import JobsTable from '~/jobs/components/table/jobs_table.vue'; -import getPipelineJobsQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_jobs.query.graphql'; +import getPipelineJobsQuery from '~/ci/pipeline_details/jobs/graphql/queries/get_pipeline_jobs.query.graphql'; import { mockPipelineJobsQueryResponse } from '../../mock_data'; Vue.use(VueApollo); diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/job_item_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/job_item_spec.js index e7607325602..9c14e75caa4 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/job_item_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/job_item_spec.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils'; -import JobItem from '~/ci/pipeline_details/components/pipeline_mini_graph/job_item.vue'; +import JobItem from '~/ci/pipeline_mini_graph/job_item.vue'; describe('JobItem', () => { let wrapper; diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/legacy_pipeline_mini_graph_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/legacy_pipeline_mini_graph_spec.js index fa2fd1d648f..916f3053153 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/legacy_pipeline_mini_graph_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/legacy_pipeline_mini_graph_spec.js @@ -1,7 +1,7 @@ import { mount } from '@vue/test-utils'; import { pipelines } from 'test_fixtures/pipelines/pipelines.json'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; -import PipelineStages from '~/ci/pipeline_details/components/pipeline_mini_graph/pipeline_stages.vue'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import PipelineStages from '~/ci/pipeline_mini_graph/pipeline_stages.vue'; import mockLinkedPipelines from './linked_pipelines_mock_data'; const mockStages = pipelines[0].details.stages; diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/legacy_pipeline_stage_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/legacy_pipeline_stage_spec.js index b6ab8fa1ebe..6573aaf39fa 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/legacy_pipeline_stage_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/legacy_pipeline_stage_spec.js @@ -5,7 +5,7 @@ import MockAdapter from 'axios-mock-adapter'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status'; -import LegacyPipelineStage from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_stage.vue'; +import LegacyPipelineStage from '~/ci/pipeline_mini_graph/legacy_pipeline_stage.vue'; import eventHub from '~/ci/pipeline_details/event_hub'; import waitForPromises from 'helpers/wait_for_promises'; import { stageReply } from '../../mock_data'; diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/linked_pipelines_mini_list_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/linked_pipelines_mini_list_spec.js index 513acab1874..0396029cdaf 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/linked_pipelines_mini_list_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/linked_pipelines_mini_list_spec.js @@ -1,7 +1,7 @@ import { mount } from '@vue/test-utils'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; import { createMockDirective, getBinding } from 'helpers/vue_mock_directive'; -import LinkedPipelinesMiniList from '~/ci/pipeline_details/components/pipeline_mini_graph/linked_pipelines_mini_list.vue'; +import LinkedPipelinesMiniList from '~/ci/pipeline_mini_graph/linked_pipelines_mini_list.vue'; import mockData from './linked_pipelines_mock_data'; describe('Linked pipeline mini list', () => { diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_mini_graph_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_mini_graph_spec.js index 98b19535a86..6833726a297 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_mini_graph_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_mini_graph_spec.js @@ -8,9 +8,9 @@ import waitForPromises from 'helpers/wait_for_promises'; import createMockApollo from 'helpers/mock_apollo_helper'; import getLinkedPipelinesQuery from '~/ci/pipeline_details/graphql/queries/get_linked_pipelines.query.graphql'; -import getPipelineStagesQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_stages.query.graphql'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; -import PipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/pipeline_mini_graph.vue'; +import getPipelineStagesQuery from '~/ci/pipeline_mini_graph/graphql/queries/get_pipeline_stages.query.graphql'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import PipelineMiniGraph from '~/ci/pipeline_mini_graph/pipeline_mini_graph.vue'; import * as sharedGraphQlUtils from '~/graphql_shared/utils'; import { diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stage_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stage_spec.js index ec1f3fb61c9..96966bcbb84 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stage_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stage_spec.js @@ -4,8 +4,8 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; import createMockApollo from 'helpers/mock_apollo_helper'; -import getPipelineStageQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_stage.query.graphql'; -import PipelineStage from '~/ci/pipeline_details/components/pipeline_mini_graph/pipeline_stage.vue'; +import getPipelineStageQuery from '~/ci/pipeline_mini_graph/graphql/queries/get_pipeline_stage.query.graphql'; +import PipelineStage from '~/ci/pipeline_mini_graph/pipeline_stage.vue'; Vue.use(VueApollo); diff --git a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stages_spec.js b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stages_spec.js index 717e66b2e31..bbd39c6fcd9 100644 --- a/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stages_spec.js +++ b/spec/frontend/pipelines/components/pipeline_mini_graph/pipeline_stages_spec.js @@ -1,7 +1,7 @@ import { shallowMount } from '@vue/test-utils'; import { pipelines } from 'test_fixtures/pipelines/pipelines.json'; -import LegacyPipelineStage from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_stage.vue'; -import PipelineStages from '~/ci/pipeline_details/components/pipeline_mini_graph/pipeline_stages.vue'; +import LegacyPipelineStage from '~/ci/pipeline_mini_graph/legacy_pipeline_stage.vue'; +import PipelineStages from '~/ci/pipeline_mini_graph/pipeline_stages.vue'; const mockStages = pipelines[0].details.stages; diff --git a/spec/frontend/pipelines/components/pipeline_tabs_spec.js b/spec/frontend/pipelines/components/pipeline_tabs_spec.js index 2974f4fb916..700d51930dd 100644 --- a/spec/frontend/pipelines/components/pipeline_tabs_spec.js +++ b/spec/frontend/pipelines/components/pipeline_tabs_spec.js @@ -1,7 +1,7 @@ import { GlTab } from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; -import PipelineTabs from '~/ci/pipeline_details/components/pipeline_tabs.vue'; +import PipelineTabs from '~/ci/pipeline_details/tabs/pipeline_tabs.vue'; import { TRACKING_CATEGORIES } from '~/ci/pipeline_details/constants'; describe('The Pipeline Tabs', () => { diff --git a/spec/frontend/pipelines/components/pipelines_filtered_search_spec.js b/spec/frontend/pipelines/components/pipelines_filtered_search_spec.js index c2afeb2ccb9..431f32ce24f 100644 --- a/spec/frontend/pipelines/components/pipelines_filtered_search_spec.js +++ b/spec/frontend/pipelines/components/pipelines_filtered_search_spec.js @@ -5,7 +5,7 @@ import { nextTick } from 'vue'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; import Api from '~/api'; import axios from '~/lib/utils/axios_utils'; -import PipelinesFilteredSearch from '~/ci/pipeline_details/components/pipelines_list/pipelines_filtered_search.vue'; +import PipelinesFilteredSearch from '~/ci/pipeline_details/pipelines_list/components/pipelines_filtered_search.vue'; import { FILTERED_SEARCH_TERM, OPERATORS_IS, diff --git a/spec/frontend/pipelines/components/pipelines_list/empty_state/ci_templates_spec.js b/spec/frontend/pipelines/components/pipelines_list/empty_state/ci_templates_spec.js index d83d536017e..558063ecba5 100644 --- a/spec/frontend/pipelines/components/pipelines_list/empty_state/ci_templates_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/empty_state/ci_templates_spec.js @@ -1,6 +1,6 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; -import CiTemplates from '~/ci/pipeline_details/components/pipelines_list/empty_state/ci_templates.vue'; +import CiTemplates from '~/ci/pipeline_details/pipelines_list/empty_state/ci_templates.vue'; const pipelineEditorPath = '/-/ci/editor'; const suggestedCiTemplates = [ diff --git a/spec/frontend/pipelines/components/pipelines_list/empty_state/ios_templates_spec.js b/spec/frontend/pipelines/components/pipelines_list/empty_state/ios_templates_spec.js index ffb3cf2a294..cdd3053d66a 100644 --- a/spec/frontend/pipelines/components/pipelines_list/empty_state/ios_templates_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/empty_state/ios_templates_spec.js @@ -3,8 +3,8 @@ import { nextTick } from 'vue'; import { GlPopover, GlButton } from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import RunnerInstructionsModal from '~/vue_shared/components/runner_instructions/runner_instructions_modal.vue'; -import IosTemplates from '~/ci/pipeline_details/components/pipelines_list/empty_state/ios_templates.vue'; -import CiTemplates from '~/ci/pipeline_details/components/pipelines_list/empty_state/ci_templates.vue'; +import IosTemplates from '~/ci/pipeline_details/pipelines_list/empty_state/ios_templates.vue'; +import CiTemplates from '~/ci/pipeline_details/pipelines_list/empty_state/ci_templates.vue'; const pipelineEditorPath = '/-/ci/editor'; const registrationToken = 'SECRET_TOKEN'; diff --git a/spec/frontend/pipelines/components/pipelines_list/empty_state/pipelines_ci_templates_spec.js b/spec/frontend/pipelines/components/pipelines_list/empty_state/pipelines_ci_templates_spec.js index fc4020c7f6a..76b4cc163b2 100644 --- a/spec/frontend/pipelines/components/pipelines_list/empty_state/pipelines_ci_templates_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/empty_state/pipelines_ci_templates_spec.js @@ -1,8 +1,8 @@ import '~/commons'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; -import PipelinesCiTemplates from '~/ci/pipeline_details/components/pipelines_list/empty_state/pipelines_ci_templates.vue'; -import CiTemplates from '~/ci/pipeline_details/components/pipelines_list/empty_state/ci_templates.vue'; +import PipelinesCiTemplates from '~/ci/pipeline_details/pipelines_list/empty_state/pipelines_ci_templates.vue'; +import CiTemplates from '~/ci/pipeline_details/pipelines_list/empty_state/ci_templates.vue'; const pipelineEditorPath = '/-/ci/editor'; diff --git a/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_job_details_spec.js b/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_job_details_spec.js index 2e76da7ed66..cc68af4f7f3 100644 --- a/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_job_details_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_job_details_spec.js @@ -6,9 +6,9 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; -import FailedJobDetails from '~/ci/pipeline_details/components/pipelines_list/failure_widget/failed_job_details.vue'; -import RetryMrFailedJobMutation from '~/ci/pipeline_details/graphql/mutations/retry_mr_failed_job.mutation.graphql'; -import { BRIDGE_KIND } from '~/ci/pipeline_details/components/graph/constants'; +import FailedJobDetails from '~/ci/pipeline_details/pipelines_list/failure_widget/failed_job_details.vue'; +import RetryMrFailedJobMutation from '~/ci/merge_requests/graphql/mutations/retry_mr_failed_job.mutation.graphql'; +import { BRIDGE_KIND } from '~/ci/pipeline_details/graph/constants'; import { job } from './mock'; Vue.use(VueApollo); diff --git a/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_jobs_list_spec.js b/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_jobs_list_spec.js index 6865b63d055..6c1c5f9c223 100644 --- a/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_jobs_list_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/failure_widget/failed_jobs_list_spec.js @@ -6,10 +6,10 @@ import createMockApollo from 'helpers/mock_apollo_helper'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { createAlert } from '~/alert'; -import FailedJobsList from '~/ci/pipeline_details/components/pipelines_list/failure_widget/failed_jobs_list.vue'; -import FailedJobDetails from '~/ci/pipeline_details/components/pipelines_list/failure_widget/failed_job_details.vue'; -import * as utils from '~/ci/pipeline_details/components/pipelines_list/failure_widget/utils'; -import getPipelineFailedJobs from '~/ci/pipeline_details/graphql/queries/get_pipeline_failed_jobs.query.graphql'; +import FailedJobsList from '~/ci/pipeline_details/pipelines_list/failure_widget/failed_jobs_list.vue'; +import FailedJobDetails from '~/ci/pipeline_details/pipelines_list/failure_widget/failed_job_details.vue'; +import * as utils from '~/ci/pipeline_details/pipelines_list/failure_widget/utils'; +import getPipelineFailedJobs from '~/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_failed_jobs.query.graphql'; import { failedJobsMock, failedJobsMock2, failedJobsMockEmpty, activeFailedJobsMock } from './mock'; Vue.use(VueApollo); diff --git a/spec/frontend/pipelines/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget_spec.js b/spec/frontend/pipelines/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget_spec.js index 7bcde4d57d8..5135bf57b22 100644 --- a/spec/frontend/pipelines/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget_spec.js @@ -1,7 +1,7 @@ import { GlButton, GlCard, GlIcon, GlPopover } from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; -import PipelineFailedJobsWidget from '~/ci/pipeline_details/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue'; -import FailedJobsList from '~/ci/pipeline_details/components/pipelines_list/failure_widget/failed_jobs_list.vue'; +import PipelineFailedJobsWidget from '~/ci/pipeline_details/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue'; +import FailedJobsList from '~/ci/pipeline_details/pipelines_list/failure_widget/failed_jobs_list.vue'; jest.mock('~/alert'); diff --git a/spec/frontend/pipelines/components/pipelines_list/failure_widget/utils_spec.js b/spec/frontend/pipelines/components/pipelines_list/failure_widget/utils_spec.js index 73115091456..16a0da4e054 100644 --- a/spec/frontend/pipelines/components/pipelines_list/failure_widget/utils_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/failure_widget/utils_spec.js @@ -1,7 +1,7 @@ import { isFailedJob, sortJobsByStatus, -} from '~/ci/pipeline_details/components/pipelines_list/failure_widget/utils'; +} from '~/ci/pipeline_details/pipelines_list/failure_widget/utils'; describe('isFailedJob', () => { describe('when the job argument is undefined', () => { diff --git a/spec/frontend/pipelines/components/pipelines_list/pipieline_stop_modal_spec.js b/spec/frontend/pipelines/components/pipelines_list/pipeline_stop_modal_spec.js index 9314522282f..15a202424d0 100644 --- a/spec/frontend/pipelines/components/pipelines_list/pipieline_stop_modal_spec.js +++ b/spec/frontend/pipelines/components/pipelines_list/pipeline_stop_modal_spec.js @@ -1,6 +1,6 @@ import { shallowMount } from '@vue/test-utils'; import { GlSprintf } from '@gitlab/ui'; -import PipelineStopModal from '~/ci/pipeline_details/components/pipelines_list/pipeline_stop_modal.vue'; +import PipelineStopModal from '~/ci/pipeline_details/pipelines_list/components/pipeline_stop_modal.vue'; import { mockPipelineHeader } from '../../mock_data'; describe('PipelineStopModal', () => { diff --git a/spec/frontend/pipelines/empty_state_spec.js b/spec/frontend/pipelines/empty_state_spec.js index f264b21f6a3..6ef37f59f66 100644 --- a/spec/frontend/pipelines/empty_state_spec.js +++ b/spec/frontend/pipelines/empty_state_spec.js @@ -2,10 +2,10 @@ import '~/commons'; import { shallowMount } from '@vue/test-utils'; import { GlEmptyState } from '@gitlab/ui'; import { stubExperiments } from 'helpers/experimentation_helper'; -import EmptyState from '~/ci/pipeline_details/components/pipelines_list/empty_state.vue'; +import EmptyState from '~/ci/pipeline_details/pipelines_list/empty_state/no_ci_empty_state.vue'; import GitlabExperiment from '~/experimentation/components/gitlab_experiment.vue'; -import PipelinesCiTemplates from '~/ci/pipeline_details/components/pipelines_list/empty_state/pipelines_ci_templates.vue'; -import IosTemplates from '~/ci/pipeline_details/components/pipelines_list/empty_state/ios_templates.vue'; +import PipelinesCiTemplates from '~/ci/pipeline_details/pipelines_list/empty_state/pipelines_ci_templates.vue'; +import IosTemplates from '~/ci/pipeline_details/pipelines_list/empty_state/ios_templates.vue'; describe('Pipelines Empty State', () => { let wrapper; diff --git a/spec/frontend/pipelines/graph/action_component_spec.js b/spec/frontend/pipelines/graph/action_component_spec.js index c0774f2def2..9e177156d0e 100644 --- a/spec/frontend/pipelines/graph/action_component_spec.js +++ b/spec/frontend/pipelines/graph/action_component_spec.js @@ -5,7 +5,7 @@ import { nextTick } from 'vue'; import waitForPromises from 'helpers/wait_for_promises'; import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; -import ActionComponent from '~/ci/pipeline_details/components/jobs_shared/action_component.vue'; +import ActionComponent from '~/ci/common/private/job_action_component.vue'; describe('pipeline graph action component', () => { let wrapper; diff --git a/spec/frontend/pipelines/graph/graph_component_spec.js b/spec/frontend/pipelines/graph/graph_component_spec.js index 8ff54b06334..e468adada0f 100644 --- a/spec/frontend/pipelines/graph/graph_component_spec.js +++ b/spec/frontend/pipelines/graph/graph_component_spec.js @@ -1,13 +1,13 @@ import { shallowMount } from '@vue/test-utils'; import mockPipelineResponse from 'test_fixtures/pipelines/pipeline_details.json'; import { mountExtended } from 'helpers/vue_test_utils_helper'; -import { LAYER_VIEW, STAGE_VIEW } from '~/ci/pipeline_details/components/graph/constants'; -import PipelineGraph from '~/ci/pipeline_details/components/graph/graph_component.vue'; -import JobItem from '~/ci/pipeline_details/components/graph/job_item.vue'; -import LinkedPipelinesColumn from '~/ci/pipeline_details/components/graph/linked_pipelines_column.vue'; -import StageColumnComponent from '~/ci/pipeline_details/components/graph/stage_column_component.vue'; -import { calculatePipelineLayersInfo } from '~/ci/pipeline_details/components/graph/utils'; -import LinksLayer from '~/ci/pipeline_details/components/graph_shared/links_layer.vue'; +import { LAYER_VIEW, STAGE_VIEW } from '~/ci/pipeline_details/graph/constants'; +import PipelineGraph from '~/ci/pipeline_details/graph/components/graph_component.vue'; +import JobItem from '~/ci/pipeline_details/graph/components/job_item.vue'; +import LinkedPipelinesColumn from '~/ci/pipeline_details/graph/components/linked_pipelines_column.vue'; +import StageColumnComponent from '~/ci/pipeline_details/graph/components/stage_column_component.vue'; +import { calculatePipelineLayersInfo } from '~/ci/pipeline_details/graph/utils'; +import LinksLayer from '~/ci/common/private/job_links_layer.vue'; import { generateResponse, pipelineWithUpstreamDownstream } from './mock_data'; diff --git a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js index 8a7ee82b2ef..372ed2a4e1c 100644 --- a/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js +++ b/spec/frontend/pipelines/graph/graph_component_wrapper_spec.js @@ -23,15 +23,15 @@ import { LAYER_VIEW, STAGE_VIEW, VIEW_TYPE_KEY, -} from '~/ci/pipeline_details/components/graph/constants'; -import PipelineGraph from '~/ci/pipeline_details/components/graph/graph_component.vue'; -import PipelineGraphWrapper from '~/ci/pipeline_details/components/graph/graph_component_wrapper.vue'; -import GraphViewSelector from '~/ci/pipeline_details/components/graph/graph_view_selector.vue'; -import * as Api from '~/ci/pipeline_details/components/graph_shared/api'; -import LinksLayer from '~/ci/pipeline_details/components/graph_shared/links_layer.vue'; -import * as parsingUtils from '~/ci/pipeline_details/components/parsing_utils'; -import getPipelineHeaderData from '~/ci/pipeline_details/graphql/queries/get_pipeline_header_data.query.graphql'; -import * as sentryUtils from '~/ci/pipeline_details/utils'; +} from '~/ci/pipeline_details/graph/constants'; +import PipelineGraph from '~/ci/pipeline_details/graph/components/graph_component.vue'; +import PipelineGraphWrapper from '~/ci/pipeline_details/graph/graph_component_wrapper.vue'; +import GraphViewSelector from '~/ci/pipeline_details/graph/components/graph_view_selector.vue'; +import * as Api from '~/ci/pipeline_details/graph/api_utils'; +import LinksLayer from '~/ci/common/private/job_links_layer.vue'; +import * as parsingUtils from '~/ci/pipeline_details/utils/parsing_utils'; +import getPipelineHeaderData from '~/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql'; +import * as sentryUtils from '~/ci/utils'; import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue'; import { mockRunningPipelineHeaderData } from '../mock_data'; import { diff --git a/spec/frontend/pipelines/graph/graph_view_selector_spec.js b/spec/frontend/pipelines/graph/graph_view_selector_spec.js index e42e8271fa0..bf98995de9c 100644 --- a/spec/frontend/pipelines/graph/graph_view_selector_spec.js +++ b/spec/frontend/pipelines/graph/graph_view_selector_spec.js @@ -1,7 +1,7 @@ import { GlAlert, GlButton, GlButtonGroup, GlLoadingIcon } from '@gitlab/ui'; import { mount, shallowMount } from '@vue/test-utils'; -import { LAYER_VIEW, STAGE_VIEW } from '~/ci/pipeline_details/components/graph/constants'; -import GraphViewSelector from '~/ci/pipeline_details/components/graph/graph_view_selector.vue'; +import { LAYER_VIEW, STAGE_VIEW } from '~/ci/pipeline_details/graph/constants'; +import GraphViewSelector from '~/ci/pipeline_details/graph/components/graph_view_selector.vue'; describe('the graph view selector component', () => { let wrapper; diff --git a/spec/frontend/pipelines/graph/job_group_dropdown_spec.js b/spec/frontend/pipelines/graph/job_group_dropdown_spec.js index 6f19f9fa2ae..d5a1cfffe68 100644 --- a/spec/frontend/pipelines/graph/job_group_dropdown_spec.js +++ b/spec/frontend/pipelines/graph/job_group_dropdown_spec.js @@ -1,5 +1,5 @@ import { shallowMount, mount } from '@vue/test-utils'; -import JobGroupDropdown from '~/ci/pipeline_details/components/graph/job_group_dropdown.vue'; +import JobGroupDropdown from '~/ci/pipeline_details/graph/components/job_group_dropdown.vue'; describe('job group dropdown component', () => { const group = { diff --git a/spec/frontend/pipelines/graph/job_item_spec.js b/spec/frontend/pipelines/graph/job_item_spec.js index b1f55f278c3..fd45dc7193f 100644 --- a/spec/frontend/pipelines/graph/job_item_spec.js +++ b/spec/frontend/pipelines/graph/job_item_spec.js @@ -1,10 +1,10 @@ import MockAdapter from 'axios-mock-adapter'; import Vue, { nextTick } from 'vue'; import { GlBadge, GlModal, GlToast } from '@gitlab/ui'; -import JobItem from '~/ci/pipeline_details/components/graph/job_item.vue'; +import JobItem from '~/ci/pipeline_details/graph/components/job_item.vue'; import axios from '~/lib/utils/axios_utils'; import { useLocalStorageSpy } from 'helpers/local_storage_helper'; -import ActionComponent from '~/ci/pipeline_details/components/jobs_shared/action_component.vue'; +import ActionComponent from '~/ci/common/private/job_action_component.vue'; import { mountExtended, shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { diff --git a/spec/frontend/pipelines/graph/job_name_component_spec.js b/spec/frontend/pipelines/graph/job_name_component_spec.js index 3d2f54c9f10..ca201aee648 100644 --- a/spec/frontend/pipelines/graph/job_name_component_spec.js +++ b/spec/frontend/pipelines/graph/job_name_component_spec.js @@ -1,5 +1,5 @@ import { mount } from '@vue/test-utils'; -import jobNameComponent from '~/ci/pipeline_details/components/jobs_shared/job_name_component.vue'; +import jobNameComponent from '~/ci/common/private/job_name_component.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; describe('job name component', () => { diff --git a/spec/frontend/pipelines/graph/linked_pipeline_spec.js b/spec/frontend/pipelines/graph/linked_pipeline_spec.js index 14aacf10665..5541b0db54a 100644 --- a/spec/frontend/pipelines/graph/linked_pipeline_spec.js +++ b/spec/frontend/pipelines/graph/linked_pipeline_spec.js @@ -6,12 +6,8 @@ import createMockApollo from 'helpers/mock_apollo_helper'; import { mountExtended } from 'helpers/vue_test_utils_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; -import { - ACTION_FAILURE, - UPSTREAM, - DOWNSTREAM, -} from '~/ci/pipeline_details/components/graph/constants'; -import LinkedPipelineComponent from '~/ci/pipeline_details/components/graph/linked_pipeline.vue'; +import { ACTION_FAILURE, UPSTREAM, DOWNSTREAM } from '~/ci/pipeline_details/graph/constants'; +import LinkedPipelineComponent from '~/ci/pipeline_details/graph/components/linked_pipeline.vue'; import CancelPipelineMutation from '~/ci/pipeline_details/graphql/mutations/cancel_pipeline.mutation.graphql'; import RetryPipelineMutation from '~/ci/pipeline_details/graphql/mutations/retry_pipeline.mutation.graphql'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; diff --git a/spec/frontend/pipelines/graph/linked_pipelines_column_spec.js b/spec/frontend/pipelines/graph/linked_pipelines_column_spec.js index 4bc757ee42a..cc4e4172657 100644 --- a/spec/frontend/pipelines/graph/linked_pipelines_column_spec.js +++ b/spec/frontend/pipelines/graph/linked_pipelines_column_spec.js @@ -10,11 +10,11 @@ import { UPSTREAM, LAYER_VIEW, STAGE_VIEW, -} from '~/ci/pipeline_details/components/graph/constants'; -import PipelineGraph from '~/ci/pipeline_details/components/graph/graph_component.vue'; -import LinkedPipeline from '~/ci/pipeline_details/components/graph/linked_pipeline.vue'; -import LinkedPipelinesColumn from '~/ci/pipeline_details/components/graph/linked_pipelines_column.vue'; -import * as parsingUtils from '~/ci/pipeline_details/components/parsing_utils'; +} from '~/ci/pipeline_details/graph/constants'; +import PipelineGraph from '~/ci/pipeline_details/graph/components/graph_component.vue'; +import LinkedPipeline from '~/ci/pipeline_details/graph/components/linked_pipeline.vue'; +import LinkedPipelinesColumn from '~/ci/pipeline_details/graph/components/linked_pipelines_column.vue'; +import * as parsingUtils from '~/ci/pipeline_details/utils/parsing_utils'; import { LOAD_FAILURE } from '~/ci/pipeline_details/constants'; import { pipelineWithUpstreamDownstream, wrappedPipelineReturn } from './mock_data'; diff --git a/spec/frontend/pipelines/graph/mock_data.js b/spec/frontend/pipelines/graph/mock_data.js index c3ab2c756f0..a880a9cf4b0 100644 --- a/spec/frontend/pipelines/graph/mock_data.js +++ b/spec/frontend/pipelines/graph/mock_data.js @@ -1,10 +1,6 @@ import mockPipelineResponse from 'test_fixtures/pipelines/pipeline_details.json'; -import { unwrapPipelineData } from '~/ci/pipeline_details/components/graph/utils'; -import { - BUILD_KIND, - BRIDGE_KIND, - RETRY_ACTION_TITLE, -} from '~/ci/pipeline_details/components/graph/constants'; +import { unwrapPipelineData } from '~/ci/pipeline_details/graph/utils'; +import { BUILD_KIND, BRIDGE_KIND, RETRY_ACTION_TITLE } from '~/ci/pipeline_details/graph/constants'; // We mock this instead of using fixtures for performance reason. const mockPipelineResponseCopy = JSON.parse(JSON.stringify(mockPipelineResponse)); diff --git a/spec/frontend/pipelines/graph/stage_column_component_spec.js b/spec/frontend/pipelines/graph/stage_column_component_spec.js index 7b19ac439b3..cc79205ec41 100644 --- a/spec/frontend/pipelines/graph/stage_column_component_spec.js +++ b/spec/frontend/pipelines/graph/stage_column_component_spec.js @@ -1,7 +1,7 @@ import { mount, shallowMount } from '@vue/test-utils'; -import JobItem from '~/ci/pipeline_details/components/graph/job_item.vue'; -import StageColumnComponent from '~/ci/pipeline_details/components/graph/stage_column_component.vue'; -import ActionComponent from '~/ci/pipeline_details/components/jobs_shared/action_component.vue'; +import JobItem from '~/ci/pipeline_details/graph/components/job_item.vue'; +import StageColumnComponent from '~/ci/pipeline_details/graph/components/stage_column_component.vue'; +import ActionComponent from '~/ci/common/private/job_action_component.vue'; const mockJob = { id: 4250, diff --git a/spec/frontend/pipelines/graph_shared/links_inner_spec.js b/spec/frontend/pipelines/graph_shared/links_inner_spec.js index 5c79ca00702..8d1964726e4 100644 --- a/spec/frontend/pipelines/graph_shared/links_inner_spec.js +++ b/spec/frontend/pipelines/graph_shared/links_inner_spec.js @@ -1,7 +1,7 @@ import { shallowMount } from '@vue/test-utils'; import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; -import LinksInner from '~/ci/pipeline_details/components/graph_shared/links_inner.vue'; -import { parseData } from '~/ci/pipeline_details/components/parsing_utils'; +import LinksInner from '~/ci/pipeline_details/graph/components/links_inner.vue'; +import { parseData } from '~/ci/pipeline_details/utils/parsing_utils'; import { createJobsHash } from '~/ci/pipeline_details/utils'; import { jobRect, diff --git a/spec/frontend/pipelines/graph_shared/links_layer_spec.js b/spec/frontend/pipelines/graph_shared/links_layer_spec.js index 16dfb103cf0..ccda2b8078d 100644 --- a/spec/frontend/pipelines/graph_shared/links_layer_spec.js +++ b/spec/frontend/pipelines/graph_shared/links_layer_spec.js @@ -1,7 +1,7 @@ import { shallowMount } from '@vue/test-utils'; import mockPipelineResponse from 'test_fixtures/pipelines/pipeline_details.json'; -import LinksInner from '~/ci/pipeline_details/components/graph_shared/links_inner.vue'; -import LinksLayer from '~/ci/pipeline_details/components/graph_shared/links_layer.vue'; +import LinksInner from '~/ci/pipeline_details/graph/components/links_inner.vue'; +import LinksLayer from '~/ci/common/private/job_links_layer.vue'; import { generateResponse } from '../graph/mock_data'; diff --git a/spec/frontend/pipelines/nav_controls_spec.js b/spec/frontend/pipelines/nav_controls_spec.js index a4567734c34..cefe0c9f0a3 100644 --- a/spec/frontend/pipelines/nav_controls_spec.js +++ b/spec/frontend/pipelines/nav_controls_spec.js @@ -1,5 +1,5 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; -import NavControls from '~/ci/pipeline_details/components/pipelines_list/nav_controls.vue'; +import NavControls from '~/ci/pipeline_details/pipelines_list/components/nav_controls.vue'; describe('Pipelines Nav Controls', () => { let wrapper; diff --git a/spec/frontend/pipelines/pipeline_details_header_spec.js b/spec/frontend/pipelines/pipeline_details_header_spec.js index 6ea5d603111..81a8914f013 100644 --- a/spec/frontend/pipelines/pipeline_details_header_spec.js +++ b/spec/frontend/pipelines/pipeline_details_header_spec.js @@ -5,13 +5,13 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; -import PipelineDetailsHeader from '~/ci/pipeline_details/components/pipeline_details_header.vue'; +import PipelineDetailsHeader from '~/ci/pipeline_details/header/pipeline_details_header.vue'; import { BUTTON_TOOLTIP_RETRY, BUTTON_TOOLTIP_CANCEL } from '~/ci/pipeline_details/constants'; import CiBadgeLink from '~/vue_shared/components/ci_badge_link.vue'; import cancelPipelineMutation from '~/ci/pipeline_details/graphql/mutations/cancel_pipeline.mutation.graphql'; import deletePipelineMutation from '~/ci/pipeline_details/graphql/mutations/delete_pipeline.mutation.graphql'; import retryPipelineMutation from '~/ci/pipeline_details/graphql/mutations/retry_pipeline.mutation.graphql'; -import getPipelineDetailsQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_header_data.query.graphql'; +import getPipelineDetailsQuery from '~/ci/pipeline_details/header/graphql/queries/get_pipeline_header_data.query.graphql'; import { pipelineHeaderSuccess, pipelineHeaderRunning, diff --git a/spec/frontend/pipelines/pipeline_graph/pipeline_graph_spec.js b/spec/frontend/pipelines/pipeline_graph/pipeline_graph_spec.js index ed49aeeb1a0..95edfb01cf0 100644 --- a/spec/frontend/pipelines/pipeline_graph/pipeline_graph_spec.js +++ b/spec/frontend/pipelines/pipeline_graph/pipeline_graph_spec.js @@ -2,11 +2,11 @@ import { GlAlert } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { setHTMLFixture } from 'helpers/fixtures'; import { CI_CONFIG_STATUS_VALID } from '~/ci/pipeline_editor/constants'; -import LinksInner from '~/ci/pipeline_details/components/graph_shared/links_inner.vue'; -import LinksLayer from '~/ci/pipeline_details/components/graph_shared/links_layer.vue'; -import JobPill from '~/ci/pipeline_details/components/pipeline_graph/job_pill.vue'; -import PipelineGraph from '~/ci/pipeline_details/components/pipeline_graph/pipeline_graph.vue'; -import StageName from '~/ci/pipeline_details/components/pipeline_graph/stage_name.vue'; +import LinksInner from '~/ci/pipeline_details/graph/components/links_inner.vue'; +import LinksLayer from '~/ci/common/private/job_links_layer.vue'; +import JobPill from '~/ci/pipeline_editor/components/graph/job_pill.vue'; +import PipelineGraph from '~/ci/pipeline_editor/components/graph/pipeline_graph.vue'; +import StageName from '~/ci/pipeline_editor/components/graph/stage_name.vue'; import { pipelineData, singleStageData } from './mock_data'; describe('pipeline graph component', () => { diff --git a/spec/frontend/pipelines/pipeline_labels_spec.js b/spec/frontend/pipelines/pipeline_labels_spec.js index 9a65cad4cba..b90f7d035e0 100644 --- a/spec/frontend/pipelines/pipeline_labels_spec.js +++ b/spec/frontend/pipelines/pipeline_labels_spec.js @@ -1,6 +1,6 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import { trimText } from 'helpers/text_helper'; -import PipelineLabelsComponent from '~/ci/pipeline_details/components/pipelines_list/pipeline_labels.vue'; +import PipelineLabelsComponent from '~/ci/pipeline_details/pipelines_list/components/pipeline_labels.vue'; import { mockPipeline } from './mock_data'; const projectPath = 'test/test'; diff --git a/spec/frontend/pipelines/pipeline_multi_actions_spec.js b/spec/frontend/pipelines/pipeline_multi_actions_spec.js index b35ffaff4dc..6827aea7b1c 100644 --- a/spec/frontend/pipelines/pipeline_multi_actions_spec.js +++ b/spec/frontend/pipelines/pipeline_multi_actions_spec.js @@ -10,7 +10,7 @@ import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import PipelineMultiActions, { i18n, -} from '~/ci/pipeline_details/components/pipelines_list/pipeline_multi_actions.vue'; +} from '~/ci/pipeline_details/pipelines_list/components/pipeline_multi_actions.vue'; import { TRACKING_CATEGORIES } from '~/ci/pipeline_details/constants'; describe('Pipeline Multi Actions Dropdown', () => { diff --git a/spec/frontend/pipelines/pipeline_operations_spec.js b/spec/frontend/pipelines/pipeline_operations_spec.js index 1952d704b9c..3e2005236bb 100644 --- a/spec/frontend/pipelines/pipeline_operations_spec.js +++ b/spec/frontend/pipelines/pipeline_operations_spec.js @@ -1,7 +1,7 @@ import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; -import PipelinesManualActions from '~/ci/pipeline_details/components/pipelines_list/pipelines_manual_actions.vue'; -import PipelineMultiActions from '~/ci/pipeline_details/components/pipelines_list/pipeline_multi_actions.vue'; -import PipelineOperations from '~/ci/pipeline_details/components/pipelines_list/pipeline_operations.vue'; +import PipelinesManualActions from '~/ci/pipeline_details/pipelines_list/components/pipelines_manual_actions.vue'; +import PipelineMultiActions from '~/ci/pipeline_details/pipelines_list/components/pipeline_multi_actions.vue'; +import PipelineOperations from '~/ci/pipeline_details/pipelines_list/components/pipeline_operations.vue'; import eventHub from '~/ci/pipeline_details/event_hub'; describe('Pipeline operations', () => { diff --git a/spec/frontend/pipelines/pipeline_triggerer_spec.js b/spec/frontend/pipelines/pipeline_triggerer_spec.js index 5e2a7df6fe9..4c8a43598ad 100644 --- a/spec/frontend/pipelines/pipeline_triggerer_spec.js +++ b/spec/frontend/pipelines/pipeline_triggerer_spec.js @@ -1,6 +1,6 @@ import { GlAvatar, GlAvatarLink } from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; -import pipelineTriggerer from '~/ci/pipeline_details/components/pipelines_list/pipeline_triggerer.vue'; +import pipelineTriggerer from '~/ci/pipeline_details/pipelines_list/components/pipeline_triggerer.vue'; import { createMockDirective, getBinding } from 'helpers/vue_mock_directive'; describe('Pipelines Triggerer', () => { diff --git a/spec/frontend/pipelines/pipeline_url_spec.js b/spec/frontend/pipelines/pipeline_url_spec.js index be24ae80950..c1be2b096f6 100644 --- a/spec/frontend/pipelines/pipeline_url_spec.js +++ b/spec/frontend/pipelines/pipeline_url_spec.js @@ -1,7 +1,7 @@ import { merge } from 'lodash'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; -import PipelineUrlComponent from '~/ci/pipeline_details/components/pipelines_list/pipeline_url.vue'; +import PipelineUrlComponent from '~/ci/pipeline_details/pipelines_list/components/pipeline_url.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import { TRACKING_CATEGORIES } from '~/ci/pipeline_details/constants'; import { mockPipeline, mockPipelineBranch, mockPipelineTag } from './mock_data'; diff --git a/spec/frontend/pipelines/pipelines_artifacts_spec.js b/spec/frontend/pipelines/pipelines_artifacts_spec.js index 9b092a70965..7ef3513cbce 100644 --- a/spec/frontend/pipelines/pipelines_artifacts_spec.js +++ b/spec/frontend/pipelines/pipelines_artifacts_spec.js @@ -5,7 +5,7 @@ import { GlSprintf, } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; -import PipelineArtifacts from '~/ci/pipeline_details/components/pipelines_list/pipelines_artifacts.vue'; +import PipelineArtifacts from '~/ci/pipeline_details/pipelines_list/components/pipelines_artifacts.vue'; describe('Pipelines Artifacts dropdown', () => { let wrapper; diff --git a/spec/frontend/pipelines/pipelines_manual_actions_spec.js b/spec/frontend/pipelines/pipelines_manual_actions_spec.js index 15cdceed850..c0ea0fda4df 100644 --- a/spec/frontend/pipelines/pipelines_manual_actions_spec.js +++ b/spec/frontend/pipelines/pipelines_manual_actions_spec.js @@ -11,8 +11,8 @@ import { createAlert } from '~/alert'; import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import { confirmAction } from '~/lib/utils/confirm_via_gl_modal/confirm_via_gl_modal'; -import PipelinesManualActions from '~/ci/pipeline_details/components/pipelines_list/pipelines_manual_actions.vue'; -import getPipelineActionsQuery from '~/ci/pipeline_details/graphql/queries/get_pipeline_actions.query.graphql'; +import PipelinesManualActions from '~/ci/pipeline_details/pipelines_list/components/pipelines_manual_actions.vue'; +import getPipelineActionsQuery from '~/ci/pipeline_details/pipelines_list/graphql/queries/get_pipeline_actions.query.graphql'; import { TRACKING_CATEGORIES } from '~/ci/pipeline_details/constants'; import GlCountdown from '~/vue_shared/components/gl_countdown.vue'; diff --git a/spec/frontend/pipelines/pipelines_spec.js b/spec/frontend/pipelines/pipelines_spec.js index 62e2e28f311..dd12286f71c 100644 --- a/spec/frontend/pipelines/pipelines_spec.js +++ b/spec/frontend/pipelines/pipelines_spec.js @@ -24,10 +24,10 @@ import { createAlert, VARIANT_WARNING } from '~/alert'; import setSortPreferenceMutation from '~/issues/list/queries/set_sort_preference.mutation.graphql'; import axios from '~/lib/utils/axios_utils'; import { HTTP_STATUS_INTERNAL_SERVER_ERROR, HTTP_STATUS_OK } from '~/lib/utils/http_status'; -import NavigationControls from '~/ci/pipeline_details/components/pipelines_list/nav_controls.vue'; -import PipelinesComponent from '~/ci/pipeline_details/components/pipelines_list/pipelines.vue'; -import PipelinesCiTemplates from '~/ci/pipeline_details/components/pipelines_list/empty_state/pipelines_ci_templates.vue'; -import PipelinesTableComponent from '~/ci/pipeline_details/components/pipelines_list/pipelines_table.vue'; +import NavigationControls from '~/ci/pipeline_details/pipelines_list/components/nav_controls.vue'; +import PipelinesComponent from '~/ci/pipeline_details/pipelines_list/pipelines.vue'; +import PipelinesCiTemplates from '~/ci/pipeline_details/pipelines_list/empty_state/pipelines_ci_templates.vue'; +import PipelinesTableComponent from '~/ci/pipeline_details/pipelines_list/components/pipelines_table.vue'; import { RAW_TEXT_WARNING, TRACKING_CATEGORIES } from '~/ci/pipeline_details/constants'; import Store from '~/ci/pipeline_details/stores/pipelines_store'; import NavigationTabs from '~/vue_shared/components/navigation_tabs.vue'; diff --git a/spec/frontend/pipelines/pipelines_table_spec.js b/spec/frontend/pipelines/pipelines_table_spec.js index 508e1eb833f..2ae8475f38d 100644 --- a/spec/frontend/pipelines/pipelines_table_spec.js +++ b/spec/frontend/pipelines/pipelines_table_spec.js @@ -4,13 +4,13 @@ import { mount } from '@vue/test-utils'; import fixture from 'test_fixtures/pipelines/pipelines.json'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; -import PipelineFailedJobsWidget from '~/ci/pipeline_details/components/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue'; -import PipelineOperations from '~/ci/pipeline_details/components/pipelines_list/pipeline_operations.vue'; -import PipelineTriggerer from '~/ci/pipeline_details/components/pipelines_list/pipeline_triggerer.vue'; -import PipelineUrl from '~/ci/pipeline_details/components/pipelines_list/pipeline_url.vue'; -import PipelinesTable from '~/ci/pipeline_details/components/pipelines_list/pipelines_table.vue'; -import PipelinesTimeago from '~/ci/pipeline_details/components/pipelines_list/time_ago.vue'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import PipelineFailedJobsWidget from '~/ci/pipeline_details/pipelines_list/failure_widget/pipeline_failed_jobs_widget.vue'; +import PipelineOperations from '~/ci/pipeline_details/pipelines_list/components/pipeline_operations.vue'; +import PipelineTriggerer from '~/ci/pipeline_details/pipelines_list/components/pipeline_triggerer.vue'; +import PipelineUrl from '~/ci/pipeline_details/pipelines_list/components/pipeline_url.vue'; +import PipelinesTable from '~/ci/pipeline_details/pipelines_list/components/pipelines_table.vue'; +import PipelinesTimeago from '~/ci/pipeline_details/pipelines_list/components/time_ago.vue'; import { PipelineKeyOptions, BUTTON_TOOLTIP_RETRY, diff --git a/spec/frontend/pipelines/test_reports/empty_state_spec.js b/spec/frontend/pipelines/test_reports/empty_state_spec.js index c5879bbf0c0..ed1d6bc7d37 100644 --- a/spec/frontend/pipelines/test_reports/empty_state_spec.js +++ b/spec/frontend/pipelines/test_reports/empty_state_spec.js @@ -1,6 +1,6 @@ import { GlEmptyState } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; -import EmptyState, { i18n } from '~/ci/pipeline_details/components/test_reports/empty_state.vue'; +import EmptyState, { i18n } from '~/ci/pipeline_details/test_reports/empty_state.vue'; describe('Test report empty state', () => { let wrapper; diff --git a/spec/frontend/pipelines/test_reports/test_case_details_spec.js b/spec/frontend/pipelines/test_reports/test_case_details_spec.js index e4058e6b1dc..0f651b9d456 100644 --- a/spec/frontend/pipelines/test_reports/test_case_details_spec.js +++ b/spec/frontend/pipelines/test_reports/test_case_details_spec.js @@ -1,7 +1,7 @@ import { GlModal, GlLink } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; -import TestCaseDetails from '~/ci/pipeline_details/components/test_reports/test_case_details.vue'; +import TestCaseDetails from '~/ci/pipeline_details/test_reports/test_case_details.vue'; import CodeBlock from '~/vue_shared/components/code_block.vue'; import ModalCopyButton from '~/vue_shared/components/modal_copy_button.vue'; diff --git a/spec/frontend/pipelines/test_reports/test_reports_spec.js b/spec/frontend/pipelines/test_reports/test_reports_spec.js index 73c07e660d4..8ff060026da 100644 --- a/spec/frontend/pipelines/test_reports/test_reports_spec.js +++ b/spec/frontend/pipelines/test_reports/test_reports_spec.js @@ -5,10 +5,10 @@ import Vue from 'vue'; import Vuex from 'vuex'; import testReports from 'test_fixtures/pipelines/test_report.json'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; -import EmptyState from '~/ci/pipeline_details/components/test_reports/empty_state.vue'; -import TestReports from '~/ci/pipeline_details/components/test_reports/test_reports.vue'; -import TestSummary from '~/ci/pipeline_details/components/test_reports/test_summary.vue'; -import TestSummaryTable from '~/ci/pipeline_details/components/test_reports/test_summary_table.vue'; +import EmptyState from '~/ci/pipeline_details/test_reports/empty_state.vue'; +import TestReports from '~/ci/pipeline_details/test_reports/test_reports.vue'; +import TestSummary from '~/ci/pipeline_details/test_reports/test_summary.vue'; +import TestSummaryTable from '~/ci/pipeline_details/test_reports/test_summary_table.vue'; import * as getters from '~/ci/pipeline_details/stores/test_reports/getters'; Vue.use(Vuex); diff --git a/spec/frontend/pipelines/test_reports/test_suite_table_spec.js b/spec/frontend/pipelines/test_reports/test_suite_table_spec.js index bb29be5343a..5bdea6bbcbf 100644 --- a/spec/frontend/pipelines/test_reports/test_suite_table_spec.js +++ b/spec/frontend/pipelines/test_reports/test_suite_table_spec.js @@ -4,9 +4,7 @@ import Vue from 'vue'; import Vuex from 'vuex'; import testReports from 'test_fixtures/pipelines/test_report.json'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; -import SuiteTable, { - i18n, -} from '~/ci/pipeline_details/components/test_reports/test_suite_table.vue'; +import SuiteTable, { i18n } from '~/ci/pipeline_details/test_reports/test_suite_table.vue'; import { TestStatus } from '~/ci/pipeline_details/constants'; import * as getters from '~/ci/pipeline_details/stores/test_reports/getters'; import { formatFilePath } from '~/ci/pipeline_details/stores/test_reports/utils'; diff --git a/spec/frontend/pipelines/test_reports/test_summary_spec.js b/spec/frontend/pipelines/test_reports/test_summary_spec.js index ecb81838627..f9182d52c8a 100644 --- a/spec/frontend/pipelines/test_reports/test_summary_spec.js +++ b/spec/frontend/pipelines/test_reports/test_summary_spec.js @@ -1,6 +1,6 @@ import { mount } from '@vue/test-utils'; import testReports from 'test_fixtures/pipelines/test_report.json'; -import Summary from '~/ci/pipeline_details/components/test_reports/test_summary.vue'; +import Summary from '~/ci/pipeline_details/test_reports/test_summary.vue'; import { formattedTime } from '~/ci/pipeline_details/stores/test_reports/utils'; describe('Test reports summary', () => { diff --git a/spec/frontend/pipelines/test_reports/test_summary_table_spec.js b/spec/frontend/pipelines/test_reports/test_summary_table_spec.js index 55cb0a7566a..bb62fbcb32c 100644 --- a/spec/frontend/pipelines/test_reports/test_summary_table_spec.js +++ b/spec/frontend/pipelines/test_reports/test_summary_table_spec.js @@ -3,7 +3,7 @@ import Vue from 'vue'; // eslint-disable-next-line no-restricted-imports import Vuex from 'vuex'; import testReports from 'test_fixtures/pipelines/test_report.json'; -import SummaryTable from '~/ci/pipeline_details/components/test_reports/test_summary_table.vue'; +import SummaryTable from '~/ci/pipeline_details/test_reports/test_summary_table.vue'; import * as getters from '~/ci/pipeline_details/stores/test_reports/getters'; Vue.use(Vuex); diff --git a/spec/frontend/pipelines/time_ago_spec.js b/spec/frontend/pipelines/time_ago_spec.js index 68597a1f59b..e651427fb78 100644 --- a/spec/frontend/pipelines/time_ago_spec.js +++ b/spec/frontend/pipelines/time_ago_spec.js @@ -1,7 +1,7 @@ import { GlIcon } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; -import TimeAgo from '~/ci/pipeline_details/components/pipelines_list/time_ago.vue'; +import TimeAgo from '~/ci/pipeline_details/pipelines_list/components/time_ago.vue'; describe('Timeago component', () => { let wrapper; diff --git a/spec/frontend/pipelines/tokens/pipeline_branch_name_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_branch_name_token_spec.js index 2b97130a264..bf58e337a79 100644 --- a/spec/frontend/pipelines/tokens/pipeline_branch_name_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_branch_name_token_spec.js @@ -3,7 +3,7 @@ import { nextTick } from 'vue'; import { shallowMount } from '@vue/test-utils'; import waitForPromises from 'helpers/wait_for_promises'; import Api from '~/api'; -import PipelineBranchNameToken from '~/ci/pipeline_details/components/pipelines_list/tokens/pipeline_branch_name_token.vue'; +import PipelineBranchNameToken from '~/ci/pipeline_details/pipelines_list/tokens/pipeline_branch_name_token.vue'; import { branches, mockBranchesAfterMap } from '../mock_data'; describe('Pipeline Branch Name Token', () => { diff --git a/spec/frontend/pipelines/tokens/pipeline_source_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_source_token_spec.js index 096174d8c36..180fdee8353 100644 --- a/spec/frontend/pipelines/tokens/pipeline_source_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_source_token_spec.js @@ -1,8 +1,8 @@ import { GlFilteredSearchToken, GlFilteredSearchSuggestion } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; -import { PIPELINE_SOURCES } from 'ee_else_ce/ci/pipeline_details/components/pipelines_list/tokens/constants'; +import { PIPELINE_SOURCES } from 'ee_else_ce/ci/pipeline_details/pipelines_list/tokens/constants'; import { stubComponent } from 'helpers/stub_component'; -import PipelineSourceToken from '~/ci/pipeline_details/components/pipelines_list/tokens/pipeline_source_token.vue'; +import PipelineSourceToken from '~/ci/pipeline_details/pipelines_list/tokens/pipeline_source_token.vue'; describe('Pipeline Source Token', () => { let wrapper; diff --git a/spec/frontend/pipelines/tokens/pipeline_status_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_status_token_spec.js index 17c038a1e58..4b9d4fb7a94 100644 --- a/spec/frontend/pipelines/tokens/pipeline_status_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_status_token_spec.js @@ -1,7 +1,7 @@ import { GlFilteredSearchToken, GlFilteredSearchSuggestion, GlIcon } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { stubComponent } from 'helpers/stub_component'; -import PipelineStatusToken from '~/ci/pipeline_details/components/pipelines_list/tokens/pipeline_status_token.vue'; +import PipelineStatusToken from '~/ci/pipeline_details/pipelines_list/tokens/pipeline_status_token.vue'; import { TOKEN_TITLE_STATUS, TOKEN_TYPE_STATUS, diff --git a/spec/frontend/pipelines/tokens/pipeline_tag_name_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_tag_name_token_spec.js index fbd5d6dd9a3..a40c6f5c8f8 100644 --- a/spec/frontend/pipelines/tokens/pipeline_tag_name_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_tag_name_token_spec.js @@ -1,7 +1,7 @@ import { GlFilteredSearchToken, GlFilteredSearchSuggestion, GlLoadingIcon } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import Api from '~/api'; -import PipelineTagNameToken from '~/ci/pipeline_details/components/pipelines_list/tokens/pipeline_tag_name_token.vue'; +import PipelineTagNameToken from '~/ci/pipeline_details/pipelines_list/tokens/pipeline_tag_name_token.vue'; import { tags, mockTagsAfterMap } from '../mock_data'; describe('Pipeline Branch Name Token', () => { diff --git a/spec/frontend/pipelines/tokens/pipeline_trigger_author_token_spec.js b/spec/frontend/pipelines/tokens/pipeline_trigger_author_token_spec.js index dcb7d51e1ae..cc1303f4abc 100644 --- a/spec/frontend/pipelines/tokens/pipeline_trigger_author_token_spec.js +++ b/spec/frontend/pipelines/tokens/pipeline_trigger_author_token_spec.js @@ -2,7 +2,7 @@ import { GlFilteredSearchToken, GlFilteredSearchSuggestion, GlLoadingIcon } from import { shallowMount } from '@vue/test-utils'; import { stubComponent } from 'helpers/stub_component'; import Api from '~/api'; -import PipelineTriggerAuthorToken from '~/ci/pipeline_details/components/pipelines_list/tokens/pipeline_trigger_author_token.vue'; +import PipelineTriggerAuthorToken from '~/ci/pipeline_details/pipelines_list/tokens/pipeline_trigger_author_token.vue'; import { users } from '../mock_data'; describe('Pipeline Trigger Author Token', () => { diff --git a/spec/frontend/pipelines/unwrapping_utils_spec.js b/spec/frontend/pipelines/unwrapping_utils_spec.js index 3f7abe3f024..99ee2eff1e4 100644 --- a/spec/frontend/pipelines/unwrapping_utils_spec.js +++ b/spec/frontend/pipelines/unwrapping_utils_spec.js @@ -2,7 +2,7 @@ import { unwrapGroups, unwrapNodesWithName, unwrapStagesWithNeeds, -} from '~/ci/pipeline_details/components/unwrapping_utils'; +} from '~/ci/pipeline_details/utils/unwrapping_utils'; const groupsArray = [ { diff --git a/spec/frontend/pipelines/utils_spec.js b/spec/frontend/pipelines/utils_spec.js index 1853d6ea703..b52a646cefc 100644 --- a/spec/frontend/pipelines/utils_spec.js +++ b/spec/frontend/pipelines/utils_spec.js @@ -1,5 +1,5 @@ import mockPipelineResponse from 'test_fixtures/pipelines/pipeline_details.json'; -import { createSankey } from '~/ci/pipeline_details/components/dag/drawing_utils'; +import { createSankey } from '~/ci/pipeline_details/dag/drawing_utils'; import { makeLinksFromNodes, filterByAncestors, @@ -9,7 +9,7 @@ import { parseData, removeOrphanNodes, getMaxNodes, -} from '~/ci/pipeline_details/components/parsing_utils'; +} from '~/ci/pipeline_details/utils/parsing_utils'; import { createNodeDict } from '~/ci/pipeline_details/utils'; import { mockDownstreamPipelinesRest } from '../vue_merge_request_widget/mock_data'; diff --git a/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_spec.js b/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_spec.js index dd2537448c0..35b4e222e01 100644 --- a/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_spec.js +++ b/spec/frontend/vue_merge_request_widget/components/mr_widget_pipeline_spec.js @@ -6,7 +6,7 @@ import { trimText } from 'helpers/text_helper'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; import { HTTP_STATUS_OK } from '~/lib/utils/http_status'; import MRWidgetPipelineComponent from '~/vue_merge_request_widget/components/mr_widget_pipeline.vue'; -import LegacyPipelineMiniGraph from '~/ci/pipeline_details/components/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; +import LegacyPipelineMiniGraph from '~/ci/pipeline_mini_graph/legacy_pipeline_mini_graph.vue'; import { SUCCESS } from '~/vue_merge_request_widget/constants'; import mockData from '../mock_data'; diff --git a/spec/frontend/vue_merge_request_widget/extensions/test_report/index_spec.js b/spec/frontend/vue_merge_request_widget/extensions/test_report/index_spec.js index 1c5a4e508bb..88c348629cb 100644 --- a/spec/frontend/vue_merge_request_widget/extensions/test_report/index_spec.js +++ b/spec/frontend/vue_merge_request_widget/extensions/test_report/index_spec.js @@ -11,7 +11,7 @@ import { HTTP_STATUS_NO_CONTENT, HTTP_STATUS_OK, } from '~/lib/utils/http_status'; -import TestCaseDetails from '~/ci/pipeline_details/components/test_reports/test_case_details.vue'; +import TestCaseDetails from '~/ci/pipeline_details/test_reports/test_case_details.vue'; import { failedReport } from 'jest/ci/reports/mock_data/mock_data'; import mixedResultsTestReports from 'jest/ci/reports/mock_data/new_and_fixed_failures_report.json'; diff --git a/spec/lib/gitlab/email/message/in_product_marketing/admin_verify_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/admin_verify_spec.rb deleted file mode 100644 index 7a09feb5b64..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/admin_verify_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::AdminVerify do - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - let(:series) { 0 } - - subject(:message) { described_class.new(group: group, user: user, series: series) } - - describe 'public methods' do - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to eq 'Create a custom CI runner with just a few clicks' - expect(message.tagline).to be_nil - expect(message.title).to eq 'Spin up an autoscaling runner in GitLab' - expect(message.subtitle).to eq 'Use our AWS cloudformation template to spin up your runners in just a few clicks!' - expect(message.body_line1).to be_empty - expect(message.body_line2).to be_empty - expect(message.cta_text).to eq 'Create a custom runner' - expect(message.logo_path).to eq 'mailers/in_product_marketing/admin_verify-0.png' - end - - describe '#progress' do - subject { message.progress } - - before do - allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) - end - - context 'on gitlab.com' do - let(:is_gitlab_com) { true } - - it { is_expected.to eq('This is email 1 of 1 in the Admin series.') } - end - - context 'not on gitlab.com' do - let(:is_gitlab_com) { false } - - it { is_expected.to include('This is email 1 of 1 in the Admin series', Gitlab::Routing.url_helpers.profile_notifications_url) } - end - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing/base_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/base_spec.rb deleted file mode 100644 index cd96af2c056..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/base_spec.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::Base do - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - let(:series) { 0 } - let(:test_class) { Gitlab::Email::Message::InProductMarketing::Create } - - describe 'initialize' do - subject { test_class.new(group: group, user: user, series: series) } - - context 'when series does not exist' do - let(:series) { 3 } - - it 'raises error' do - expect { subject }.to raise_error(ArgumentError) - end - end - - context 'when series exists' do - let(:series) { 0 } - - it 'does not raise error' do - expect { subject }.not_to raise_error - end - end - end - - describe '#logo_path' do - subject { test_class.new(group: group, user: user, series: series).logo_path } - - it { is_expected.to eq('mailers/in_product_marketing/create-0.png') } - end - - describe '#unsubscribe' do - subject { test_class.new(group: group, user: user, series: series).unsubscribe } - - before do - allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) - end - - context 'on gitlab.com' do - let(:is_gitlab_com) { true } - - it { is_expected.to include('%tag_unsubscribe_url%') } - end - - context 'not on gitlab.com' do - let(:is_gitlab_com) { false } - - it { is_expected.to include(Gitlab::Routing.url_helpers.profile_notifications_url) } - end - end - - describe '#progress' do - subject { test_class.new(group: group, user: user, series: series).progress } - - before do - allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) - end - - context 'on gitlab.com' do - let(:is_gitlab_com) { true } - - it { is_expected.to include('This is email 1 of 3 in the Create series') } - end - - context 'not on gitlab.com' do - let(:is_gitlab_com) { false } - - it { is_expected.to include('This is email 1 of 3 in the Create series', Gitlab::Routing.url_helpers.profile_notifications_url) } - end - end - - describe '#series?' do - using RSpec::Parameterized::TableSyntax - - subject do - test_class = "Gitlab::Email::Message::InProductMarketing::#{track.to_s.classify}".constantize - test_class.new(group: group, user: user, series: series).series? - end - - where(:track, :result) do - :create | true - :team_short | true - :trial_short | true - :admin_verify | true - :verify | true - :trial | true - :team | true - end - - with_them do - it { is_expected.to eq result } - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing/create_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/create_spec.rb deleted file mode 100644 index d5aec280ea6..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/create_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::Create do - using RSpec::Parameterized::TableSyntax - - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - subject(:message) { described_class.new(group: group, user: user, series: series) } - - describe "public methods" do - where(series: [0, 1, 2]) - - with_them do - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to be_present - expect(message.tagline).to be_present - expect(message.title).to be_present - expect(message.subtitle).to be_present - expect(message.body_line1).to be_present - expect(message.body_line2).to be_present - expect(message.cta_text).to be_present - end - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing/team_short_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/team_short_spec.rb deleted file mode 100644 index 3ac2076bf35..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/team_short_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::TeamShort do - using RSpec::Parameterized::TableSyntax - - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - let(:series) { 0 } - - subject(:message) { described_class.new(group: group, user: user, series: series) } - - describe 'public methods' do - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to eq 'Team up in GitLab for greater efficiency' - expect(message.tagline).to be_nil - expect(message.title).to eq 'Turn coworkers into collaborators' - expect(message.subtitle).to eq 'Invite your team today to build better code (and processes) together' - expect(message.body_line1).to be_empty - expect(message.body_line2).to be_empty - expect(message.cta_text).to eq 'Invite your colleagues today' - expect(message.logo_path).to eq 'mailers/in_product_marketing/team-0.png' - end - - describe '#progress' do - subject { message.progress } - - before do - allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) - end - - context 'on gitlab.com' do - let(:is_gitlab_com) { true } - - it { is_expected.to include('This is email 1 of 4 in the Team series') } - end - - context 'not on gitlab.com' do - let(:is_gitlab_com) { false } - - it { is_expected.to include('This is email 1 of 4 in the Team series', Gitlab::Routing.url_helpers.profile_notifications_url) } - end - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb deleted file mode 100644 index 3354b2ed5cf..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/team_spec.rb +++ /dev/null @@ -1,82 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::Team do - using RSpec::Parameterized::TableSyntax - - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - subject(:message) { described_class.new(group: group, user: user, series: series) } - - describe "public methods" do - where(series: [0, 1]) - - with_them do - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to be_present - expect(message.tagline).to be_present - expect(message.title).to be_present - expect(message.subtitle).to be_present - expect(message.body_line1).to be_present - expect(message.body_line2).to be_present - expect(message.cta_text).to be_present - end - - describe '#progress' do - subject { message.progress } - - before do - allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) - end - - context 'on gitlab.com' do - let(:is_gitlab_com) { true } - - it { is_expected.to include("This is email #{series + 2} of 4 in the Team series") } - end - - context 'not on gitlab.com' do - let(:is_gitlab_com) { false } - - it { is_expected.to include("This is email #{series + 2} of 4 in the Team series", Gitlab::Routing.url_helpers.profile_notifications_url) } - end - end - end - - context 'with series 2' do - let(:series) { 2 } - - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to be_present - expect(message.tagline).to be_nil - expect(message.title).to be_present - expect(message.subtitle).to be_present - expect(message.body_line1).to be_present - expect(message.body_line2).to be_present - expect(message.cta_text).to be_present - end - - describe '#progress' do - subject { message.progress } - - before do - allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) - end - - context 'on gitlab.com' do - let(:is_gitlab_com) { true } - - it { is_expected.to include('This is email 4 of 4 in the Team series') } - end - - context 'not on gitlab.com' do - let(:is_gitlab_com) { false } - - it { is_expected.to include('This is email 4 of 4 in the Team series', Gitlab::Routing.url_helpers.profile_notifications_url) } - end - end - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing/trial_short_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/trial_short_spec.rb deleted file mode 100644 index cf0a119ea80..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/trial_short_spec.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::TrialShort do - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - let(:series) { 0 } - - subject(:message) { described_class.new(group: group, user: user, series: series) } - - describe 'public methods' do - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to eq 'Be a DevOps hero' - expect(message.tagline).to be_nil - expect(message.title).to eq 'Expand your DevOps journey with a free GitLab trial' - expect(message.subtitle).to eq 'Start your trial today to experience single application success and discover all the features of GitLab Ultimate for free!' - expect(message.body_line1).to be_empty - expect(message.body_line2).to be_empty - expect(message.cta_text).to eq 'Start a trial' - expect(message.logo_path).to eq 'mailers/in_product_marketing/trial-0.png' - end - - describe '#progress' do - subject { message.progress } - - before do - allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) - end - - context 'on gitlab.com' do - let(:is_gitlab_com) { true } - - it { is_expected.to eq('This is email 1 of 4 in the Trial series.') } - end - - context 'not on gitlab.com' do - let(:is_gitlab_com) { false } - - it { is_expected.to include('This is email 1 of 4 in the Trial series', Gitlab::Routing.url_helpers.profile_notifications_url) } - end - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing/trial_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/trial_spec.rb deleted file mode 100644 index 7f86c9a6c6f..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/trial_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::Trial do - using RSpec::Parameterized::TableSyntax - - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - subject(:message) { described_class.new(group: group, user: user, series: series) } - - describe "public methods" do - where(series: [0, 1, 2]) - - with_them do - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to be_present - expect(message.tagline).to be_present - expect(message.title).to be_present - expect(message.subtitle).to be_present - expect(message.body_line1).to be_present - expect(message.body_line2).to be_present - expect(message.cta_text).to be_present - end - - describe '#progress' do - subject { message.progress } - - before do - allow(Gitlab).to receive(:com?).and_return(is_gitlab_com) - end - - context 'on gitlab.com' do - let(:is_gitlab_com) { true } - - it { is_expected.to eq("This is email #{series + 2} of 4 in the Trial series.") } - end - - context 'not on gitlab.com' do - let(:is_gitlab_com) { false } - - it { is_expected.to include("This is email #{series + 2} of 4 in the Trial series", Gitlab::Routing.url_helpers.profile_notifications_url) } - end - end - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing/verify_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing/verify_spec.rb deleted file mode 100644 index 7e6f62289d2..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing/verify_spec.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing::Verify do - let_it_be(:group) { build(:group) } - let_it_be(:user) { build(:user) } - - subject(:message) { described_class.new(group: group, user: user, series: series) } - - describe "public methods" do - context 'with series 0' do - let(:series) { 0 } - - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to be_present - expect(message.tagline).to be_present - expect(message.title).to be_present - expect(message.subtitle).to be_present - expect(message.body_line1).to be_present - expect(message.body_line2).to be_nil - expect(message.cta_text).to be_present - end - end - - context 'with series 1' do - let(:series) { 1 } - - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to be_present - expect(message.tagline).to be_present - expect(message.title).to be_present - expect(message.subtitle).to be_present - expect(message.body_line1).to be_present - expect(message.body_line2).to be_present - expect(message.cta_text).to be_present - end - end - - context 'with series 2' do - let(:series) { 2 } - - it 'returns value for series', :aggregate_failures do - expect(message.subject_line).to be_present - expect(message.tagline).to be_present - expect(message.title).to be_present - expect(message.subtitle).to be_present - expect(message.body_line1).to be_present - expect(message.body_line2).to be_nil - expect(message.cta_text).to be_present - end - end - end -end diff --git a/spec/lib/gitlab/email/message/in_product_marketing_spec.rb b/spec/lib/gitlab/email/message/in_product_marketing_spec.rb deleted file mode 100644 index 1c59d9c8208..00000000000 --- a/spec/lib/gitlab/email/message/in_product_marketing_spec.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Email::Message::InProductMarketing do - describe '.for' do - using RSpec::Parameterized::TableSyntax - - subject { described_class.for(track) } - - context 'when track exists' do - where(:track, :expected_class) do - :create | described_class::Create - :team_short | described_class::TeamShort - :trial_short | described_class::TrialShort - :admin_verify | described_class::AdminVerify - :verify | described_class::Verify - :trial | described_class::Trial - :team | described_class::Team - end - - with_them do - it { is_expected.to eq(expected_class) } - end - end - - context 'when track does not exist' do - let(:track) { :non_existent } - - it 'raises error' do - expect { subject }.to raise_error(described_class::UnknownTrackError) - end - end - end -end diff --git a/spec/lib/gitlab/usage/metrics/instrumentations/batched_background_migration_failed_jobs_metric_spec.rb b/spec/lib/gitlab/usage/metrics/instrumentations/batched_background_migration_failed_jobs_metric_spec.rb deleted file mode 100644 index e66dd04b69b..00000000000 --- a/spec/lib/gitlab/usage/metrics/instrumentations/batched_background_migration_failed_jobs_metric_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Usage::Metrics::Instrumentations::BatchedBackgroundMigrationFailedJobsMetric, feature_category: :database do - let(:expected_value) do - [ - { - job_class_name: 'job', - number_of_failed_jobs: 1, - table_name: 'jobs' - }, - { - job_class_name: 'test', - number_of_failed_jobs: 2, - table_name: 'users' - } - ] - end - - let_it_be(:active_migration) do - create(:batched_background_migration, :active, table_name: 'users', job_class_name: 'test', created_at: 5.days.ago) - end - - let_it_be(:failed_migration) do - create(:batched_background_migration, :failed, table_name: 'jobs', job_class_name: 'job', created_at: 4.days.ago) - end - - let_it_be(:batched_job) { create(:batched_background_migration_job, :failed, batched_migration: active_migration) } - - let_it_be(:batched_job_2) { create(:batched_background_migration_job, :failed, batched_migration: active_migration) } - - let_it_be(:batched_job_3) { create(:batched_background_migration_job, :failed, batched_migration: failed_migration) } - - let_it_be(:old_migration) { create(:batched_background_migration, :failed, created_at: 99.days.ago) } - - let_it_be(:old_batched_job) { create(:batched_background_migration_job, :failed, batched_migration: old_migration) } - - it_behaves_like 'a correct instrumented metric value', { time_frame: '7d' } -end |