summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-22 12:11:32 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-22 12:11:32 +0000
commitf7b08f4264cfe86b35051778699dafc55efdbf5d (patch)
tree60b70334489f2631096271c85a01b8ff9eaa7653
parenta48f9b5872853f31f6a46ddf58117390e788b776 (diff)
downloadgitlab-ce-f7b08f4264cfe86b35051778699dafc55efdbf5d.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/ci/review-apps/qa.gitlab-ci.yml24
-rw-r--r--.gitlab/issue_templates/Navigation Proposals.md21
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--app/assets/javascripts/analytics/cycle_analytics/bundle.js1
-rw-r--r--app/assets/javascripts/analytics/cycle_analytics/utils.js26
-rw-r--r--app/assets/javascripts/analytics/shared/utils.js22
-rw-r--r--app/assets/javascripts/ci/pipeline_editor/components/commit/commit_form.vue2
-rw-r--r--app/assets/javascripts/pages/projects/cycle_analytics/show/index.js4
-rw-r--r--app/assets/stylesheets/page_bundles/wiki.scss38
-rw-r--r--app/controllers/projects/commit_controller.rb6
-rw-r--r--app/controllers/projects/cycle_analytics_controller.rb5
-rw-r--r--app/helpers/ci/catalog/resources_helper.rb2
-rw-r--r--app/models/packages/event.rb112
-rw-r--r--app/services/packages/create_event_service.rb9
-rw-r--r--app/views/shared/projects/_project.html.haml19
-rw-r--r--app/views/shared/wikis/_sidebar_wiki_page.html.haml8
-rw-r--r--app/views/shared/wikis/_wiki_directory.html.haml7
-rw-r--r--config/feature_flags/development/collect_package_events.yml8
-rw-r--r--config/feature_flags/development/vsa_group_and_project_parity.yml8
-rw-r--r--config/routes/project.rb9
-rw-r--r--db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb9
-rw-r--r--db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb29
-rw-r--r--db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb74
-rw-r--r--db/schema_migrations/202303032324261
-rw-r--r--db/schema_migrations/202303210115291
-rw-r--r--db/schema_migrations/202303210119031
-rw-r--r--db/structure.sql7
-rw-r--r--doc/administration/auth/index.md1
-rw-r--r--doc/administration/lfs/index.md1
-rw-r--r--doc/administration/server_hooks.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-admin-area.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-agent-for-kubernetes.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-backups.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-ci-runners.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-container-registry.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-contributions-forks.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-dashboard.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-data-migration.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-database-sequences.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-git-access.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-gitlab-pages.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-global-search.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-graphql.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-organizations.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-personal-namespaces.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-router-endpoints-classification.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-schema-changes.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-secrets.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-snippets.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-template.md1
-rw-r--r--doc/architecture/blueprints/cells/cells-feature-uploads.md1
-rw-r--r--doc/architecture/blueprints/cells/proposal-stateless-router-with-buffering-requests.md1
-rw-r--r--doc/architecture/blueprints/cells/proposal-stateless-router-with-routes-learning.md1
-rw-r--r--doc/architecture/blueprints/ci_data_decay/pipeline_partitioning.md1
-rw-r--r--doc/architecture/blueprints/ci_pipeline_components/dev_workflow.md1
-rw-r--r--doc/architecture/blueprints/database/scalability/patterns/index.md1
-rw-r--r--doc/architecture/blueprints/database/scalability/patterns/read_mostly.md1
-rw-r--r--doc/architecture/blueprints/database/scalability/patterns/time_decay.md1
-rw-r--r--doc/architecture/blueprints/database_scaling/size-limits.md1
-rw-r--r--doc/architecture/index.md1
-rw-r--r--doc/ci/docker/index.md1
-rw-r--r--doc/ci/environments/index.md1
-rw-r--r--doc/ci/examples/index.md1
-rw-r--r--doc/ci/examples/laravel_with_gitlab_and_envoy/index.md1
-rw-r--r--doc/ci/index.md1
-rw-r--r--doc/ci/migration/circleci.md1
-rw-r--r--doc/ci/migration/jenkins.md1
-rw-r--r--doc/ci/pipelines/index.md1
-rw-r--r--doc/ci/pipelines/job_artifacts.md1
-rw-r--r--doc/ci/pipelines/schedules.md1
-rw-r--r--doc/ci/pipelines/settings.md1
-rw-r--r--doc/ci/services/index.md1
-rw-r--r--doc/development/fe_guide/style/javascript.md1
-rw-r--r--doc/development/fe_guide/style/scss.md1
-rw-r--r--doc/development/index.md1
-rw-r--r--doc/development/organization/index.md1
-rw-r--r--doc/development/testing_guide/review_apps.md4
-rw-r--r--doc/gitlab-basics/feature_branch_workflow.md1
-rw-r--r--doc/index.md1
-rw-r--r--doc/install/aws/gitlab_sre_for_aws.md1
-rw-r--r--doc/install/aws/index.md1
-rw-r--r--doc/install/index.md1
-rw-r--r--doc/install/install_methods.md1
-rw-r--r--doc/integration/index.md1
-rw-r--r--doc/legal/index.md1
-rw-r--r--doc/raketasks/index.md1
-rw-r--r--doc/security/index.md1
-rw-r--r--doc/topics/awesome_co.md1
-rw-r--r--doc/topics/git/cherry_picking.md1
-rw-r--r--doc/topics/git/git_add.md1
-rw-r--r--doc/topics/git/lfs/index.md1
-rw-r--r--doc/topics/git/rollback_commits.md1
-rw-r--r--doc/topics/git/stash.md1
-rw-r--r--doc/topics/git/unstage.md1
-rw-r--r--doc/topics/gitlab_flow.md1
-rw-r--r--doc/update/patch_versions.md1
-rw-r--r--doc/update/upgrading_from_ce_to_ee.md1
-rw-r--r--doc/update/upgrading_from_source.md1
-rw-r--r--doc/user/admin_area/appearance.md1
-rw-r--r--doc/user/admin_area/moderate_users.md4
-rw-r--r--doc/user/profile/notifications.md1
-rw-r--r--doc/user/project/issues/issue_weight.md1
-rw-r--r--doc/user/project/issues/managing_issues.md2
-rw-r--r--doc/user/project/merge_requests/approvals/index.md1
-rw-r--r--doc/user/project/merge_requests/creating_merge_requests.md1
-rw-r--r--doc/user/project/merge_requests/drafts.md1
-rw-r--r--doc/user/project/merge_requests/status_checks.md1
-rw-r--r--doc/user/project/pages/custom_domains_ssl_tls_certification/index.md1
-rw-r--r--doc/user/project/repository/file_finder.md1
-rw-r--r--doc/user/project/repository/forking_workflow.md1
-rw-r--r--doc/user/project/repository/mirror/bidirectional.md1
-rw-r--r--doc/user/project/repository/mirror/index.md1
-rw-r--r--doc/user/project/repository/mirror/pull.md1
-rw-r--r--doc/user/project/repository/mirror/push.md1
-rw-r--r--doc/user/project/time_tracking.md1
-rw-r--r--doc/user/shortcuts.md1
-rw-r--r--doc/user/todos.md1
-rw-r--r--lib/gitlab/analytics/cycle_analytics/request_params.rb2
-rw-r--r--lib/tasks/gitlab/packages/events.rake6
-rw-r--r--locale/gitlab.pot6
-rw-r--r--spec/controllers/projects/commit_controller_spec.rb31
-rw-r--r--spec/features/profiles/user_edit_profile_spec.rb8
-rw-r--r--spec/frontend/analytics/cycle_analytics/utils_spec.js5
-rw-r--r--spec/frontend/authentication/two_factor_auth/components/manage_two_factor_form_spec.js18
-rw-r--r--spec/frontend/ci/runner/admin_new_runner_app/admin_new_runner_app_spec.js8
-rw-r--r--spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js17
-rw-r--r--spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js8
-rw-r--r--spec/frontend/ci/runner/components/registration/__snapshots__/utils_spec.js.snap12
-rw-r--r--spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js50
-rw-r--r--spec/frontend/ci/runner/components/registration/registration_instructions_spec.js25
-rw-r--r--spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js6
-rw-r--r--spec/frontend/ci/runner/components/registration/registration_token_spec.js20
-rw-r--r--spec/frontend/ci/runner/components/registration/utils_spec.js17
-rw-r--r--spec/frontend/ci/runner/components/runner_list_empty_state_spec.js3
-rw-r--r--spec/frontend/ci/runner/components/runner_type_tabs_spec.js3
-rw-r--r--spec/frontend/ci/runner/components/stat/runner_count_spec.js4
-rw-r--r--spec/frontend/ci/runner/group_runners/group_runners_app_spec.js2
-rw-r--r--spec/frontend/ci/runner/mock_data.js111
-rw-r--r--spec/frontend/ci/runner/runner_search_utils_spec.js5
-rw-r--r--spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js12
-rw-r--r--spec/graphql/mutations/container_repositories/destroy_spec.rb2
-rw-r--r--spec/graphql/mutations/container_repositories/destroy_tags_spec.rb4
-rw-r--r--spec/helpers/ci/catalog/resources_helper_spec.rb2
-rw-r--r--spec/migrations/ensure_vum_bigint_backfill_is_finished_for_gl_dot_com_spec.rb35
-rw-r--r--spec/migrations/swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com_spec.rb66
-rw-r--r--spec/models/packages/event_spec.rb51
-rw-r--r--spec/requests/api/graphql/mutations/container_repository/destroy_spec.rb4
-rw-r--r--spec/requests/api/graphql/mutations/container_repository/destroy_tags_spec.rb8
-rw-r--r--spec/routing/project_routing_spec.rb8
-rw-r--r--spec/services/packages/create_event_service_spec.rb46
-rw-r--r--spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb10
-rw-r--r--spec/support/shared_examples/features/wiki/user_views_wiki_sidebar_shared_examples.rb14
-rw-r--r--spec/support/shared_examples/requests/api/packages_shared_examples.rb12
153 files changed, 700 insertions, 493 deletions
diff --git a/.gitlab/ci/review-apps/qa.gitlab-ci.yml b/.gitlab/ci/review-apps/qa.gitlab-ci.yml
index 12a7ddebc45..917184e0b5b 100644
--- a/.gitlab/ci/review-apps/qa.gitlab-ci.yml
+++ b/.gitlab/ci/review-apps/qa.gitlab-ci.yml
@@ -5,6 +5,7 @@ include:
- /ci/base.gitlab-ci.yml
- /ci/allure-report.yml
- /ci/knapsack-report.yml
+ - template: Verify/Browser-Performance.gitlab-ci.yml
.test-variables:
variables:
@@ -107,31 +108,14 @@ review-qa-non-blocking-parallel:
- .rules:qa-non-blocking-parallel
parallel: 5
-review-performance:
+browser_performance:
extends:
- .default-retry
- .review:rules:review-performance
- image:
- name: sitespeedio/sitespeed.io
- entrypoint: [""]
stage: qa
needs: ["review-deploy"]
- before_script:
- - export CI_ENVIRONMENT_URL="$(cat environment_url.txt)"
- - echo "${CI_ENVIRONMENT_URL}"
- - mkdir -p gitlab-exporter
- - wget -O ./gitlab-exporter/index.js https://gitlab.com/gitlab-org/gl-performance/raw/master/index.js
- - mkdir -p sitespeed-results
- script:
- - /start.sh --plugins.add ./gitlab-exporter --outputFolder sitespeed-results "${CI_ENVIRONMENT_URL}"
- after_script:
- - mv sitespeed-results/data/performance.json performance.json
- artifacts:
- paths:
- - sitespeed-results/
- reports:
- performance: performance.json
- expire_in: 31d
+ variables:
+ URL: environment_url.txt
e2e-test-report:
extends:
diff --git a/.gitlab/issue_templates/Navigation Proposals.md b/.gitlab/issue_templates/Navigation Proposals.md
index 72c8f43cc97..934cf440006 100644
--- a/.gitlab/issue_templates/Navigation Proposals.md
+++ b/.gitlab/issue_templates/Navigation Proposals.md
@@ -4,12 +4,23 @@
<!-- Use this section to explain the proposed changes, including details around usage and business drivers. -->
+
+#### Other locations that were considered
+
+ <!-- Include other design patterns or places you considered for this feature besides navigation. -->
+
### Checklist
+- [ ] Review the handbook page for [navigation changes](https://about.gitlab.com/handbook/product/ux/navigation/#when-to-consider-making-a-change-to-the-navigation)
- [ ] Add relevant information to the issue description detailing your proposal, including usage and business drivers.
-- [ ] Follow the [product development workflow](https://about.gitlab.com/handbook/product-development-flow/#validation-phase-2-problem-validation) validation process to ensure you are solving a well understood problem and that the proposed change is understandable and non-disruptive to users. Navigation-specific research is strongly encouraged.
-- [ ] Engage the [Foundations Product Manager](https://about.gitlab.com/handbook/product/categories/#foundations-group) for approval. The Foundations DRI will work with UX partners in product design, research, and technical writing, as applicable.
-- [ ] Engage the [Foundations](https://about.gitlab.com/handbook/product/categories/#foundations-group) team to ensure your proposal is in alignment with holistic changes happening to the left side bar.
-- [ ] Consider whether you need to communicate the change somehow, or if you will have an interim period in the UI where your nav item will live in more than one place.
+- [ ] List at least two other places you considered to introduce your feature
+- [ ] Add relevant designs to the Design Management area of the issue
+- [ ] Ensure your UI suggestion align with the [Documentation Style Guide](https://docs.gitlab.com/ee/development/documentation/styleguide/)
+- [ ] Engage ~"Technical Writing". They can help craft a term that best describes the feature(s) you’re proposing.
+- [ ] Follow the [product development workflow](https://about.gitlab.com/handbook/product-development-flow/#validation-phase-2-problem-validation) validation process to ensure you are solving a well understood problem and that the proposed change is understandable and non-disruptive to users. Navigation-specific research is mandatory for additions or when restructuring.
+- [ ] Engage the [Foundations Product Manager](https://about.gitlab.com/handbook/product/categories/#foundations-group) for approval. The Foundations DRI (@cdybenko) will work with UX partners in product design, research, and technical writing, as applicable.
+- [ ] Consider whether you need to [communicate the change somehow](https://design.gitlab.com/patterns/navigation#messaging-changes-to-users), or if you will have an interim period in the UI where your item will live in more than one place.
+- [ ] Ensure engineers are familiar with the [implementation steps for navigation](https://docs.gitlab.com/ee/development/navigation_sidebar.html#navigation-sidebar).
-/label ~UX ~"UI text" ~"documentation" ~"documentation" ~"Category:Navigation & Settings" ~"Category:Foundations" ~navigation
+/label ~UX ~"UI text" ~"documentation" ~"Category:Navigation & Settings" ~navigation ~type::ignore
+/label ~"Nav request::Start"
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index 53121680d21..8f8935b658b 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-82b151a8899eb49d04600ec17c84042736949f48
+c84d44f21189bbe95d5878bfb3c703915da80ee7
diff --git a/app/assets/javascripts/analytics/cycle_analytics/bundle.js b/app/assets/javascripts/analytics/cycle_analytics/bundle.js
new file mode 100644
index 00000000000..9fe31620938
--- /dev/null
+++ b/app/assets/javascripts/analytics/cycle_analytics/bundle.js
@@ -0,0 +1 @@
+export { default } from '~/analytics/cycle_analytics';
diff --git a/app/assets/javascripts/analytics/cycle_analytics/utils.js b/app/assets/javascripts/analytics/cycle_analytics/utils.js
index 9265ff952e0..939378a463e 100644
--- a/app/assets/javascripts/analytics/cycle_analytics/utils.js
+++ b/app/assets/javascripts/analytics/cycle_analytics/utils.js
@@ -1,3 +1,4 @@
+import { extractVSAFeaturesFromGON } from '~/analytics/shared/utils';
import { parseSeconds } from '~/lib/utils/datetime_utility';
import { formatTimeAsSummary } from '~/lib/utils/datetime/date_format_utility';
import { joinPaths } from '~/lib/utils/url_utility';
@@ -64,28 +65,6 @@ export const filterStagesByHiddenStatus = (stages = [], isHidden = true) =>
stages.filter(({ hidden = false }) => hidden === isHidden);
/**
- * @typedef {Object} MetricData
- * @property {String} title - Title of the metric measured
- * @property {String} value - String representing the decimal point value, e.g '1.5'
- * @property {String} [unit] - String representing the decimal point value, e.g '1.5'
- *
- * @typedef {Object} TransformedMetricData
- * @property {String} label - Title of the metric measured
- * @property {String} value - String representing the decimal point value, e.g '1.5'
- * @property {String} identifier - Slugified string based on the 'title' or the provided 'identifier' attribute
- * @property {String} description - String to display for a description
- * @property {String} unit - String representing the decimal point value, e.g '1.5'
- */
-
-const extractFeatures = (gon) => ({
- // licensed feature toggles
- cycleAnalyticsForGroups: Boolean(gon?.licensed_features?.cycleAnalyticsForGroups),
- groupLevelAnalyticsDashboard: Boolean(gon?.licensed_features?.groupLevelAnalyticsDashboard),
- // feature flags
- groupAnalyticsDashboardsPage: Boolean(gon?.features?.groupAnalyticsDashboardsPage),
-});
-
-/**
* Builds the initial data object for Value Stream Analytics with data loaded from the backend
*
* @param {Object} dataset - dataset object paseed to the frontend via data-* properties
@@ -99,7 +78,6 @@ export const buildCycleAnalyticsInitialData = ({
createdBefore,
namespaceName,
namespaceFullPath,
- gon,
} = {}) => {
return {
projectId: parseInt(projectId, 10),
@@ -111,7 +89,7 @@ export const buildCycleAnalyticsInitialData = ({
createdAfter: new Date(createdAfter),
createdBefore: new Date(createdBefore),
selectedStage: stage ? JSON.parse(stage) : null,
- features: extractFeatures(gon),
+ features: extractVSAFeaturesFromGON(),
};
};
diff --git a/app/assets/javascripts/analytics/shared/utils.js b/app/assets/javascripts/analytics/shared/utils.js
index a85f3fb3730..88a0f6f30cb 100644
--- a/app/assets/javascripts/analytics/shared/utils.js
+++ b/app/assets/javascripts/analytics/shared/utils.js
@@ -129,12 +129,28 @@ export const fetchMetricsData = (requests = [], requestPath, params) => {
* @param {Array} projectPaths - Array of project paths to include in the `query` parameter
* @returns a URL or blank string if there is no groupPath set
*/
-export const generateValueStreamsDashboardLink = (groupPath, projectPaths = []) => {
- if (groupPath.length) {
+export const generateValueStreamsDashboardLink = (namespacePath, projectPaths = []) => {
+ if (namespacePath.length) {
const query = projectPaths.length ? `?query=${projectPaths.join(',')}` : '';
const dashboardsSlug = '/-/analytics/dashboards/value_streams_dashboard';
- const segments = [gon.relative_url_root || '', '/', groupPath, dashboardsSlug];
+ const segments = [gon.relative_url_root || '', '/', namespacePath, dashboardsSlug];
return joinPaths(...segments).concat(query);
}
return '';
};
+
+/**
+ * Extracts the relevant feature and license flags needed for VSA
+ *
+ * @param {Object} gon the global `window.gon` object populated when the page loads
+ * @returns an object containing the extracted feature flags and their boolean status
+ */
+export const extractVSAFeaturesFromGON = () => ({
+ // licensed feature toggles
+ cycleAnalyticsForGroups: Boolean(gon?.licensed_features?.cycleAnalyticsForGroups),
+ cycleAnalyticsForProjects: Boolean(gon?.licensed_features?.cycleAnalyticsForProjects),
+ groupLevelAnalyticsDashboard: Boolean(gon?.licensed_features?.groupLevelAnalyticsDashboard),
+ // feature flags
+ groupAnalyticsDashboardsPage: Boolean(gon?.features?.groupAnalyticsDashboardsPage),
+ vsaGroupAndProjectParity: Boolean(gon?.features?.vsaGroupAndProjectParity),
+});
diff --git a/app/assets/javascripts/ci/pipeline_editor/components/commit/commit_form.vue b/app/assets/javascripts/ci/pipeline_editor/components/commit/commit_form.vue
index 4775836fcc6..3fe9103c2b3 100644
--- a/app/assets/javascripts/ci/pipeline_editor/components/commit/commit_form.vue
+++ b/app/assets/javascripts/ci/pipeline_editor/components/commit/commit_form.vue
@@ -146,7 +146,7 @@ export default {
</gl-sprintf>
</gl-form-checkbox>
</gl-form-group>
- <div class="gl-display-flex gl-py-5 gl-border-t-gray-100 gl-border-t-solid gl-border-t-1">
+ <div class="gl-display-flex gl-py-5">
<gl-button
type="submit"
class="js-no-auto-disable gl-mr-3"
diff --git a/app/assets/javascripts/pages/projects/cycle_analytics/show/index.js b/app/assets/javascripts/pages/projects/cycle_analytics/show/index.js
index 05a1bbc69ed..fe9f0c7e69f 100644
--- a/app/assets/javascripts/pages/projects/cycle_analytics/show/index.js
+++ b/app/assets/javascripts/pages/projects/cycle_analytics/show/index.js
@@ -1,3 +1,3 @@
-import initCycleAnalytics from '~/analytics/cycle_analytics';
+import cycleAnalyticsAppBundle from 'ee_else_ce/analytics/cycle_analytics/bundle';
-initCycleAnalytics();
+cycleAnalyticsAppBundle();
diff --git a/app/assets/stylesheets/page_bundles/wiki.scss b/app/assets/stylesheets/page_bundles/wiki.scss
index d7d454bde45..6e7f1b8cf3c 100644
--- a/app/assets/stylesheets/page_bundles/wiki.scss
+++ b/app/assets/stylesheets/page_bundles/wiki.scss
@@ -102,24 +102,40 @@
}
}
- .active > a {
- color: var(--black, $black);
- }
-
.active > .wiki-list {
a,
.wiki-list-expand-button,
.wiki-list-collapse-button {
- color: var(--black, $black);
+ color: $black;
+ }
+ }
+
+ .wiki-list {
+ &:hover {
+ background: $gray-10;
+
+ .wiki-list-create-child-button {
+ display: block;
+ box-shadow: none;
+
+ &:focus {
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px $blue-400;
+ }
+
+ &:active {
+ background: $gray-100 !important;
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px $blue-400;
+ }
+ }
}
}
.wiki-list-expand-button,
.wiki-list-collapse-button {
- color: var(--gray-400, $gray-400);
+ color: $gray-400;
&:hover {
- color: var(--black, $black);
+ color: $black;
}
}
@@ -130,10 +146,6 @@
margin: 0;
}
- ul.wiki-pages li {
- margin: 5px 0 10px;
- }
-
ul.wiki-pages ul {
padding-left: 20px;
}
@@ -172,6 +184,10 @@ ul.wiki-pages-list.content-list {
}
.wiki-list {
+ .wiki-list-create-child-button {
+ display: none;
+ }
+
.wiki-list-expand-button,
.wiki-list-collapse-button {
left: -$gl-spacing-scale-5;
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb
index a86a0fb3bd2..8aca6a3fd5b 100644
--- a/app/controllers/projects/commit_controller.rb
+++ b/app/controllers/projects/commit_controller.rb
@@ -48,7 +48,11 @@ class Projects::CommitController < Projects::ApplicationController
end
def diff_files
- render template: 'projects/commit/diff_files', layout: false, locals: { diffs: @diffs, environment: @environment }
+ respond_to do |format|
+ format.html do
+ render template: 'projects/commit/diff_files', layout: false, locals: { diffs: @diffs, environment: @environment }
+ end
+ end
end
# rubocop: disable CodeReuse/ActiveRecord
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb
index dbed5adf2e8..9aa4af7a5c7 100644
--- a/app/controllers/projects/cycle_analytics_controller.rb
+++ b/app/controllers/projects/cycle_analytics_controller.rb
@@ -24,6 +24,11 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController
push_licensed_feature(:cycle_analytics_for_groups) if project.licensed_feature_available?(:cycle_analytics_for_groups)
push_licensed_feature(:group_level_analytics_dashboard) if project.licensed_feature_available?(:group_level_analytics_dashboard)
push_frontend_feature_flag(:group_analytics_dashboards_page, @project.namespace)
+
+ if project.licensed_feature_available?(:cycle_analytics_for_projects)
+ push_licensed_feature(:cycle_analytics_for_projects)
+ push_frontend_feature_flag(:vsa_group_and_project_parity, @project.namespace)
+ end
end
def show
diff --git a/app/helpers/ci/catalog/resources_helper.rb b/app/helpers/ci/catalog/resources_helper.rb
index 46d78cd6b24..c40c881aa20 100644
--- a/app/helpers/ci/catalog/resources_helper.rb
+++ b/app/helpers/ci/catalog/resources_helper.rb
@@ -7,7 +7,7 @@ module Ci
false
end
- def js_ci_catalog_data
+ def js_ci_catalog_data(_project)
{}
end
end
diff --git a/app/models/packages/event.rb b/app/models/packages/event.rb
index bb2c33594e5..a033f9a9393 100644
--- a/app/models/packages/event.rb
+++ b/app/models/packages/event.rb
@@ -1,61 +1,59 @@
# frozen_string_literal: true
-class Packages::Event < ApplicationRecord
- belongs_to :package, optional: true
-
- UNIQUE_EVENTS_ALLOWED = %i[push_package delete_package pull_package pull_symbol_package push_symbol_package].freeze
- EVENT_SCOPES = ::Packages::Package.package_types.merge(container: 1000, tag: 1001, dependency_proxy: 1002).freeze
-
- EVENT_PREFIX = "i_package"
-
- enum event_scope: EVENT_SCOPES
-
- enum event_type: {
- push_package: 0,
- delete_package: 1,
- pull_package: 2,
- search_package: 3,
- list_package: 4,
- list_repositories: 5,
- delete_repository: 6,
- delete_tag: 7,
- delete_tag_bulk: 8,
- list_tags: 9,
- cli_metadata: 10,
- pull_symbol_package: 11,
- push_symbol_package: 12,
- pull_manifest: 13,
- pull_manifest_from_cache: 14,
- pull_blob: 15,
- pull_blob_from_cache: 16
- }
-
- enum originator_type: { user: 0, deploy_token: 1, guest: 2 }
-
- # Remove some of the events, for now, so we don't hammer Redis too hard.
- # See: https://gitlab.com/gitlab-org/gitlab/-/issues/280770
- def self.event_allowed?(event_type)
- return true if UNIQUE_EVENTS_ALLOWED.include?(event_type.to_sym)
-
- false
- end
-
- # counter names for unique user tracking (for MAU)
- def self.unique_counters_for(event_scope, event_type, originator_type)
- return [] unless event_allowed?(event_type)
- return [] if originator_type.to_s == 'guest'
-
- ["#{EVENT_PREFIX}_#{event_scope}_#{originator_type}"]
- end
-
- # total counter names for tracking number of events
- def self.counters_for(event_scope, event_type, originator_type)
- return [] unless event_allowed?(event_type)
-
- [
- "#{EVENT_PREFIX}_#{event_type}",
- "#{EVENT_PREFIX}_#{event_type}_by_#{originator_type}",
- "#{EVENT_PREFIX}_#{event_scope}_#{event_type}"
- ]
+module Packages
+ class Event
+ UNIQUE_EVENTS_ALLOWED = %i[push_package delete_package pull_package pull_symbol_package push_symbol_package].freeze
+ EVENT_SCOPES = ::Packages::Package.package_types.merge(container: 1000, tag: 1001, dependency_proxy: 1002).freeze
+
+ EVENT_PREFIX = "i_package"
+
+ EVENT_TYPES = %i[
+ push_package
+ delete_package
+ pull_package
+ search_package
+ list_package
+ list_repositories
+ delete_repository
+ delete_tag
+ delete_tag_bulk
+ list_tags
+ cli_metadata
+ pull_symbol_package
+ push_symbol_package
+ pull_manifest
+ pull_manifest_from_cache
+ pull_blob
+ pull_blob_from_cache
+ ].freeze
+
+ ORIGINATOR_TYPES = %i[user deploy_token guest].freeze
+
+ # Remove some of the events, for now, so we don't hammer Redis too hard.
+ # See: https://gitlab.com/gitlab-org/gitlab/-/issues/280770
+ def self.event_allowed?(event_type)
+ return true if UNIQUE_EVENTS_ALLOWED.include?(event_type.to_sym)
+
+ false
+ end
+
+ # counter names for unique user tracking (for MAU)
+ def self.unique_counters_for(event_scope, event_type, originator_type)
+ return [] unless event_allowed?(event_type)
+ return [] if originator_type.to_s == 'guest'
+
+ ["#{EVENT_PREFIX}_#{event_scope}_#{originator_type}"]
+ end
+
+ # total counter names for tracking number of events
+ def self.counters_for(event_scope, event_type, originator_type)
+ return [] unless event_allowed?(event_type)
+
+ [
+ "#{EVENT_PREFIX}_#{event_type}",
+ "#{EVENT_PREFIX}_#{event_type}_by_#{originator_type}",
+ "#{EVENT_PREFIX}_#{event_scope}_#{event_type}"
+ ]
+ end
end
end
diff --git a/app/services/packages/create_event_service.rb b/app/services/packages/create_event_service.rb
index 82c4292fca8..8eac30f0022 100644
--- a/app/services/packages/create_event_service.rb
+++ b/app/services/packages/create_event_service.rb
@@ -10,15 +10,6 @@ module Packages
::Packages::Event.counters_for(event_scope, event_name, originator_type).each do |event_name|
::Gitlab::UsageDataCounters::PackageEventCounter.count(event_name)
end
-
- if Feature.enabled?(:collect_package_events) && Gitlab::Database.read_write?
- ::Packages::Event.create!(
- event_type: event_name,
- originator: current_user&.id,
- originator_type: originator_type,
- event_scope: event_scope
- )
- end
end
def originator_type
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index 2adc7844a67..c9060127b41 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -14,8 +14,7 @@
- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project)
- last_pipeline = project.last_pipeline if show_pipeline_status_icon
- css_controls_class = "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present?
-- css_controls_container_class = compact_mode ? "" : "gl-lg-flex-direction-row gl-justify-content-space-between"
-- css_metadata_classes = "gl-display-flex gl-align-items-center gl-mr-5 gl-reset-color! icon-wrapper has-tooltip"
+- css_metadata_classes = "gl-display-flex gl-align-items-center gl-ml-5 gl-reset-color! icon-wrapper has-tooltip"
%li.project-row
= cache(cache_key) do
@@ -55,10 +54,10 @@
= render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: project, additional_classes: 'gl-ml-3!'
- if show_last_commit_as_description
- .description.gl-display-none.gl-sm-display-block.gl-overflow-hidden.gl-mr-3.gl-mt-2
+ .description.gl-display-none.gl-sm-display-block.gl-overflow-hidden.gl-mr-3.gl-mt-2.gl-font-sm
= link_to_markdown(project.commit.title, project_commit_path(project, project.commit), class: "commit-row-message")
- elsif project.description.present?
- .description.gl-display-none.gl-sm-display-block.gl-overflow-hidden.gl-mr-3.gl-mt-2
+ .description.gl-display-none.gl-sm-display-block.gl-overflow-hidden.gl-mr-3.gl-mt-2.gl-font-sm
= markdown_field(project, :description)
- if project.topics.any?
@@ -71,7 +70,7 @@
.controls.gl-display-flex.gl-align-items-center
- if show_pipeline_status_icon && last_pipeline.present?
- pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref)
- %span.icon-wrapper.pipeline-status.gl-mr-5
+ %span.icon-wrapper.pipeline-status
= render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path
= render_if_exists 'shared/projects/archived', project: project
@@ -79,17 +78,17 @@
= link_to project_starrers_path(project), class: "#{css_metadata_classes} stars", title: _('Stars'), data: { container: 'body', placement: 'top' } do
= sprite_icon('star-o', size: 14, css_class: 'gl-mr-2')
= badge_count(project.star_count)
- .updated-note.gl-ml-3.gl-sm-ml-0
+ .updated-note.gl-font-sm.gl-ml-3.gl-sm-ml-0
%span
= _('Updated')
= updated_tooltip
.project-cell{ class: "#{css_class} gl-xs-display-none!" }
- .project-controls.gl-display-flex.gl-flex-direction-column.gl-w-full{ class: css_controls_container_class, data: { testid: 'project_controls'} }
- .controls.gl-display-flex.gl-align-items-center{ class: css_controls_class }
+ .project-controls.gl-display-flex.gl-flex-direction-column.gl-align-items-flex-end.gl-w-full{ data: { testid: 'project_controls'} }
+ .controls.gl-display-flex.gl-align-items-center.gl-mb-2{ class: "#{css_controls_class} gl-pr-0!" }
- if show_pipeline_status_icon && last_pipeline.present?
- pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref)
- %span.icon-wrapper.pipeline-status.gl-mr-5
+ %span.icon-wrapper.pipeline-status
= render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path
= render_if_exists 'shared/projects/archived', project: project
@@ -109,7 +108,7 @@
= link_to project_issues_path(project), class: "#{css_metadata_classes} issues", title: _('Issues'), data: { container: 'body', placement: 'top' } do
= sprite_icon('issues', size: 14, css_class: 'gl-mr-2')
= badge_count(project.open_issues_count)
- .updated-note.gl-white-space-nowrap.gl-justify-content-end
+ .updated-note.gl-font-sm.gl-white-space-nowrap.gl-justify-content-end
%span
= _('Updated')
= updated_tooltip
diff --git a/app/views/shared/wikis/_sidebar_wiki_page.html.haml b/app/views/shared/wikis/_sidebar_wiki_page.html.haml
index 38a7e6fc813..2c5c3aa68a3 100644
--- a/app/views/shared/wikis/_sidebar_wiki_page.html.haml
+++ b/app/views/shared/wikis/_sidebar_wiki_page.html.haml
@@ -1,3 +1,7 @@
+- wiki_path = wiki_page_path(@wiki, wiki_page)
+
%li{ class: active_when(params[:id] == wiki_page.slug) }
- = link_to wiki_page_path(@wiki, wiki_page), data: { qa_selector: 'wiki_page_link', qa_page_name: wiki_page.human_title } do
- = wiki_page.human_title
+ .gl-relative.gl-display-flex.gl-align-items-center.js-wiki-list-toggle.wiki-list{ data: { testid: 'wiki-list' } }
+ = render Pajamas::ButtonComponent.new(icon: 'plus', href: "#{wiki_path}/{new_page_title}", button_options: { class: 'wiki-list-create-child-button gl-bg-transparent! gl-hover-bg-gray-50! gl-focus-bg-gray-50! gl-absolute gl-top-half gl-translate-y-n50 gl-cursor-pointer gl-right-3' })
+ = link_to wiki_path, data: { qa_selector: 'wiki_page_link', qa_page_name: wiki_page.human_title } do
+ = wiki_page.human_title
diff --git a/app/views/shared/wikis/_wiki_directory.html.haml b/app/views/shared/wikis/_wiki_directory.html.haml
index ced51e1f697..6a066e0a838 100644
--- a/app/views/shared/wikis/_wiki_directory.html.haml
+++ b/app/views/shared/wikis/_wiki_directory.html.haml
@@ -1,8 +1,11 @@
+- wiki_path = wiki_page_path(@wiki, wiki_directory)
+
%li{ class: active_when(params[:id] == wiki_directory.slug), data: { qa_selector: 'wiki_directory_content' } }
- .gl-relative.gl-display-flex.gl-align-items-center.js-wiki-list-toggle.wiki-list<
+ .gl-relative.gl-display-flex.gl-align-items-center.js-wiki-list-toggle.wiki-list{ data: { testid: 'wiki-list' } }<
= sprite_icon('chevron-right', css_class: 'js-wiki-list-expand-button wiki-list-expand-button gl-mr-2 gl-cursor-pointer')
= sprite_icon('chevron-down', css_class: 'js-wiki-list-collapse-button wiki-list-collapse-button gl-mr-2 gl-cursor-pointer')
- = link_to wiki_page_path(@wiki, wiki_directory), data: { qa_selector: 'wiki_dir_page_link', qa_page_name: wiki_directory.title } do
+ = render Pajamas::ButtonComponent.new(icon: 'plus', href: "#{wiki_path}/{new_page_title}", button_options: { class: 'wiki-list-create-child-button gl-bg-transparent! gl-hover-bg-gray-50! gl-focus-bg-gray-50! gl-absolute gl-top-half gl-translate-y-n50 gl-cursor-pointer gl-right-3' })
+ = link_to wiki_path, data: { qa_selector: 'wiki_dir_page_link', qa_page_name: wiki_directory.title } do
= wiki_directory.title
%ul
- wiki_directory.entries.each do |entry|
diff --git a/config/feature_flags/development/collect_package_events.yml b/config/feature_flags/development/collect_package_events.yml
deleted file mode 100644
index 68ceb596d8a..00000000000
--- a/config/feature_flags/development/collect_package_events.yml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-name: collect_package_events
-introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45802
-rollout_issue_url:
-milestone: '13.6'
-type: development
-group: group::package registry
-default_enabled: false
diff --git a/config/feature_flags/development/vsa_group_and_project_parity.yml b/config/feature_flags/development/vsa_group_and_project_parity.yml
new file mode 100644
index 00000000000..35405dc3409
--- /dev/null
+++ b/config/feature_flags/development/vsa_group_and_project_parity.yml
@@ -0,0 +1,8 @@
+---
+name: vsa_group_and_project_parity
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/114056
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/396865
+milestone: '15.11'
+type: development
+group: group::optimize
+default_enabled: false
diff --git a/config/routes/project.rb b/config/routes/project.rb
index ceb0671c034..285f01538d1 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -25,11 +25,10 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
# Use this scope for all new project routes.
scope '-' do
get 'archive/*id', constraints: { format: Gitlab::PathRegex.archive_formats_regex, id: /.+?/ }, to: 'repositories#archive', as: 'archive'
- # Since the page parameter can contain slashes (panel/new), use Rails'
- # "Route Globbing" syntax (/*page) so that the route helpers do not encode
- # the slash character.
- get 'metrics(/:dashboard_path)(/*page)', constraints: { dashboard_path: /.+\.yml/, page: 'panel/new' },
- to: 'metrics_dashboard#show', as: :metrics_dashboard, format: false
+ get 'metrics(/:dashboard_path)', constraints: { dashboard_path: /.+\.yml/ },
+ to: 'metrics_dashboard#show', as: :metrics_dashboard, format: false
+ get 'metrics(/:dashboard_path)/panel/new', constraints: { dashboard_path: /.+\.yml/ },
+ to: 'metrics_dashboard#show', as: :new_metrics_dashboard, format: false
namespace :metrics, module: :metrics do
namespace :dashboards do
diff --git a/db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb b/db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb
new file mode 100644
index 00000000000..7d3f4491818
--- /dev/null
+++ b/db/migrate/20230303232426_add_role_approvers_to_scan_result_policies.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddRoleApproversToScanResultPolicies < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :scan_result_policies, :role_approvers, :integer, array: true, default: []
+ end
+end
diff --git a/db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb b/db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb
new file mode 100644
index 00000000000..be4eb05634a
--- /dev/null
+++ b/db/post_migrate/20230321011529_ensure_vum_bigint_backfill_is_finished_for_gl_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureVumBigintBackfillIsFinishedForGlDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'vulnerability_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb b/db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..6c5c001fe0f
--- /dev/null
+++ b/db/post_migrate/20230321011903_swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com.rb
@@ -0,0 +1,74 @@
+# frozen_string_literal: true
+
+class SwapVulnerabilityUserMentionsNoteIdToBigintForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ disable_ddl_transaction!
+
+ TABLE_NAME = 'vulnerability_user_mentions'
+
+ def up
+ return unless should_run?
+
+ swap
+ end
+
+ def down
+ return unless should_run?
+
+ swap
+ end
+
+ def swap
+ # This will replace the existing index_vulnerability_user_mentions_on_note_id
+ add_concurrent_index TABLE_NAME, :note_id_convert_to_bigint, unique: true,
+ name: 'index_vulnerability_user_mentions_on_note_id_convert_to_bigint',
+ where: 'note_id_convert_to_bigint IS NOT NULL'
+
+ # This will replace the existing index_vulns_user_mentions_on_vulnerability_id
+ add_concurrent_index TABLE_NAME, :vulnerability_id, unique: true,
+ name: 'tmp_index_vulns_user_mentions_on_vulnerability_id',
+ where: 'note_id_convert_to_bigint IS NULL'
+
+ # This will replace the existing index_vulns_user_mentions_on_vulnerability_id_and_note_id
+ add_concurrent_index TABLE_NAME, [:vulnerability_id, :note_id_convert_to_bigint], unique: true,
+ name: 'tmp_index_vulns_user_mentions_on_vulnerability_id_and_note_id'
+
+ # This will replace the existing fk_rails_a18600f210
+ add_concurrent_foreign_key TABLE_NAME, :notes, column: :note_id_convert_to_bigint,
+ name: 'fk_vulnerability_user_mentions_note_id_convert_to_bigint',
+ on_delete: :cascade
+
+ with_lock_retries(raise_on_exhaustion: true) do
+ execute "LOCK TABLE notes, #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"
+
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id TO note_id_tmp"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_convert_to_bigint TO note_id"
+ execute "ALTER TABLE #{TABLE_NAME} RENAME COLUMN note_id_tmp TO note_id_convert_to_bigint"
+
+ function_name = Gitlab::Database::UnidirectionalCopyTrigger
+ .on_table(TABLE_NAME, connection: connection)
+ .name(:note_id, :note_id_convert_to_bigint)
+ execute "ALTER FUNCTION #{quote_table_name(function_name)} RESET ALL"
+
+ execute 'DROP INDEX IF EXISTS index_vulnerability_user_mentions_on_note_id'
+ rename_index TABLE_NAME, 'index_vulnerability_user_mentions_on_note_id_convert_to_bigint',
+ 'index_vulnerability_user_mentions_on_note_id'
+
+ execute 'DROP INDEX IF EXISTS index_vulns_user_mentions_on_vulnerability_id'
+ rename_index TABLE_NAME, 'tmp_index_vulns_user_mentions_on_vulnerability_id',
+ 'index_vulns_user_mentions_on_vulnerability_id'
+
+ execute 'DROP INDEX IF EXISTS index_vulns_user_mentions_on_vulnerability_id_and_note_id'
+ rename_index TABLE_NAME, 'tmp_index_vulns_user_mentions_on_vulnerability_id_and_note_id',
+ 'index_vulns_user_mentions_on_vulnerability_id_and_note_id'
+
+ execute "ALTER TABLE #{TABLE_NAME} DROP CONSTRAINT IF EXISTS fk_rails_a18600f210"
+ rename_constraint(TABLE_NAME, 'fk_vulnerability_user_mentions_note_id_convert_to_bigint', 'fk_rails_a18600f210')
+ end
+ end
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/schema_migrations/20230303232426 b/db/schema_migrations/20230303232426
new file mode 100644
index 00000000000..30472765a0a
--- /dev/null
+++ b/db/schema_migrations/20230303232426
@@ -0,0 +1 @@
+75efa2b134ee1e5af77d483483b6065c5bc6c840ed0eede237035b028d065234 \ No newline at end of file
diff --git a/db/schema_migrations/20230321011529 b/db/schema_migrations/20230321011529
new file mode 100644
index 00000000000..2491b3b23db
--- /dev/null
+++ b/db/schema_migrations/20230321011529
@@ -0,0 +1 @@
+726d3232acecf6408a7f25876ac9104d5a003fbaeeb8ab666d473b8cf379cc75 \ No newline at end of file
diff --git a/db/schema_migrations/20230321011903 b/db/schema_migrations/20230321011903
new file mode 100644
index 00000000000..a02b643406c
--- /dev/null
+++ b/db/schema_migrations/20230321011903
@@ -0,0 +1 @@
+ddb687f5e1b2593dc1c68c2c22ff12a276861c67faf4f775431e17b17380688d \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index f67a6accda4..effbb09213e 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -21951,7 +21951,8 @@ CREATE TABLE scan_result_policies (
updated_at timestamp with time zone NOT NULL,
orchestration_policy_idx smallint NOT NULL,
license_states text[] DEFAULT '{}'::text[],
- match_on_inclusion boolean
+ match_on_inclusion boolean,
+ role_approvers integer[] DEFAULT '{}'::integer[]
);
CREATE SEQUENCE scan_result_policies_id_seq
@@ -23995,11 +23996,11 @@ ALTER SEQUENCE vulnerability_statistics_id_seq OWNED BY vulnerability_statistics
CREATE TABLE vulnerability_user_mentions (
id bigint NOT NULL,
vulnerability_id bigint NOT NULL,
- note_id integer,
+ note_id_convert_to_bigint integer,
mentioned_users_ids integer[],
mentioned_projects_ids integer[],
mentioned_groups_ids integer[],
- note_id_convert_to_bigint bigint
+ note_id bigint
);
CREATE SEQUENCE vulnerability_user_mentions_id_seq
diff --git a/doc/administration/auth/index.md b/doc/administration/auth/index.md
index 2b978dd1f2c..b4e3103f853 100644
--- a/doc/administration/auth/index.md
+++ b/doc/administration/auth/index.md
@@ -1,5 +1,4 @@
---
-comments: false
type: index
stage: Manage
group: Authentication and Authorization
diff --git a/doc/administration/lfs/index.md b/doc/administration/lfs/index.md
index adfba28520e..3a4a7cad3b2 100644
--- a/doc/administration/lfs/index.md
+++ b/doc/administration/lfs/index.md
@@ -2,7 +2,6 @@
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"
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/lfs/lfs_administration.html'
---
# GitLab Git Large File Storage (LFS) Administration **(FREE SELF)**
diff --git a/doc/administration/server_hooks.md b/doc/administration/server_hooks.md
index 87ae6fdb003..e7066d2538b 100644
--- a/doc/administration/server_hooks.md
+++ b/doc/administration/server_hooks.md
@@ -2,7 +2,6 @@
stage: Systems
group: Gitaly
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
-disqus_identifier: 'https://docs.gitlab.com/ee/administration/custom_hooks.html'
---
# Git server hooks **(FREE SELF)**
diff --git a/doc/architecture/blueprints/cells/cells-feature-admin-area.md b/doc/architecture/blueprints/cells/cells-feature-admin-area.md
index abcf4a5e263..c4b096042be 100644
--- a/doc/architecture/blueprints/cells/cells-feature-admin-area.md
+++ b/doc/architecture/blueprints/cells/cells-feature-admin-area.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Admin Area'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-agent-for-kubernetes.md b/doc/architecture/blueprints/cells/cells-feature-agent-for-kubernetes.md
index 5f0c8c2823d..e136c36a760 100644
--- a/doc/architecture/blueprints/cells/cells-feature-agent-for-kubernetes.md
+++ b/doc/architecture/blueprints/cells/cells-feature-agent-for-kubernetes.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Agent for Kubernetes'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-backups.md b/doc/architecture/blueprints/cells/cells-feature-backups.md
index 80cac8764e6..be1bef5bcb9 100644
--- a/doc/architecture/blueprints/cells/cells-feature-backups.md
+++ b/doc/architecture/blueprints/cells/cells-feature-backups.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Backups'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-ci-runners.md b/doc/architecture/blueprints/cells/cells-feature-ci-runners.md
index 619c78d19ec..244321e2f42 100644
--- a/doc/architecture/blueprints/cells/cells-feature-ci-runners.md
+++ b/doc/architecture/blueprints/cells/cells-feature-ci-runners.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: CI Runners'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-container-registry.md b/doc/architecture/blueprints/cells/cells-feature-container-registry.md
index b266de56205..53f68acca65 100644
--- a/doc/architecture/blueprints/cells/cells-feature-container-registry.md
+++ b/doc/architecture/blueprints/cells/cells-feature-container-registry.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Container Registry'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-contributions-forks.md b/doc/architecture/blueprints/cells/cells-feature-contributions-forks.md
index cc6feb1c08a..eba58a24694 100644
--- a/doc/architecture/blueprints/cells/cells-feature-contributions-forks.md
+++ b/doc/architecture/blueprints/cells/cells-feature-contributions-forks.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Contributions: Forks'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-dashboard.md b/doc/architecture/blueprints/cells/cells-feature-dashboard.md
index 37ed13ad9f9..8a18f91013d 100644
--- a/doc/architecture/blueprints/cells/cells-feature-dashboard.md
+++ b/doc/architecture/blueprints/cells/cells-feature-dashboard.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Dashboard'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-data-migration.md b/doc/architecture/blueprints/cells/cells-feature-data-migration.md
index e24cd0323f4..af6a9275d7c 100644
--- a/doc/architecture/blueprints/cells/cells-feature-data-migration.md
+++ b/doc/architecture/blueprints/cells/cells-feature-data-migration.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Data migration'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-database-sequences.md b/doc/architecture/blueprints/cells/cells-feature-database-sequences.md
index 7966ac4bfdf..9edfc7e7b16 100644
--- a/doc/architecture/blueprints/cells/cells-feature-database-sequences.md
+++ b/doc/architecture/blueprints/cells/cells-feature-database-sequences.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Database Sequences'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-git-access.md b/doc/architecture/blueprints/cells/cells-feature-git-access.md
index 3582c99c7dd..f10920324ba 100644
--- a/doc/architecture/blueprints/cells/cells-feature-git-access.md
+++ b/doc/architecture/blueprints/cells/cells-feature-git-access.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Git Access'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-gitlab-pages.md b/doc/architecture/blueprints/cells/cells-feature-gitlab-pages.md
index 9d501918a21..c91c1c35422 100644
--- a/doc/architecture/blueprints/cells/cells-feature-gitlab-pages.md
+++ b/doc/architecture/blueprints/cells/cells-feature-gitlab-pages.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: GitLab Pages'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-global-search.md b/doc/architecture/blueprints/cells/cells-feature-global-search.md
index fdd56d7258d..a25efa4b19f 100644
--- a/doc/architecture/blueprints/cells/cells-feature-global-search.md
+++ b/doc/architecture/blueprints/cells/cells-feature-global-search.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Global search'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-graphql.md b/doc/architecture/blueprints/cells/cells-feature-graphql.md
index 8430d23c7f4..f3054b7fab4 100644
--- a/doc/architecture/blueprints/cells/cells-feature-graphql.md
+++ b/doc/architecture/blueprints/cells/cells-feature-graphql.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: GraphQL'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-organizations.md b/doc/architecture/blueprints/cells/cells-feature-organizations.md
index 9c2e33719ab..0cf0ad446e7 100644
--- a/doc/architecture/blueprints/cells/cells-feature-organizations.md
+++ b/doc/architecture/blueprints/cells/cells-feature-organizations.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Organizations'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-personal-namespaces.md b/doc/architecture/blueprints/cells/cells-feature-personal-namespaces.md
index 467683ffadd..22d3e5956dc 100644
--- a/doc/architecture/blueprints/cells/cells-feature-personal-namespaces.md
+++ b/doc/architecture/blueprints/cells/cells-feature-personal-namespaces.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Personal Namespaces'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-router-endpoints-classification.md b/doc/architecture/blueprints/cells/cells-feature-router-endpoints-classification.md
index c961857e4fa..e005b3bed8d 100644
--- a/doc/architecture/blueprints/cells/cells-feature-router-endpoints-classification.md
+++ b/doc/architecture/blueprints/cells/cells-feature-router-endpoints-classification.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Router Endpoints Classification'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-schema-changes.md b/doc/architecture/blueprints/cells/cells-feature-schema-changes.md
index c43fc6f302e..b1e430eec66 100644
--- a/doc/architecture/blueprints/cells/cells-feature-schema-changes.md
+++ b/doc/architecture/blueprints/cells/cells-feature-schema-changes.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Schema changes'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-secrets.md b/doc/architecture/blueprints/cells/cells-feature-secrets.md
index 44b65c27683..f6fd18eb168 100644
--- a/doc/architecture/blueprints/cells/cells-feature-secrets.md
+++ b/doc/architecture/blueprints/cells/cells-feature-secrets.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Secrets'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-snippets.md b/doc/architecture/blueprints/cells/cells-feature-snippets.md
index a40b44c7b74..2b64dacfbd3 100644
--- a/doc/architecture/blueprints/cells/cells-feature-snippets.md
+++ b/doc/architecture/blueprints/cells/cells-feature-snippets.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Snippets'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-template.md b/doc/architecture/blueprints/cells/cells-feature-template.md
index 6951421023d..394002a68a7 100644
--- a/doc/architecture/blueprints/cells/cells-feature-template.md
+++ b/doc/architecture/blueprints/cells/cells-feature-template.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Problem A'
---
diff --git a/doc/architecture/blueprints/cells/cells-feature-uploads.md b/doc/architecture/blueprints/cells/cells-feature-uploads.md
index 9d3500b6c36..15c65089e18 100644
--- a/doc/architecture/blueprints/cells/cells-feature-uploads.md
+++ b/doc/architecture/blueprints/cells/cells-feature-uploads.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells: Uploads'
---
diff --git a/doc/architecture/blueprints/cells/proposal-stateless-router-with-buffering-requests.md b/doc/architecture/blueprints/cells/proposal-stateless-router-with-buffering-requests.md
index 12102429b03..d241701898c 100644
--- a/doc/architecture/blueprints/cells/proposal-stateless-router-with-buffering-requests.md
+++ b/doc/architecture/blueprints/cells/proposal-stateless-router-with-buffering-requests.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells Stateless Router Proposal'
---
diff --git a/doc/architecture/blueprints/cells/proposal-stateless-router-with-routes-learning.md b/doc/architecture/blueprints/cells/proposal-stateless-router-with-routes-learning.md
index 7f25441c75f..826c74da83e 100644
--- a/doc/architecture/blueprints/cells/proposal-stateless-router-with-routes-learning.md
+++ b/doc/architecture/blueprints/cells/proposal-stateless-router-with-routes-learning.md
@@ -1,7 +1,6 @@
---
stage: enablement
group: Tenant Scale
-comments: false
description: 'Cells Stateless Router Proposal'
---
diff --git a/doc/architecture/blueprints/ci_data_decay/pipeline_partitioning.md b/doc/architecture/blueprints/ci_data_decay/pipeline_partitioning.md
index 3e86d30df1d..ff4424a5e87 100644
--- a/doc/architecture/blueprints/ci_data_decay/pipeline_partitioning.md
+++ b/doc/architecture/blueprints/ci_data_decay/pipeline_partitioning.md
@@ -1,5 +1,4 @@
---
-comments: false
status: ongoing
creation-date: "2022-05-31"
authors: [ "@grzesiek" ]
diff --git a/doc/architecture/blueprints/ci_pipeline_components/dev_workflow.md b/doc/architecture/blueprints/ci_pipeline_components/dev_workflow.md
index 266ea13c275..fd897781cf5 100644
--- a/doc/architecture/blueprints/ci_pipeline_components/dev_workflow.md
+++ b/doc/architecture/blueprints/ci_pipeline_components/dev_workflow.md
@@ -1,7 +1,6 @@
---
stage: verify
group: pipeline authoring
-comments: false
description: 'Development workflow for a components repository'
---
diff --git a/doc/architecture/blueprints/database/scalability/patterns/index.md b/doc/architecture/blueprints/database/scalability/patterns/index.md
index ec00d757377..d28734ce511 100644
--- a/doc/architecture/blueprints/database/scalability/patterns/index.md
+++ b/doc/architecture/blueprints/database/scalability/patterns/index.md
@@ -2,7 +2,6 @@
stage: Data Stores
group: Database
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
-comments: false
description: 'Learn how to scale the database through the use of best-of-class database scalability patterns'
---
diff --git a/doc/architecture/blueprints/database/scalability/patterns/read_mostly.md b/doc/architecture/blueprints/database/scalability/patterns/read_mostly.md
index ec236c9bfe3..3a3fd2f33c2 100644
--- a/doc/architecture/blueprints/database/scalability/patterns/read_mostly.md
+++ b/doc/architecture/blueprints/database/scalability/patterns/read_mostly.md
@@ -2,7 +2,6 @@
stage: Data Stores
group: Database
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
-comments: false
description: 'Learn how to scale operating on read-mostly data at scale'
---
diff --git a/doc/architecture/blueprints/database/scalability/patterns/time_decay.md b/doc/architecture/blueprints/database/scalability/patterns/time_decay.md
index 2b36a43a6db..24fc3f45717 100644
--- a/doc/architecture/blueprints/database/scalability/patterns/time_decay.md
+++ b/doc/architecture/blueprints/database/scalability/patterns/time_decay.md
@@ -2,7 +2,6 @@
stage: Data Stores
group: Database
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
-comments: false
description: 'Learn how to operate on large time-decay data'
---
diff --git a/doc/architecture/blueprints/database_scaling/size-limits.md b/doc/architecture/blueprints/database_scaling/size-limits.md
index e530bd6eff0..b6b9cda8827 100644
--- a/doc/architecture/blueprints/database_scaling/size-limits.md
+++ b/doc/architecture/blueprints/database_scaling/size-limits.md
@@ -1,7 +1,6 @@
---
stage: Data Stores
group: Database
-comments: false
description: 'Database Scalability / Limit table sizes'
---
diff --git a/doc/architecture/index.md b/doc/architecture/index.md
index 2467ba33fae..9fccd1c21d1 100644
--- a/doc/architecture/index.md
+++ b/doc/architecture/index.md
@@ -1,6 +1,5 @@
---
feedback: false
-comments: false
toc: false
---
diff --git a/doc/ci/docker/index.md b/doc/ci/docker/index.md
index e976700c160..162d67286ad 100644
--- a/doc/ci/docker/index.md
+++ b/doc/ci/docker/index.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Execution
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
-comments: false
type: index
---
diff --git a/doc/ci/environments/index.md b/doc/ci/environments/index.md
index a61dbe17981..fe0d71d5f1e 100644
--- a/doc/ci/environments/index.md
+++ b/doc/ci/environments/index.md
@@ -3,7 +3,6 @@ stage: Deploy
group: Environments
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
type: reference
-disqus_identifier: 'https://docs.gitlab.com/ee/ci/environments.html'
---
# Environments and deployments **(FREE)**
diff --git a/doc/ci/examples/index.md b/doc/ci/examples/index.md
index b05c872d624..f2871e50617 100644
--- a/doc/ci/examples/index.md
+++ b/doc/ci/examples/index.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Execution
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
-comments: false
type: index
---
diff --git a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
index d56f14617db..cf12943d279 100644
--- a/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
+++ b/doc/ci/examples/laravel_with_gitlab_and_envoy/index.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Execution
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
-disqus_identifier: 'https://docs.gitlab.com/ee/articles/laravel_with_gitlab_and_envoy/index.html'
author: Mehran Rasulian
author_gitlab: mehranrasulian
---
diff --git a/doc/ci/index.md b/doc/ci/index.md
index ea48a5e461d..4e57395aec7 100644
--- a/doc/ci/index.md
+++ b/doc/ci/index.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Execution
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
-comments: false
description: "Learn how to use GitLab CI/CD, the GitLab built-in Continuous Integration, Continuous Deployment, and Continuous Delivery toolset to build, test, and deploy your application."
type: index
---
diff --git a/doc/ci/migration/circleci.md b/doc/ci/migration/circleci.md
index c1e9f97a169..d39ae88a4a9 100644
--- a/doc/ci/migration/circleci.md
+++ b/doc/ci/migration/circleci.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Authoring
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
-comments: false
type: index, howto
---
diff --git a/doc/ci/migration/jenkins.md b/doc/ci/migration/jenkins.md
index 71deaadf9ec..8f067881195 100644
--- a/doc/ci/migration/jenkins.md
+++ b/doc/ci/migration/jenkins.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Authoring
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
-comments: false
type: index, howto
---
diff --git a/doc/ci/pipelines/index.md b/doc/ci/pipelines/index.md
index d2038dbcb62..a912c7f4557 100644
--- a/doc/ci/pipelines/index.md
+++ b/doc/ci/pipelines/index.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Authoring
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
-disqus_identifier: 'https://docs.gitlab.com/ee/ci/pipelines.html'
type: reference
---
diff --git a/doc/ci/pipelines/job_artifacts.md b/doc/ci/pipelines/job_artifacts.md
index 7db4596bb1d..fb7bf2d823b 100644
--- a/doc/ci/pipelines/job_artifacts.md
+++ b/doc/ci/pipelines/job_artifacts.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Security
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
-disqus_identifier: 'https://docs.gitlab.com/ee/user/project/pipelines/job_artifacts.html'
---
# Job artifacts **(FREE)**
diff --git a/doc/ci/pipelines/schedules.md b/doc/ci/pipelines/schedules.md
index 02728d5e1e0..c3dd1f5e96b 100644
--- a/doc/ci/pipelines/schedules.md
+++ b/doc/ci/pipelines/schedules.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Execution
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
-disqus_identifier: 'https://docs.gitlab.com/ee/user/project/pipelines/schedules.html'
type: reference, howto
---
diff --git a/doc/ci/pipelines/settings.md b/doc/ci/pipelines/settings.md
index 98dc02c1041..1d7877a7b2f 100644
--- a/doc/ci/pipelines/settings.md
+++ b/doc/ci/pipelines/settings.md
@@ -2,7 +2,6 @@
stage: Verify
group: Pipeline Execution
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
-disqus_identifier: 'https://docs.gitlab.com/ee/user/project/pipelines/settings.html'
type: reference, howto
---
diff --git a/doc/ci/services/index.md b/doc/ci/services/index.md
index eca4c62deb2..5107a62f734 100644
--- a/doc/ci/services/index.md
+++ b/doc/ci/services/index.md
@@ -2,7 +2,6 @@
stage: Verify
group: Runner
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
-comments: false
type: index
---
diff --git a/doc/development/fe_guide/style/javascript.md b/doc/development/fe_guide/style/javascript.md
index be5208e9b55..987543642f0 100644
--- a/doc/development/fe_guide/style/javascript.md
+++ b/doc/development/fe_guide/style/javascript.md
@@ -2,7 +2,6 @@
stage: none
group: unassigned
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
-disqus_identifier: 'https://docs.gitlab.com/ee/development/fe_guide/style_guide_js.html'
---
# JavaScript style guide
diff --git a/doc/development/fe_guide/style/scss.md b/doc/development/fe_guide/style/scss.md
index aed7310e95d..472182b16d6 100644
--- a/doc/development/fe_guide/style/scss.md
+++ b/doc/development/fe_guide/style/scss.md
@@ -2,7 +2,6 @@
stage: none
group: unassigned
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
-disqus_identifier: 'https://docs.gitlab.com/ee/development/fe_guide/style_guide_scss.html'
---
# SCSS style guide
diff --git a/doc/development/index.md b/doc/development/index.md
index a39a83b257a..f4a4a806d58 100644
--- a/doc/development/index.md
+++ b/doc/development/index.md
@@ -1,5 +1,4 @@
---
-comments: false
type: index, dev
stage: none
group: Development
diff --git a/doc/development/organization/index.md b/doc/development/organization/index.md
index 6a643603170..ef016c2d603 100644
--- a/doc/development/organization/index.md
+++ b/doc/development/organization/index.md
@@ -1,5 +1,4 @@
---
-comments: false
type: index, dev
stage: Data Stores
group: Tenant Scale
diff --git a/doc/development/testing_guide/review_apps.md b/doc/development/testing_guide/review_apps.md
index 7958d6db706..4e968cea3a0 100644
--- a/doc/development/testing_guide/review_apps.md
+++ b/doc/development/testing_guide/review_apps.md
@@ -47,8 +47,8 @@ Maintainers can elect to use the [process for merging during broken `master`](ht
## Performance Metrics
-On every [pipeline](https://gitlab.com/gitlab-org/gitlab/pipelines/125315730) in the `qa` stage, the
-`review-performance` job is automatically started: this job does basic
+On every Review App child pipeline in the `qa` stage, the
+`browser_performance` job is automatically started: this job does basic
browser performance testing using a
[Sitespeed.io Container](../../ci/testing/browser_performance_testing.md).
diff --git a/doc/gitlab-basics/feature_branch_workflow.md b/doc/gitlab-basics/feature_branch_workflow.md
index ce4aa0007c6..65445c226ca 100644
--- a/doc/gitlab-basics/feature_branch_workflow.md
+++ b/doc/gitlab-basics/feature_branch_workflow.md
@@ -2,7 +2,6 @@
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"
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/workflow.html'
---
# Feature branch workflow **(FREE)**
diff --git a/doc/index.md b/doc/index.md
index 49684705686..68105bcfb30 100644
--- a/doc/index.md
+++ b/doc/index.md
@@ -2,7 +2,6 @@
stage: none
group: unassigned
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
-comments: false
description: 'Learn how to use and administer GitLab, the most scalable Git-based fully integrated platform for software development.'
---
diff --git a/doc/install/aws/gitlab_sre_for_aws.md b/doc/install/aws/gitlab_sre_for_aws.md
index e68aea00b36..f957dfa8a65 100644
--- a/doc/install/aws/gitlab_sre_for_aws.md
+++ b/doc/install/aws/gitlab_sre_for_aws.md
@@ -2,7 +2,6 @@
stage: Systems
group: Distribution
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
-comments: false
description: Doing SRE for GitLab instances and runners on AWS.
---
diff --git a/doc/install/aws/index.md b/doc/install/aws/index.md
index 8f540691a45..4dcf2ce0927 100644
--- a/doc/install/aws/index.md
+++ b/doc/install/aws/index.md
@@ -2,7 +2,6 @@
stage: Systems
group: Distribution
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
-comments: false
description: Read through the GitLab installation methods.
type: index
---
diff --git a/doc/install/index.md b/doc/install/index.md
index 4aef471ad5c..292b00e2775 100644
--- a/doc/install/index.md
+++ b/doc/install/index.md
@@ -2,7 +2,6 @@
stage: Systems
group: Distribution
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
-comments: false
description: Read through the GitLab installation methods.
type: index
---
diff --git a/doc/install/install_methods.md b/doc/install/install_methods.md
index af15dc3f085..9331e81efa9 100644
--- a/doc/install/install_methods.md
+++ b/doc/install/install_methods.md
@@ -2,7 +2,6 @@
stage: Systems
group: Distribution
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
-comments: false
description: Read through the GitLab installation methods.
type: index
---
diff --git a/doc/integration/index.md b/doc/integration/index.md
index 02860339b6f..6be17640c6c 100644
--- a/doc/integration/index.md
+++ b/doc/integration/index.md
@@ -2,7 +2,6 @@
stage: Manage
group: Integrations
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
-comments: false
---
# Integrate with GitLab **(FREE)**
diff --git a/doc/legal/index.md b/doc/legal/index.md
index ea0301284ea..17a17ba5509 100644
--- a/doc/legal/index.md
+++ b/doc/legal/index.md
@@ -2,7 +2,6 @@
stage: none
group: unassigned
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
-comments: false
---
# Legal
diff --git a/doc/raketasks/index.md b/doc/raketasks/index.md
index e559605d147..a44f053bc7b 100644
--- a/doc/raketasks/index.md
+++ b/doc/raketasks/index.md
@@ -2,7 +2,6 @@
stage: Systems
group: Distribution
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
-comments: false
---
# Rake tasks **(FREE SELF)**
diff --git a/doc/security/index.md b/doc/security/index.md
index e447b8ffe64..7a78461d717 100644
--- a/doc/security/index.md
+++ b/doc/security/index.md
@@ -2,7 +2,6 @@
stage: Manage
group: Authentication and Authorization
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
-comments: false
type: index
---
diff --git a/doc/topics/awesome_co.md b/doc/topics/awesome_co.md
index ffda564cd91..e89dd677278 100644
--- a/doc/topics/awesome_co.md
+++ b/doc/topics/awesome_co.md
@@ -3,7 +3,6 @@ stage: Manage
group: Foundations
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
description: AwesomeCo test data harness created by the Test Data Working Group https://about.gitlab.com/company/team/structure/working-groups/demo-test-data/
-comments: false
---
# AwesomeCo
diff --git a/doc/topics/git/cherry_picking.md b/doc/topics/git/cherry_picking.md
index ce2a1d4b954..bd589562ed1 100644
--- a/doc/topics/git/cherry_picking.md
+++ b/doc/topics/git/cherry_picking.md
@@ -2,7 +2,6 @@
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
-comments: false
---
# Cherry-pick a Git commit **(FREE)**
diff --git a/doc/topics/git/git_add.md b/doc/topics/git/git_add.md
index 722701dbb49..1089202bbd3 100644
--- a/doc/topics/git/git_add.md
+++ b/doc/topics/git/git_add.md
@@ -2,7 +2,6 @@
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
-comments: false
---
# Git add **(FREE)**
diff --git a/doc/topics/git/lfs/index.md b/doc/topics/git/lfs/index.md
index cac203ffac0..4e4b97960f8 100644
--- a/doc/topics/git/lfs/index.md
+++ b/doc/topics/git/lfs/index.md
@@ -3,7 +3,6 @@ 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"
type: reference, howto
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/lfs/lfs/index.html'
---
# Git Large File Storage (LFS) **(FREE)**
diff --git a/doc/topics/git/rollback_commits.md b/doc/topics/git/rollback_commits.md
index 56d740f3d1b..d1f34c7cf9c 100644
--- a/doc/topics/git/rollback_commits.md
+++ b/doc/topics/git/rollback_commits.md
@@ -2,7 +2,6 @@
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
-comments: false
---
# Roll back commits **(FREE)**
diff --git a/doc/topics/git/stash.md b/doc/topics/git/stash.md
index ee931bbbb7c..9f621308a1d 100644
--- a/doc/topics/git/stash.md
+++ b/doc/topics/git/stash.md
@@ -2,7 +2,6 @@
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
-comments: false
---
# Git stash **(FREE)**
diff --git a/doc/topics/git/unstage.md b/doc/topics/git/unstage.md
index aad5d0f44f8..3f509cdacef 100644
--- a/doc/topics/git/unstage.md
+++ b/doc/topics/git/unstage.md
@@ -2,7 +2,6 @@
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
-comments: false
---
# Unstage a file in Git **(FREE)**
diff --git a/doc/topics/gitlab_flow.md b/doc/topics/gitlab_flow.md
index 0bf2e1fcc20..5ae6d547639 100644
--- a/doc/topics/gitlab_flow.md
+++ b/doc/topics/gitlab_flow.md
@@ -2,7 +2,6 @@
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
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/gitlab_flow.html'
---
# Introduction to GitLab Flow **(FREE)**
diff --git a/doc/update/patch_versions.md b/doc/update/patch_versions.md
index 8e62718125b..b6530418f97 100644
--- a/doc/update/patch_versions.md
+++ b/doc/update/patch_versions.md
@@ -2,7 +2,6 @@
stage: Systems
group: Distribution
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
-comments: false
---
# Universal update guide for patch versions of source installations **(FREE SELF)**
diff --git a/doc/update/upgrading_from_ce_to_ee.md b/doc/update/upgrading_from_ce_to_ee.md
index b99bb3d7992..8a66da507ec 100644
--- a/doc/update/upgrading_from_ce_to_ee.md
+++ b/doc/update/upgrading_from_ce_to_ee.md
@@ -2,7 +2,6 @@
stage: Systems
group: Distribution
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
-comments: false
---
# Upgrading from Community Edition to Enterprise Edition from source **(FREE SELF)**
diff --git a/doc/update/upgrading_from_source.md b/doc/update/upgrading_from_source.md
index b6efaa7ec25..400c5012e03 100644
--- a/doc/update/upgrading_from_source.md
+++ b/doc/update/upgrading_from_source.md
@@ -2,7 +2,6 @@
stage: Systems
group: Distribution
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
-comments: false
---
# Upgrading Community Edition and Enterprise Edition from source **(FREE SELF)**
diff --git a/doc/user/admin_area/appearance.md b/doc/user/admin_area/appearance.md
index b9850048e7d..a5311b083c3 100644
--- a/doc/user/admin_area/appearance.md
+++ b/doc/user/admin_area/appearance.md
@@ -2,7 +2,6 @@
stage: none
group: unassigned
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
-disqus_identifier: 'https://docs.gitlab.com/ee/customization/branded_login_page.html'
---
# GitLab Appearance **(FREE SELF)**
diff --git a/doc/user/admin_area/moderate_users.md b/doc/user/admin_area/moderate_users.md
index a273798c8eb..52227049e90 100644
--- a/doc/user/admin_area/moderate_users.md
+++ b/doc/user/admin_area/moderate_users.md
@@ -161,8 +161,8 @@ A user can be deactivated from the Admin Area. To do this:
For the deactivation option to be visible to an administrator, the user:
-- Must be currently active.
-- Must not be [dormant](#automatically-deactivate-dormant-users).
+- Must have a state of active.
+- Must be [dormant](#automatically-deactivate-dormant-users).
NOTE:
Users can also be deactivated using the [GitLab API](../../api/users.md#deactivate-user).
diff --git a/doc/user/profile/notifications.md b/doc/user/profile/notifications.md
index e6675b4eff2..c0c967a3f18 100644
--- a/doc/user/profile/notifications.md
+++ b/doc/user/profile/notifications.md
@@ -1,5 +1,4 @@
---
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/notifications.html'
stage: Plan
group: Project Management
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
diff --git a/doc/user/project/issues/issue_weight.md b/doc/user/project/issues/issue_weight.md
index d852ad3262b..05c348acf58 100644
--- a/doc/user/project/issues/issue_weight.md
+++ b/doc/user/project/issues/issue_weight.md
@@ -1,5 +1,4 @@
---
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/issue_weight.html'
stage: Plan
group: Project Management
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
diff --git a/doc/user/project/issues/managing_issues.md b/doc/user/project/issues/managing_issues.md
index e0966909b1e..a965148ef6c 100644
--- a/doc/user/project/issues/managing_issues.md
+++ b/doc/user/project/issues/managing_issues.md
@@ -298,7 +298,7 @@ To disable automatic issue closing:
1. On the top bar, select **Main menu > Projects** and find your project.
1. On the left sidebar, select **Settings > Repository**.
-1. Expand **Default branch**.
+1. Expand **Branch defaults**.
1. Clear the **Auto-close referenced issues on default branch** checkbox.
1. Select **Save changes**.
diff --git a/doc/user/project/merge_requests/approvals/index.md b/doc/user/project/merge_requests/approvals/index.md
index 21e2055cb61..e9d6593986b 100644
--- a/doc/user/project/merge_requests/approvals/index.md
+++ b/doc/user/project/merge_requests/approvals/index.md
@@ -3,7 +3,6 @@ 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"
type: reference, concepts
-disqus_identifier: 'https://docs.gitlab.com/ee/user/project/merge_requests/approvals/index.html'
---
# Merge request approvals **(FREE)**
diff --git a/doc/user/project/merge_requests/creating_merge_requests.md b/doc/user/project/merge_requests/creating_merge_requests.md
index 4ea549e5986..e5d9f46c75b 100644
--- a/doc/user/project/merge_requests/creating_merge_requests.md
+++ b/doc/user/project/merge_requests/creating_merge_requests.md
@@ -3,7 +3,6 @@ stage: Create
group: Code Review
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
description: "How to create merge requests in GitLab."
-disqus_identifier: 'https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html'
---
# Creating merge requests **(FREE)**
diff --git a/doc/user/project/merge_requests/drafts.md b/doc/user/project/merge_requests/drafts.md
index 62820988701..839f3d17a43 100644
--- a/doc/user/project/merge_requests/drafts.md
+++ b/doc/user/project/merge_requests/drafts.md
@@ -3,7 +3,6 @@ stage: Create
group: Code Review
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
type: reference, concepts
-disqus_identifier: 'https://docs.gitlab.com/ee/user/project/merge_requests/work_in_progress_merge_requests.html'
---
# Draft merge requests **(FREE)**
diff --git a/doc/user/project/merge_requests/status_checks.md b/doc/user/project/merge_requests/status_checks.md
index 6a791a17057..c0b83993d4b 100644
--- a/doc/user/project/merge_requests/status_checks.md
+++ b/doc/user/project/merge_requests/status_checks.md
@@ -3,7 +3,6 @@ stage: Govern
group: Compliance
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"
type: reference, concepts
-disqus_identifier: 'https://docs.gitlab.com/ee/user/project/merge_requests/status_checks.html'
---
# External status checks **(ULTIMATE)**
diff --git a/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md b/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md
index 849d478f922..7534d0fc91c 100644
--- a/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md
+++ b/doc/user/project/pages/custom_domains_ssl_tls_certification/index.md
@@ -1,5 +1,4 @@
---
-disqus_identifier: 'https://docs.gitlab.com/ee/user/project/pages/getting_started_part_three.html'
stage: Plan
group: Knowledge
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
diff --git a/doc/user/project/repository/file_finder.md b/doc/user/project/repository/file_finder.md
index 3fcc19db344..733ba34b30f 100644
--- a/doc/user/project/repository/file_finder.md
+++ b/doc/user/project/repository/file_finder.md
@@ -2,7 +2,6 @@
stage: Create
group: Editor
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
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/file_finder.html'
---
# File finder **(FREE)**
diff --git a/doc/user/project/repository/forking_workflow.md b/doc/user/project/repository/forking_workflow.md
index 8c7c94613a7..6e61964745e 100644
--- a/doc/user/project/repository/forking_workflow.md
+++ b/doc/user/project/repository/forking_workflow.md
@@ -2,7 +2,6 @@
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
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/forking_workflow.html'
---
# Project forking workflow **(FREE)**
diff --git a/doc/user/project/repository/mirror/bidirectional.md b/doc/user/project/repository/mirror/bidirectional.md
index 9942469dd5c..75d8bfaf1a0 100644
--- a/doc/user/project/repository/mirror/bidirectional.md
+++ b/doc/user/project/repository/mirror/bidirectional.md
@@ -2,7 +2,6 @@
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
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/repository_mirroring.html'
---
# Bidirectional mirroring **(PREMIUM)**
diff --git a/doc/user/project/repository/mirror/index.md b/doc/user/project/repository/mirror/index.md
index 7a50c294dfc..32183eccc2f 100644
--- a/doc/user/project/repository/mirror/index.md
+++ b/doc/user/project/repository/mirror/index.md
@@ -2,7 +2,6 @@
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
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/repository_mirroring.html'
---
# Repository mirroring **(FREE)**
diff --git a/doc/user/project/repository/mirror/pull.md b/doc/user/project/repository/mirror/pull.md
index 0eb51f40208..f6bd8b146c1 100644
--- a/doc/user/project/repository/mirror/pull.md
+++ b/doc/user/project/repository/mirror/pull.md
@@ -2,7 +2,6 @@
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
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/repository_mirroring.html'
---
# Pull from a remote repository **(PREMIUM)**
diff --git a/doc/user/project/repository/mirror/push.md b/doc/user/project/repository/mirror/push.md
index ea58c472f4a..4aa3708df34 100644
--- a/doc/user/project/repository/mirror/push.md
+++ b/doc/user/project/repository/mirror/push.md
@@ -2,7 +2,6 @@
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
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/repository_mirroring.html'
---
# Push mirroring **(FREE)**
diff --git a/doc/user/project/time_tracking.md b/doc/user/project/time_tracking.md
index d5f0b7e6180..bd935db6f02 100644
--- a/doc/user/project/time_tracking.md
+++ b/doc/user/project/time_tracking.md
@@ -1,6 +1,5 @@
---
type: reference
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/time_tracking.html'
stage: Plan
group: Project Management
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
diff --git a/doc/user/shortcuts.md b/doc/user/shortcuts.md
index 9c2925ec647..692e0482bd3 100644
--- a/doc/user/shortcuts.md
+++ b/doc/user/shortcuts.md
@@ -3,7 +3,6 @@ stage: Create
group: Editor
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
type: reference
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/shortcuts.html'
---
# GitLab keyboard shortcuts **(FREE)**
diff --git a/doc/user/todos.md b/doc/user/todos.md
index 4951ba024af..04de4429153 100644
--- a/doc/user/todos.md
+++ b/doc/user/todos.md
@@ -1,5 +1,4 @@
---
-disqus_identifier: 'https://docs.gitlab.com/ee/workflow/todos.html'
stage: Plan
group: Project Management
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
diff --git a/lib/gitlab/analytics/cycle_analytics/request_params.rb b/lib/gitlab/analytics/cycle_analytics/request_params.rb
index 3e70d64fea6..28ec8474156 100644
--- a/lib/gitlab/analytics/cycle_analytics/request_params.rb
+++ b/lib/gitlab/analytics/cycle_analytics/request_params.rb
@@ -93,6 +93,8 @@ module Gitlab
attrs[:stage] = stage_data_attributes.to_json if stage_id.present?
attrs[:namespace] = namespace_attributes
attrs[:enable_tasks_by_type_chart] = 'false'
+ attrs[:enable_customizable_stages] = 'false'
+ attrs[:enable_projects_filter] = 'false'
attrs[:default_stages] = Gitlab::Analytics::CycleAnalytics::DefaultStages.all.map do |stage_params|
::Analytics::CycleAnalytics::StagePresenter.new(stage_params)
end.to_json
diff --git a/lib/tasks/gitlab/packages/events.rake b/lib/tasks/gitlab/packages/events.rake
index 9a9eeb6977d..1234ba039a3 100644
--- a/lib/tasks/gitlab/packages/events.rake
+++ b/lib/tasks/gitlab/packages/events.rake
@@ -38,12 +38,12 @@ namespace :gitlab do
private
def event_pairs
- Packages::Event.event_types.keys.product(Packages::Event::EVENT_SCOPES.keys)
+ Packages::Event::EVENT_TYPES.product(Packages::Event::EVENT_SCOPES.keys)
end
def generate_unique_events_list
events = event_pairs.each_with_object([]) do |(event_type, event_scope), events|
- Packages::Event.originator_types.keys.excluding('guest').each do |originator_type|
+ Packages::Event::ORIGINATOR_TYPES.excluding(:guest).each do |originator_type|
events_definition = Packages::Event.unique_counters_for(event_scope, event_type, originator_type).map do |event_name|
{
"name" => event_name,
@@ -60,7 +60,7 @@ namespace :gitlab do
def counter_events_list
counters = event_pairs.flat_map do |event_type, event_scope|
- Packages::Event.originator_types.keys.flat_map do |originator_type|
+ Packages::Event::ORIGINATOR_TYPES.flat_map do |originator_type|
Packages::Event.counters_for(event_scope, event_type, originator_type)
end
end
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 27c71915f97..e58bf15ecab 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -8984,6 +8984,12 @@ msgstr ""
msgid "Ci config already present"
msgstr ""
+msgid "CiCatalog|CI/CD catalog"
+msgstr ""
+
+msgid "CiCatalog|Repositories of reusable pipeline components available in this namespace."
+msgstr ""
+
msgid "CiCdAnalytics|Date range: %{range}"
msgstr ""
diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb
index 36206a88786..565bb79e337 100644
--- a/spec/controllers/projects/commit_controller_spec.rb
+++ b/spec/controllers/projects/commit_controller_spec.rb
@@ -459,6 +459,37 @@ RSpec.describe Projects::CommitController, feature_category: :source_code_manage
end
end
+ describe 'GET #diff_files' do
+ subject(:send_request) { get :diff_files, params: params }
+
+ let(:format) { :html }
+ let(:params) do
+ {
+ namespace_id: project.namespace,
+ project_id: project,
+ id: commit.id,
+ format: format
+ }
+ end
+
+ it 'renders diff files' do
+ send_request
+
+ expect(assigns(:diffs)).to be_a(Gitlab::Diff::FileCollection::Commit)
+ expect(assigns(:environment)).to be_nil
+ end
+
+ context 'when format is not html' do
+ let(:format) { :json }
+
+ it 'returns 404 page' do
+ send_request
+
+ expect(response).to have_gitlab_http_status(:not_found)
+ end
+ end
+ end
+
describe 'GET diff_for_path' do
def diff_for_path(extra_params = {})
params = {
diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb
index e22ff585b67..750bdf1e469 100644
--- a/spec/features/profiles/user_edit_profile_spec.rb
+++ b/spec/features/profiles/user_edit_profile_spec.rb
@@ -97,8 +97,8 @@ RSpec.describe 'User edit profile', feature_category: :user_profile do
expect(page).to have_content('Website url is not a valid URL')
end
- it 'validates that the dicord id has a valid length', :js do
- valid_dicord_id = '123456789123456789'
+ it 'validates that the discord id has a valid length', :js do
+ valid_discord_id = '123456789123456789'
too_short_discord_id = '123456'
too_long_discord_id = '123456789abcdefghijkl'
@@ -108,12 +108,12 @@ RSpec.describe 'User edit profile', feature_category: :user_profile do
fill_in 'user_discord', with: too_long_discord_id
expect(page).to have_content('Discord ID is too long')
- fill_in 'user_discord', with: valid_dicord_id
+ fill_in 'user_discord', with: valid_discord_id
submit_settings
expect(user.reload).to have_attributes(
- discord: valid_dicord_id
+ discord: valid_discord_id
)
end
diff --git a/spec/frontend/analytics/cycle_analytics/utils_spec.js b/spec/frontend/analytics/cycle_analytics/utils_spec.js
index e6d17edcadc..cbb4c0e0078 100644
--- a/spec/frontend/analytics/cycle_analytics/utils_spec.js
+++ b/spec/frontend/analytics/cycle_analytics/utils_spec.js
@@ -158,10 +158,13 @@ describe('Value stream analytics utils', () => {
describe('with features set', () => {
const fakeFeatures = { cycleAnalyticsForGroups: true };
+ beforeEach(() => {
+ window.gon = { licensed_features: fakeFeatures };
+ });
+
it('sets the feature flags', () => {
res = buildCycleAnalyticsInitialData({
...rawData,
- gon: { licensed_features: fakeFeatures },
});
expect(res.features).toMatchObject(fakeFeatures);
});
diff --git a/spec/frontend/authentication/two_factor_auth/components/manage_two_factor_form_spec.js b/spec/frontend/authentication/two_factor_auth/components/manage_two_factor_form_spec.js
index 66f1ca2b32a..8ecef710e03 100644
--- a/spec/frontend/authentication/two_factor_auth/components/manage_two_factor_form_spec.js
+++ b/spec/frontend/authentication/two_factor_auth/components/manage_two_factor_form_spec.js
@@ -40,16 +40,6 @@ describe('ManageTwoFactorForm', () => {
const findRegenerateCodesButton = () => wrapper.findByTestId('test-2fa-regenerate-codes-button');
const findConfirmationModal = () => wrapper.findComponent(GlModal);
- const itShowsConfirmationModal = (confirmText) => {
- it('shows confirmation modal', async () => {
- await wrapper.findByLabelText('Current password').setValue('foo bar');
- await findDisableButton().trigger('click');
-
- expect(findConfirmationModal().props('visible')).toBe(true);
- expect(findConfirmationModal().html()).toContain(confirmText);
- });
- };
-
const itShowsValidationMessageIfCurrentPasswordFieldIsEmpty = (findButtonFunction) => {
it('shows validation message if `Current password` is empty', async () => {
await findButtonFunction().trigger('click');
@@ -90,7 +80,13 @@ describe('ManageTwoFactorForm', () => {
describe('when clicked', () => {
itShowsValidationMessageIfCurrentPasswordFieldIsEmpty(findDisableButton);
- itShowsConfirmationModal(i18n.confirmWebAuthn);
+ it('shows confirmation modal', async () => {
+ await wrapper.findByLabelText('Current password').setValue('foo bar');
+ await findDisableButton().trigger('click');
+
+ expect(findConfirmationModal().props('visible')).toBe(true);
+ expect(findConfirmationModal().html()).toContain(i18n.confirmWebAuthn);
+ });
it('modifies the form action and method when submitted through the button', async () => {
const form = findForm();
diff --git a/spec/frontend/ci/runner/admin_new_runner_app/admin_new_runner_app_spec.js b/spec/frontend/ci/runner/admin_new_runner_app/admin_new_runner_app_spec.js
index 85b1d3b1b2f..55862105df2 100644
--- a/spec/frontend/ci/runner/admin_new_runner_app/admin_new_runner_app_spec.js
+++ b/spec/frontend/ci/runner/admin_new_runner_app/admin_new_runner_app_spec.js
@@ -14,9 +14,7 @@ import RunnerPlatformsRadioGroup from '~/ci/runner/components/runner_platforms_r
import { PARAM_KEY_PLATFORM, DEFAULT_PLATFORM, WINDOWS_PLATFORM } from '~/ci/runner/constants';
import RunnerCreateForm from '~/ci/runner/components/runner_create_form.vue';
import { redirectTo } from '~/lib/utils/url_utility';
-import { runnerCreateResult } from '../mock_data';
-
-const mockLegacyRegistrationToken = 'LEGACY_REGISTRATION_TOKEN';
+import { runnerCreateResult, mockRegistrationToken } from '../mock_data';
Vue.use(VueApollo);
@@ -40,7 +38,7 @@ describe('AdminNewRunnerApp', () => {
const createComponent = () => {
wrapper = shallowMountExtended(AdminNewRunnerApp, {
propsData: {
- legacyRegistrationToken: mockLegacyRegistrationToken,
+ legacyRegistrationToken: mockRegistrationToken,
},
directives: {
GlModal: createMockDirective('gl-modal'),
@@ -58,7 +56,7 @@ describe('AdminNewRunnerApp', () => {
describe('Shows legacy modal', () => {
it('passes legacy registration to modal', () => {
expect(findRunnerInstructionsModal().props('registrationToken')).toEqual(
- mockLegacyRegistrationToken,
+ mockRegistrationToken,
);
});
diff --git a/spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js b/spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js
index ac2fd790277..2cd1bc0b2f8 100644
--- a/spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js
+++ b/spec/frontend/ci/runner/admin_runners/admin_runners_app_spec.js
@@ -57,13 +57,13 @@ import {
allRunnersDataPaginated,
onlineContactTimeoutSecs,
staleTimeoutSecs,
+ mockRegistrationToken,
newRunnerPath,
emptyPageInfo,
emptyStateSvgPath,
emptyStateFilteredSvgPath,
} from '../mock_data';
-const mockRegistrationToken = 'MOCK_REGISTRATION_TOKEN';
const mockRunners = allRunnersData.data.runners.nodes;
const mockRunnersCount = runnersCountData.data.runners.count;
@@ -208,13 +208,13 @@ describe('AdminRunnersApp', () => {
it('runner item links to the runner admin page', async () => {
await createComponent({ mountFn: mountExtended });
- const { id, shortSha } = mockRunners[0];
+ const { id, shortSha, adminUrl } = mockRunners[0];
const numericId = getIdFromGraphQLId(id);
const runnerLink = wrapper.find('tr [data-testid="td-summary"]').findComponent(GlLink);
expect(runnerLink.text()).toBe(`#${numericId} (${shortSha})`);
- expect(runnerLink.attributes('href')).toBe(`http://localhost/admin/runners/${numericId}`);
+ expect(runnerLink.attributes('href')).toBe(adminUrl);
});
it('renders runner actions for each runner', async () => {
@@ -264,7 +264,7 @@ describe('AdminRunnersApp', () => {
});
describe('Single runner row', () => {
- const { id: graphqlId, shortSha } = mockRunners[0];
+ const { id: graphqlId, shortSha, adminUrl } = mockRunners[0];
const id = getIdFromGraphQLId(graphqlId);
beforeEach(async () => {
@@ -277,7 +277,7 @@ describe('AdminRunnersApp', () => {
const runnerLink = wrapper.find('tr [data-testid="td-summary"]').findComponent(GlLink);
expect(runnerLink.text()).toBe(`#${id} (${shortSha})`);
- expect(runnerLink.attributes('href')).toBe(`http://localhost/admin/runners/${id}`);
+ expect(runnerLink.attributes('href')).toBe(adminUrl);
});
it('Shows job status and links to jobs', () => {
@@ -286,10 +286,7 @@ describe('AdminRunnersApp', () => {
.findComponent(RunnerJobStatusBadge);
expect(badge.props('jobStatus')).toBe(mockRunners[0].jobExecutionStatus);
-
- const badgeHref = new URL(badge.attributes('href'));
- expect(badgeHref.pathname).toBe(`/admin/runners/${id}`);
- expect(badgeHref.hash).toBe(`#${JOBS_ROUTE_PATH}`);
+ expect(badge.attributes('href')).toBe(`${adminUrl}#${JOBS_ROUTE_PATH}`);
});
it('When runner is paused or unpaused, some data is refetched', () => {
@@ -324,7 +321,7 @@ describe('AdminRunnersApp', () => {
{ type: PARAM_KEY_STATUS, value: { data: STATUS_ONLINE, operator: '=' } },
{ type: PARAM_KEY_PAUSED, value: { data: 'true', operator: '=' } },
],
- sort: 'CREATED_DESC',
+ sort: DEFAULT_SORT,
pagination: {},
});
});
diff --git a/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js b/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js
index ec23d8415e8..c435dd57de2 100644
--- a/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js
+++ b/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js
@@ -1,4 +1,4 @@
-import { mount } from '@vue/test-utils';
+import { shallowMount } from '@vue/test-utils';
import RunnerStatusCell from '~/ci/runner/components/cells/runner_status_cell.vue';
import RunnerStatusBadge from '~/ci/runner/components/runner_status_badge.vue';
@@ -20,7 +20,7 @@ describe('RunnerStatusCell', () => {
const findPausedBadge = () => wrapper.findComponent(RunnerPausedBadge);
const createComponent = ({ runner = {}, ...options } = {}) => {
- wrapper = mount(RunnerStatusCell, {
+ wrapper = shallowMount(RunnerStatusCell, {
propsData: {
runner: {
runnerType: INSTANCE_TYPE,
@@ -30,6 +30,10 @@ describe('RunnerStatusCell', () => {
...runner,
},
},
+ stubs: {
+ RunnerStatusBadge,
+ RunnerPausedBadge,
+ },
...options,
});
};
diff --git a/spec/frontend/ci/runner/components/registration/__snapshots__/utils_spec.js.snap b/spec/frontend/ci/runner/components/registration/__snapshots__/utils_spec.js.snap
index 09d032fd32d..2670e585b7d 100644
--- a/spec/frontend/ci/runner/components/registration/__snapshots__/utils_spec.js.snap
+++ b/spec/frontend/ci/runner/components/registration/__snapshots__/utils_spec.js.snap
@@ -75,8 +75,8 @@ exports[`registration utils for "linux" platform registerCommand is correct 1`]
Array [
"gitlab-runner register",
" --url http://test.host",
- " --registration-token REGISTRATION_TOKEN",
- " --description 'RUNNER'",
+ " --registration-token MOCK_REGISTRATION_TOKEN",
+ " --description 'my runner'",
]
`;
@@ -130,8 +130,8 @@ exports[`registration utils for "osx" platform registerCommand is correct 1`] =
Array [
"gitlab-runner register",
" --url http://test.host",
- " --registration-token REGISTRATION_TOKEN",
- " --description 'RUNNER'",
+ " --registration-token MOCK_REGISTRATION_TOKEN",
+ " --description 'my runner'",
]
`;
@@ -189,8 +189,8 @@ exports[`registration utils for "windows" platform registerCommand is correct 1`
Array [
".\\\\gitlab-runner.exe register",
" --url http://test.host",
- " --registration-token REGISTRATION_TOKEN",
- " --description 'RUNNER'",
+ " --registration-token MOCK_REGISTRATION_TOKEN",
+ " --description 'my runner'",
]
`;
diff --git a/spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js b/spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js
index 9ed59b0a57d..d23723807b1 100644
--- a/spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js
+++ b/spec/frontend/ci/runner/components/registration/registration_dropdown_spec.js
@@ -1,10 +1,10 @@
import { GlModal, GlDropdown, GlDropdownItem, GlDropdownForm } from '@gitlab/ui';
-import { mount, shallowMount, createWrapper } from '@vue/test-utils';
+import { createWrapper } from '@vue/test-utils';
import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo';
import { s__ } from '~/locale';
-import { extendedWrapper } from 'helpers/vue_test_utils_helper';
+import { shallowMountExtended, mountExtended } from 'helpers/vue_test_utils_helper';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
@@ -21,9 +21,7 @@ import {
mockRunnerPlatforms,
mockInstructions,
} from 'jest/vue_shared/components/runner_instructions/mock_data';
-
-const mockToken = '0123456789';
-const maskToken = '**********';
+import { mockRegistrationToken } from '../../mock_data';
Vue.use(VueApollo);
@@ -53,17 +51,15 @@ describe('RegistrationDropdown', () => {
await waitForPromises();
};
- const createComponent = ({ props = {}, ...options } = {}, mountFn = shallowMount) => {
- wrapper = extendedWrapper(
- mountFn(RegistrationDropdown, {
- propsData: {
- registrationToken: mockToken,
- type: INSTANCE_TYPE,
- ...props,
- },
- ...options,
- }),
- );
+ const createComponent = ({ props = {}, ...options } = {}, mountFn = shallowMountExtended) => {
+ wrapper = mountFn(RegistrationDropdown, {
+ propsData: {
+ registrationToken: mockRegistrationToken,
+ type: INSTANCE_TYPE,
+ ...props,
+ },
+ ...options,
+ });
};
const createComponentWithModal = () => {
@@ -79,7 +75,7 @@ describe('RegistrationDropdown', () => {
// Use `attachTo` to find the modal
attachTo: document.body,
},
- mount,
+ mountExtended,
);
};
@@ -89,7 +85,7 @@ describe('RegistrationDropdown', () => {
${GROUP_TYPE} | ${s__('Runners|Register a group runner')}
${PROJECT_TYPE} | ${s__('Runners|Register a project runner')}
`('Dropdown text for type $type is "$text"', () => {
- createComponent({ props: { type: INSTANCE_TYPE } }, mount);
+ createComponent({ props: { type: INSTANCE_TYPE } }, mountExtended);
expect(wrapper.text()).toContain('Register an instance runner');
});
@@ -111,7 +107,7 @@ describe('RegistrationDropdown', () => {
describe('When the dropdown item is clicked', () => {
beforeEach(async () => {
- createComponentWithModal({}, mount);
+ createComponentWithModal({}, mountExtended);
await openModal();
});
@@ -142,7 +138,15 @@ describe('RegistrationDropdown', () => {
});
it('Displays masked value by default', () => {
- createComponent({}, mount);
+ const mockToken = '0123456789';
+ const maskToken = '**********';
+
+ createComponent(
+ {
+ props: { registrationToken: mockToken },
+ },
+ mountExtended,
+ );
expect(findRegistrationTokenInput().element.value).toBe(maskToken);
});
@@ -171,7 +175,7 @@ describe('RegistrationDropdown', () => {
};
it('Updates token input', async () => {
- createComponent({}, mount);
+ createComponent({}, mountExtended);
expect(findRegistrationToken().props('value')).not.toBe(newToken);
@@ -181,11 +185,11 @@ describe('RegistrationDropdown', () => {
});
it('Updates token in modal', async () => {
- createComponentWithModal({}, mount);
+ createComponentWithModal({}, mountExtended);
await openModal();
- expect(findModalContent()).toContain(mockToken);
+ expect(findModalContent()).toContain(mockRegistrationToken);
await resetToken();
diff --git a/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js b/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
index 8cc88cc7bc2..77df12c5b11 100644
--- a/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
+++ b/spec/frontend/ci/runner/components/registration/registration_instructions_spec.js
@@ -22,16 +22,15 @@ import {
RUNNER_REGISTRATION_POLLING_INTERVAL_MS,
I18N_REGISTRATION_SUCCESS,
} from '~/ci/runner/constants';
-import { runnerForRegistration } from '../../mock_data';
+import { runnerForRegistration, mockAuthenticationToken } from '../../mock_data';
Vue.use(VueApollo);
-const MOCK_TOKEN = 'MOCK_TOKEN';
const mockDescription = runnerForRegistration.data.runner.description;
const mockRunner = {
...runnerForRegistration.data.runner,
- ephemeralAuthenticationToken: MOCK_TOKEN,
+ ephemeralAuthenticationToken: mockAuthenticationToken,
};
const mockRunnerWithoutToken = {
...runnerForRegistration.data.runner,
@@ -139,13 +138,13 @@ describe('RegistrationInstructions', () => {
command: [
'gitlab-runner register',
` --url ${TEST_HOST}`,
- ` --registration-token ${MOCK_TOKEN}`,
+ ` --registration-token ${mockAuthenticationToken}`,
` --description '${mockDescription}'`,
],
prompt: '$',
});
- expect(step1.find('[data-testid="runner-token"]').text()).toBe(MOCK_TOKEN);
- expect(step1.findComponent(ClipboardButton).props('text')).toBe(MOCK_TOKEN);
+ expect(step1.findByTestId('runner-token').text()).toBe(mockAuthenticationToken);
+ expect(step1.findComponent(ClipboardButton).props('text')).toBe(mockAuthenticationToken);
});
it('renders step 1 in loading state', () => {
@@ -171,7 +170,7 @@ describe('RegistrationInstructions', () => {
` --url ${TEST_HOST}`,
` --description '${mockDescription}'`,
]);
- expect(step1.find('[data-testid="runner-token"]').exists()).toBe(false);
+ expect(step1.findByTestId('runner-token').exists()).toBe(false);
expect(step1.findComponent(ClipboardButton).exists()).toBe(false);
});
@@ -211,11 +210,11 @@ describe('RegistrationInstructions', () => {
expect(step1.findComponent(CliCommand).props('command')).toEqual([
'gitlab-runner register',
` --url ${TEST_HOST}`,
- ` --registration-token ${MOCK_TOKEN}`,
+ ` --registration-token ${mockAuthenticationToken}`,
` --description '${mockDescription}'`,
]);
- expect(step1.find('[data-testid="runner-token"]').text()).toBe(MOCK_TOKEN);
- expect(step1.findComponent(ClipboardButton).props('text')).toBe(MOCK_TOKEN);
+ expect(step1.findByTestId('runner-token').text()).toBe(mockAuthenticationToken);
+ expect(step1.findComponent(ClipboardButton).props('text')).toBe(mockAuthenticationToken);
});
it('when runner is not available (e.g. deleted), the UI does not update', async () => {
@@ -226,11 +225,11 @@ describe('RegistrationInstructions', () => {
expect(step1.findComponent(CliCommand).props('command')).toEqual([
'gitlab-runner register',
` --url ${TEST_HOST}`,
- ` --registration-token ${MOCK_TOKEN}`,
+ ` --registration-token ${mockAuthenticationToken}`,
` --description '${mockDescription}'`,
]);
- expect(step1.find('[data-testid="runner-token"]').text()).toBe(MOCK_TOKEN);
- expect(step1.findComponent(ClipboardButton).props('text')).toBe(MOCK_TOKEN);
+ expect(step1.findByTestId('runner-token').text()).toBe(mockAuthenticationToken);
+ expect(step1.findComponent(ClipboardButton).props('text')).toBe(mockAuthenticationToken);
});
});
});
diff --git a/spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js b/spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js
index ff69fd6d3d6..bfdde922e17 100644
--- a/spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js
+++ b/spec/frontend/ci/runner/components/registration/registration_token_reset_dropdown_item_spec.js
@@ -18,7 +18,7 @@ jest.mock('~/ci/runner/sentry_utils');
Vue.use(VueApollo);
Vue.use(GlToast);
-const mockNewToken = 'NEW_TOKEN';
+const mockNewRegistrationToken = 'MOCK_NEW_REGISTRATION_TOKEN';
const modalID = 'token-reset-modal';
describe('RegistrationTokenResetDropdownItem', () => {
@@ -54,7 +54,7 @@ describe('RegistrationTokenResetDropdownItem', () => {
runnersRegistrationTokenResetMutationHandler = jest.fn().mockResolvedValue({
data: {
runnersRegistrationTokenReset: {
- token: mockNewToken,
+ token: mockNewRegistrationToken,
errors: [],
},
},
@@ -109,7 +109,7 @@ describe('RegistrationTokenResetDropdownItem', () => {
it('emits result', () => {
expect(wrapper.emitted('tokenReset')).toHaveLength(1);
- expect(wrapper.emitted('tokenReset')[0]).toEqual([mockNewToken]);
+ expect(wrapper.emitted('tokenReset')[0]).toEqual([mockNewRegistrationToken]);
});
it('does not show a loading state', () => {
diff --git a/spec/frontend/ci/runner/components/registration/registration_token_spec.js b/spec/frontend/ci/runner/components/registration/registration_token_spec.js
index 4f44e6e10b2..fc659f7974f 100644
--- a/spec/frontend/ci/runner/components/registration/registration_token_spec.js
+++ b/spec/frontend/ci/runner/components/registration/registration_token_spec.js
@@ -3,9 +3,7 @@ import Vue from 'vue';
import { mountExtended, shallowMountExtended } from 'helpers/vue_test_utils_helper';
import RegistrationToken from '~/ci/runner/components/registration/registration_token.vue';
import InputCopyToggleVisibility from '~/vue_shared/components/form/input_copy_toggle_visibility.vue';
-
-const mockToken = '01234567890';
-const mockMasked = '***********';
+import { mockRegistrationToken } from '../../mock_data';
describe('RegistrationToken', () => {
let wrapper;
@@ -18,7 +16,7 @@ describe('RegistrationToken', () => {
const createComponent = ({ props = {}, mountFn = shallowMountExtended } = {}) => {
wrapper = mountFn(RegistrationToken, {
propsData: {
- value: mockToken,
+ value: mockRegistrationToken,
inputId: 'token-value',
...props,
},
@@ -30,7 +28,7 @@ describe('RegistrationToken', () => {
it('Displays value and copy button', () => {
createComponent();
- expect(findInputCopyToggleVisibility().props('value')).toBe(mockToken);
+ expect(findInputCopyToggleVisibility().props('value')).toBe(mockRegistrationToken);
expect(findInputCopyToggleVisibility().props('copyButtonTitle')).toBe(
'Copy registration token',
);
@@ -38,9 +36,17 @@ describe('RegistrationToken', () => {
// Component integration test to ensure secure masking
it('Displays masked value by default', () => {
- createComponent({ mountFn: mountExtended });
+ const mockToken = '0123456789';
+ const maskToken = '**********';
+
+ createComponent({
+ props: {
+ value: mockToken,
+ },
+ mountFn: mountExtended,
+ });
- expect(wrapper.find('input').element.value).toBe(mockMasked);
+ expect(wrapper.find('input').element.value).toBe(maskToken);
});
describe('When the copy to clipboard button is clicked', () => {
diff --git a/spec/frontend/ci/runner/components/registration/utils_spec.js b/spec/frontend/ci/runner/components/registration/utils_spec.js
index acf5993b15b..a2bf2567b4d 100644
--- a/spec/frontend/ci/runner/components/registration/utils_spec.js
+++ b/spec/frontend/ci/runner/components/registration/utils_spec.js
@@ -14,8 +14,9 @@ import {
platformArchitectures,
} from '~/ci/runner/components/registration/utils';
-const REGISTRATION_TOKEN = 'REGISTRATION_TOKEN';
-const DESCRIPTION = 'RUNNER';
+import { mockRegistrationToken } from '../../mock_data';
+
+const mockRunnerDescription = 'my runner';
describe('registration utils', () => {
beforeEach(() => {
@@ -33,8 +34,8 @@ describe('registration utils', () => {
expect(
registerCommand({
platform,
- registrationToken: REGISTRATION_TOKEN,
- description: DESCRIPTION,
+ registrationToken: mockRegistrationToken,
+ description: mockRunnerDescription,
}),
).toMatchSnapshot();
@@ -50,7 +51,7 @@ describe('registration utils', () => {
describe.each([LINUX_PLATFORM, MACOS_PLATFORM])('for "%s" platform', (platform) => {
it.each`
description | parameter
- ${'my runner'} | ${"'my runner'"}
+ ${'a runner'} | ${"'a runner'"}
${"bob's runner"} | ${"'bob'\\''s runner'"}
`('registerCommand escapes description `$description`', ({ description, parameter }) => {
expect(registerCommand({ platform, description })[2]).toBe(` --description ${parameter}`);
@@ -78,14 +79,14 @@ describe('registration utils', () => {
it('registerCommand uses the default', () => {
const expected = registerCommand({
platform: DEFAULT_PLATFORM,
- registrationToken: REGISTRATION_TOKEN,
+ registrationToken: mockRegistrationToken,
});
- expect(registerCommand({ platform: null, registrationToken: REGISTRATION_TOKEN })).toEqual(
+ expect(registerCommand({ platform: null, registrationToken: mockRegistrationToken })).toEqual(
expected,
);
expect(
- registerCommand({ platform: undefined, registrationToken: REGISTRATION_TOKEN }),
+ registerCommand({ platform: undefined, registrationToken: mockRegistrationToken }),
).toEqual(expected);
});
diff --git a/spec/frontend/ci/runner/components/runner_list_empty_state_spec.js b/spec/frontend/ci/runner/components/runner_list_empty_state_spec.js
index 3e813723b5b..e4ca84853c3 100644
--- a/spec/frontend/ci/runner/components/runner_list_empty_state_spec.js
+++ b/spec/frontend/ci/runner/components/runner_list_empty_state_spec.js
@@ -5,6 +5,7 @@ import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import RunnerInstructionsModal from '~/vue_shared/components/runner_instructions/runner_instructions_modal.vue';
import {
+ mockRegistrationToken,
newRunnerPath,
emptyStateSvgPath,
emptyStateFilteredSvgPath,
@@ -12,8 +13,6 @@ import {
import RunnerListEmptyState from '~/ci/runner/components/runner_list_empty_state.vue';
-const mockRegistrationToken = 'REGISTRATION_TOKEN';
-
describe('RunnerListEmptyState', () => {
let wrapper;
diff --git a/spec/frontend/ci/runner/components/runner_type_tabs_spec.js b/spec/frontend/ci/runner/components/runner_type_tabs_spec.js
index 6e15c84ad7e..71dcc5b4226 100644
--- a/spec/frontend/ci/runner/components/runner_type_tabs_spec.js
+++ b/spec/frontend/ci/runner/components/runner_type_tabs_spec.js
@@ -8,6 +8,7 @@ import {
PROJECT_TYPE,
DEFAULT_MEMBERSHIP,
DEFAULT_SORT,
+ STATUS_ONLINE,
} from '~/ci/runner/constants';
const mockSearch = {
@@ -111,7 +112,7 @@ describe('RunnerTypeTabs', () => {
it('Renders a count next to each tab', () => {
const mockVariables = {
paused: true,
- status: 'ONLINE',
+ status: STATUS_ONLINE,
};
createComponent({
diff --git a/spec/frontend/ci/runner/components/stat/runner_count_spec.js b/spec/frontend/ci/runner/components/stat/runner_count_spec.js
index 2b324397024..df774ba3e57 100644
--- a/spec/frontend/ci/runner/components/stat/runner_count_spec.js
+++ b/spec/frontend/ci/runner/components/stat/runner_count_spec.js
@@ -2,7 +2,7 @@ import Vue, { nextTick } from 'vue';
import VueApollo from 'vue-apollo';
import { shallowMount } from '@vue/test-utils';
import RunnerCount from '~/ci/runner/components/stat/runner_count.vue';
-import { INSTANCE_TYPE, GROUP_TYPE } from '~/ci/runner/constants';
+import { INSTANCE_TYPE, GROUP_TYPE, STATUS_ONLINE } from '~/ci/runner/constants';
import createMockApollo from 'helpers/mock_apollo_helper';
import waitForPromises from 'helpers/wait_for_promises';
import { captureException } from '~/ci/runner/sentry_utils';
@@ -47,7 +47,7 @@ describe('RunnerCount', () => {
});
describe('in admin scope', () => {
- const mockVariables = { status: 'ONLINE' };
+ const mockVariables = { status: STATUS_ONLINE };
beforeEach(async () => {
await createComponent({ props: { scope: INSTANCE_TYPE } });
diff --git a/spec/frontend/ci/runner/group_runners/group_runners_app_spec.js b/spec/frontend/ci/runner/group_runners/group_runners_app_spec.js
index 7dfe0b397e7..b3622cb80af 100644
--- a/spec/frontend/ci/runner/group_runners/group_runners_app_spec.js
+++ b/spec/frontend/ci/runner/group_runners/group_runners_app_spec.js
@@ -58,6 +58,7 @@ import {
groupRunnersCountData,
onlineContactTimeoutSecs,
staleTimeoutSecs,
+ mockRegistrationToken,
emptyPageInfo,
emptyStateSvgPath,
emptyStateFilteredSvgPath,
@@ -67,7 +68,6 @@ Vue.use(VueApollo);
Vue.use(GlToast);
const mockGroupFullPath = 'group1';
-const mockRegistrationToken = 'AABBCC';
const mockGroupRunnersEdges = groupRunnersData.data.group.runners.edges;
const mockGroupRunnersCount = mockGroupRunnersEdges.length;
diff --git a/spec/frontend/ci/runner/mock_data.js b/spec/frontend/ci/runner/mock_data.js
index 092a419c1fe..f1e200ce808 100644
--- a/spec/frontend/ci/runner/mock_data.js
+++ b/spec/frontend/ci/runner/mock_data.js
@@ -23,7 +23,15 @@ import groupRunnersData from 'test_fixtures/graphql/ci/runner/list/group_runners
import groupRunnersDataPaginated from 'test_fixtures/graphql/ci/runner/list/group_runners.query.graphql.paginated.json';
import groupRunnersCountData from 'test_fixtures/graphql/ci/runner/list/group_runners_count.query.graphql.json';
-import { DEFAULT_MEMBERSHIP, RUNNER_PAGE_SIZE } from '~/ci/runner/constants';
+import {
+ DEFAULT_MEMBERSHIP,
+ INSTANCE_TYPE,
+ CREATED_DESC,
+ CREATED_ASC,
+ STATUS_ONLINE,
+ STATUS_STALE,
+ RUNNER_PAGE_SIZE,
+} from '~/ci/runner/constants';
import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants';
const emptyPageInfo = {
@@ -46,29 +54,29 @@ export const mockSearchExamples = [
membership: DEFAULT_MEMBERSHIP,
filters: [],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
membership: DEFAULT_MEMBERSHIP,
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
first: RUNNER_PAGE_SIZE,
},
isDefault: true,
},
{
name: 'a single status',
- urlQuery: '?status[]=ACTIVE',
+ urlQuery: '?status[]=ONLINE',
search: {
runnerType: null,
membership: DEFAULT_MEMBERSHIP,
- filters: [{ type: 'status', value: { data: 'ACTIVE', operator: '=' } }],
+ filters: [{ type: 'status', value: { data: STATUS_ONLINE, operator: '=' } }],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
membership: DEFAULT_MEMBERSHIP,
- status: 'ACTIVE',
- sort: 'CREATED_DESC',
+ status: STATUS_ONLINE,
+ sort: CREATED_DESC,
first: RUNNER_PAGE_SIZE,
},
},
@@ -85,12 +93,12 @@ export const mockSearchExamples = [
},
],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
membership: DEFAULT_MEMBERSHIP,
search: 'something',
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
first: RUNNER_PAGE_SIZE,
},
},
@@ -111,12 +119,12 @@ export const mockSearchExamples = [
},
],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
membership: DEFAULT_MEMBERSHIP,
search: 'something else',
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
first: RUNNER_PAGE_SIZE,
},
},
@@ -124,54 +132,54 @@ export const mockSearchExamples = [
name: 'single instance type',
urlQuery: '?runner_type[]=INSTANCE_TYPE',
search: {
- runnerType: 'INSTANCE_TYPE',
+ runnerType: INSTANCE_TYPE,
membership: DEFAULT_MEMBERSHIP,
filters: [],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
- type: 'INSTANCE_TYPE',
+ type: INSTANCE_TYPE,
membership: DEFAULT_MEMBERSHIP,
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
first: RUNNER_PAGE_SIZE,
},
},
{
name: 'multiple runner status',
- urlQuery: '?status[]=ACTIVE&status[]=PAUSED',
+ urlQuery: '?status[]=ONLINE&status[]=STALE',
search: {
runnerType: null,
membership: DEFAULT_MEMBERSHIP,
filters: [
- { type: 'status', value: { data: 'ACTIVE', operator: '=' } },
- { type: 'status', value: { data: 'PAUSED', operator: '=' } },
+ { type: 'status', value: { data: STATUS_ONLINE, operator: '=' } },
+ { type: 'status', value: { data: STATUS_STALE, operator: '=' } },
],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
- status: 'ACTIVE',
+ status: STATUS_ONLINE,
membership: DEFAULT_MEMBERSHIP,
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
first: RUNNER_PAGE_SIZE,
},
},
{
name: 'multiple status, a single instance type and a non default sort',
- urlQuery: '?status[]=ACTIVE&runner_type[]=INSTANCE_TYPE&sort=CREATED_ASC',
+ urlQuery: '?status[]=ONLINE&runner_type[]=INSTANCE_TYPE&sort=CREATED_ASC',
search: {
- runnerType: 'INSTANCE_TYPE',
+ runnerType: INSTANCE_TYPE,
membership: DEFAULT_MEMBERSHIP,
- filters: [{ type: 'status', value: { data: 'ACTIVE', operator: '=' } }],
+ filters: [{ type: 'status', value: { data: STATUS_ONLINE, operator: '=' } }],
pagination: {},
- sort: 'CREATED_ASC',
+ sort: CREATED_ASC,
},
graphqlVariables: {
- status: 'ACTIVE',
- type: 'INSTANCE_TYPE',
+ status: STATUS_ONLINE,
+ type: INSTANCE_TYPE,
membership: DEFAULT_MEMBERSHIP,
- sort: 'CREATED_ASC',
+ sort: CREATED_ASC,
first: RUNNER_PAGE_SIZE,
},
},
@@ -183,13 +191,13 @@ export const mockSearchExamples = [
membership: DEFAULT_MEMBERSHIP,
filters: [{ type: 'tag', value: { data: 'tag-1', operator: '=' } }],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
membership: DEFAULT_MEMBERSHIP,
tagList: ['tag-1'],
- first: 20,
- sort: 'CREATED_DESC',
+ first: RUNNER_PAGE_SIZE,
+ sort: CREATED_DESC,
},
},
{
@@ -203,13 +211,13 @@ export const mockSearchExamples = [
{ type: 'tag', value: { data: 'tag-2', operator: '=' } },
],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
membership: DEFAULT_MEMBERSHIP,
tagList: ['tag-1', 'tag-2'],
- first: 20,
- sort: 'CREATED_DESC',
+ first: RUNNER_PAGE_SIZE,
+ sort: CREATED_DESC,
},
},
{
@@ -220,11 +228,11 @@ export const mockSearchExamples = [
membership: DEFAULT_MEMBERSHIP,
filters: [],
pagination: { after: 'AFTER_CURSOR' },
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
membership: DEFAULT_MEMBERSHIP,
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
after: 'AFTER_CURSOR',
first: RUNNER_PAGE_SIZE,
},
@@ -237,11 +245,11 @@ export const mockSearchExamples = [
membership: DEFAULT_MEMBERSHIP,
filters: [],
pagination: { before: 'BEFORE_CURSOR' },
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
membership: DEFAULT_MEMBERSHIP,
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
before: 'BEFORE_CURSOR',
last: RUNNER_PAGE_SIZE,
},
@@ -249,24 +257,24 @@ export const mockSearchExamples = [
{
name: 'the next page filtered by a status, an instance type, tags and a non default sort',
urlQuery:
- '?status[]=ACTIVE&runner_type[]=INSTANCE_TYPE&tag[]=tag-1&tag[]=tag-2&sort=CREATED_ASC&after=AFTER_CURSOR',
+ '?status[]=ONLINE&runner_type[]=INSTANCE_TYPE&tag[]=tag-1&tag[]=tag-2&sort=CREATED_ASC&after=AFTER_CURSOR',
search: {
- runnerType: 'INSTANCE_TYPE',
+ runnerType: INSTANCE_TYPE,
membership: DEFAULT_MEMBERSHIP,
filters: [
- { type: 'status', value: { data: 'ACTIVE', operator: '=' } },
+ { type: 'status', value: { data: STATUS_ONLINE, operator: '=' } },
{ type: 'tag', value: { data: 'tag-1', operator: '=' } },
{ type: 'tag', value: { data: 'tag-2', operator: '=' } },
],
pagination: { after: 'AFTER_CURSOR' },
- sort: 'CREATED_ASC',
+ sort: CREATED_ASC,
},
graphqlVariables: {
- status: 'ACTIVE',
- type: 'INSTANCE_TYPE',
+ status: STATUS_ONLINE,
+ type: INSTANCE_TYPE,
membership: DEFAULT_MEMBERSHIP,
tagList: ['tag-1', 'tag-2'],
- sort: 'CREATED_ASC',
+ sort: CREATED_ASC,
after: 'AFTER_CURSOR',
first: RUNNER_PAGE_SIZE,
},
@@ -279,12 +287,12 @@ export const mockSearchExamples = [
membership: DEFAULT_MEMBERSHIP,
filters: [{ type: 'paused', value: { data: 'true', operator: '=' } }],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
paused: true,
membership: DEFAULT_MEMBERSHIP,
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
first: RUNNER_PAGE_SIZE,
},
},
@@ -296,12 +304,12 @@ export const mockSearchExamples = [
membership: DEFAULT_MEMBERSHIP,
filters: [{ type: 'paused', value: { data: 'false', operator: '=' } }],
pagination: {},
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
},
graphqlVariables: {
paused: false,
membership: DEFAULT_MEMBERSHIP,
- sort: 'CREATED_DESC',
+ sort: CREATED_DESC,
first: RUNNER_PAGE_SIZE,
},
},
@@ -310,6 +318,9 @@ export const mockSearchExamples = [
export const onlineContactTimeoutSecs = 2 * 60 * 60;
export const staleTimeoutSecs = 7889238; // Ruby's `3.months`
+export const mockRegistrationToken = 'MOCK_REGISTRATION_TOKEN';
+export const mockAuthenticationToken = 'MOCK_AUTHENTICATION_TOKEN';
+
export const newRunnerPath = '/runners/new';
export const emptyStateSvgPath = 'emptyStateSvgPath.svg';
export const emptyStateFilteredSvgPath = 'emptyStateFilteredSvgPath.svg';
diff --git a/spec/frontend/ci/runner/runner_search_utils_spec.js b/spec/frontend/ci/runner/runner_search_utils_spec.js
index f64b89d47fd..9a4a6139198 100644
--- a/spec/frontend/ci/runner/runner_search_utils_spec.js
+++ b/spec/frontend/ci/runner/runner_search_utils_spec.js
@@ -7,6 +7,7 @@ import {
isSearchFiltered,
} from 'ee_else_ce/ci/runner/runner_search_utils';
import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants';
+import { DEFAULT_SORT } from '~/ci/runner/constants';
import { mockSearchExamples } from './mock_data';
describe('search_params.js', () => {
@@ -68,7 +69,7 @@ describe('search_params.js', () => {
'http://test.host/?paused[]=true',
'http://test.host/?search=my_text',
])('When a filter is removed, it is removed from the URL', (initialUrl) => {
- const search = { filters: [], sort: 'CREATED_DESC' };
+ const search = { filters: [], sort: DEFAULT_SORT };
const expectedUrl = `http://test.host/`;
expect(fromSearchToUrl(search, initialUrl)).toBe(expectedUrl);
@@ -76,7 +77,7 @@ describe('search_params.js', () => {
it('When unrelated search parameter is present, it does not get removed', () => {
const initialUrl = `http://test.host/?unrelated=UNRELATED&status[]=ACTIVE`;
- const search = { filters: [], sort: 'CREATED_DESC' };
+ const search = { filters: [], sort: DEFAULT_SORT };
const expectedUrl = `http://test.host/?unrelated=UNRELATED`;
expect(fromSearchToUrl(search, initialUrl)).toBe(expectedUrl);
diff --git a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js
index ca75ca11e5b..85acd5f9a9e 100644
--- a/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js
+++ b/spec/frontend/vue_merge_request_widget/components/states/mr_widget_merging_spec.js
@@ -10,6 +10,8 @@ jest.mock('~/lib/utils/simple_poll', () =>
describe('MRWidgetMerging', () => {
let wrapper;
+ const pollMock = jest.fn().mockResolvedValue();
+
const GlEmoji = { template: '<img />' };
beforeEach(() => {
wrapper = shallowMount(MrWidgetMerging, {
@@ -20,7 +22,7 @@ describe('MRWidgetMerging', () => {
transitionStateMachine() {},
},
service: {
- poll: jest.fn().mockResolvedValue(),
+ poll: pollMock,
},
},
stubs: {
@@ -36,17 +38,11 @@ describe('MRWidgetMerging', () => {
describe('initiateMergePolling', () => {
it('should call simplePoll', () => {
- wrapper.vm.initiateMergePolling();
-
expect(simplePoll).toHaveBeenCalledWith(expect.any(Function), { timeout: 0 });
});
it('should call handleMergePolling', () => {
- jest.spyOn(wrapper.vm, 'handleMergePolling').mockImplementation(() => {});
-
- wrapper.vm.initiateMergePolling();
-
- expect(wrapper.vm.handleMergePolling).toHaveBeenCalled();
+ expect(pollMock).toHaveBeenCalled();
});
});
});
diff --git a/spec/graphql/mutations/container_repositories/destroy_spec.rb b/spec/graphql/mutations/container_repositories/destroy_spec.rb
index 50e83ccdd30..85e0ac96e55 100644
--- a/spec/graphql/mutations/container_repositories/destroy_spec.rb
+++ b/spec/graphql/mutations/container_repositories/destroy_spec.rb
@@ -25,7 +25,7 @@ RSpec.describe Mutations::ContainerRepositories::Destroy do
.to receive(:new).with(nil, user, event_name: :delete_repository, scope: :container).and_call_original
expect(DeleteContainerRepositoryWorker).not_to receive(:perform_async)
- expect { subject }.to change { ::Packages::Event.count }.by(1)
+ subject
expect(container_repository.reload.delete_scheduled?).to be true
end
end
diff --git a/spec/graphql/mutations/container_repositories/destroy_tags_spec.rb b/spec/graphql/mutations/container_repositories/destroy_tags_spec.rb
index 3e5f28ee244..96dd1754155 100644
--- a/spec/graphql/mutations/container_repositories/destroy_tags_spec.rb
+++ b/spec/graphql/mutations/container_repositories/destroy_tags_spec.rb
@@ -39,7 +39,7 @@ RSpec.describe Mutations::ContainerRepositories::DestroyTags do
it 'creates a package event' do
expect(::Packages::CreateEventService)
.to receive(:new).with(nil, user, event_name: :delete_tag_bulk, scope: :tag).and_call_original
- expect { subject }.to change { ::Packages::Event.count }.by(1)
+ subject
end
end
@@ -87,7 +87,7 @@ RSpec.describe Mutations::ContainerRepositories::DestroyTags do
it 'does not create a package event' do
expect(::Packages::CreateEventService).not_to receive(:new)
- expect { subject }.not_to change { ::Packages::Event.count }
+ subject
end
end
end
diff --git a/spec/helpers/ci/catalog/resources_helper_spec.rb b/spec/helpers/ci/catalog/resources_helper_spec.rb
index c4abdebd12e..8f227862d57 100644
--- a/spec/helpers/ci/catalog/resources_helper_spec.rb
+++ b/spec/helpers/ci/catalog/resources_helper_spec.rb
@@ -24,7 +24,7 @@ RSpec.describe Ci::Catalog::ResourcesHelper, feature_category: :pipeline_composi
{}
end
- subject(:catalog_data) { helper.js_ci_catalog_data }
+ subject(:catalog_data) { helper.js_ci_catalog_data(project) }
it 'returns catalog data' do
expect(catalog_data).to eq(default_helper_data)
diff --git a/spec/migrations/ensure_vum_bigint_backfill_is_finished_for_gl_dot_com_spec.rb b/spec/migrations/ensure_vum_bigint_backfill_is_finished_for_gl_dot_com_spec.rb
new file mode 100644
index 00000000000..d582a8a9460
--- /dev/null
+++ b/spec/migrations/ensure_vum_bigint_backfill_is_finished_for_gl_dot_com_spec.rb
@@ -0,0 +1,35 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require_migration!
+
+RSpec.describe EnsureVumBigintBackfillIsFinishedForGlDotCom, feature_category: :database do
+ describe '#up' do
+ let(:migration_arguments) do
+ {
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'vulnerability_user_mentions',
+ column_name: 'id',
+ job_arguments: [['note_id'], ['note_id_convert_to_bigint']]
+ }
+ end
+
+ it 'ensures the migration is completed for GitLab.com, dev, or test' do
+ expect_next_instance_of(described_class) do |instance|
+ expect(instance).to receive(:com_or_dev_or_test_but_not_jh?).and_return(true)
+ expect(instance).to receive(:ensure_batched_background_migration_is_finished).with(migration_arguments)
+ end
+
+ migrate!
+ end
+
+ it 'skips the check for other instances' do
+ expect_next_instance_of(described_class) do |instance|
+ expect(instance).to receive(:com_or_dev_or_test_but_not_jh?).and_return(false)
+ expect(instance).not_to receive(:ensure_batched_background_migration_is_finished)
+ end
+
+ migrate!
+ end
+ end
+end
diff --git a/spec/migrations/swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com_spec.rb b/spec/migrations/swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com_spec.rb
new file mode 100644
index 00000000000..1e358387536
--- /dev/null
+++ b/spec/migrations/swap_vulnerability_user_mentions_note_id_to_bigint_for_gitlab_dot_com_spec.rb
@@ -0,0 +1,66 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require_migration!
+
+RSpec.describe SwapVulnerabilityUserMentionsNoteIdToBigintForGitlabDotCom, feature_category: :database do
+ describe '#up' do
+ before do
+ # A we call `schema_migrate_down!` before each example, and for this migration
+ # `#down` is same as `#up`, we need to ensure we start from the expected state.
+ connection = described_class.new.connection
+ connection.execute('ALTER TABLE vulnerability_user_mentions ALTER COLUMN note_id TYPE integer')
+ connection.execute('ALTER TABLE vulnerability_user_mentions ALTER COLUMN note_id_convert_to_bigint TYPE bigint')
+ end
+
+ # rubocop: disable RSpec/AnyInstanceOf
+ it 'swaps the integer and bigint columns for GitLab.com, dev, or test' do
+ allow_any_instance_of(described_class).to receive(:com_or_dev_or_test_but_not_jh?).and_return(true)
+
+ user_mentions = table(:vulnerability_user_mentions)
+
+ disable_migrations_output do
+ reversible_migration do |migration|
+ migration.before -> {
+ user_mentions.reset_column_information
+
+ expect(user_mentions.columns.find { |c| c.name == 'note_id' }.sql_type).to eq('integer')
+ expect(user_mentions.columns.find { |c| c.name == 'note_id_convert_to_bigint' }.sql_type).to eq('bigint')
+ }
+
+ migration.after -> {
+ user_mentions.reset_column_information
+
+ expect(user_mentions.columns.find { |c| c.name == 'note_id' }.sql_type).to eq('bigint')
+ expect(user_mentions.columns.find { |c| c.name == 'note_id_convert_to_bigint' }.sql_type).to eq('integer')
+ }
+ end
+ end
+ end
+
+ it 'is a no-op for other instances' do
+ allow_any_instance_of(described_class).to receive(:com_or_dev_or_test_but_not_jh?).and_return(false)
+
+ user_mentions = table(:vulnerability_user_mentions)
+
+ disable_migrations_output do
+ reversible_migration do |migration|
+ migration.before -> {
+ user_mentions.reset_column_information
+
+ expect(user_mentions.columns.find { |c| c.name == 'note_id' }.sql_type).to eq('integer')
+ expect(user_mentions.columns.find { |c| c.name == 'note_id_convert_to_bigint' }.sql_type).to eq('bigint')
+ }
+
+ migration.after -> {
+ user_mentions.reset_column_information
+
+ expect(user_mentions.columns.find { |c| c.name == 'note_id' }.sql_type).to eq('integer')
+ expect(user_mentions.columns.find { |c| c.name == 'note_id_convert_to_bigint' }.sql_type).to eq('bigint')
+ }
+ end
+ end
+ end
+ # rubocop: enable RSpec/AnyInstanceOf
+ end
+end
diff --git a/spec/models/packages/event_spec.rb b/spec/models/packages/event_spec.rb
new file mode 100644
index 00000000000..58c1c1e6e92
--- /dev/null
+++ b/spec/models/packages/event_spec.rb
@@ -0,0 +1,51 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Packages::Event, feature_category: :package_registry do
+ let(:event_type) { :push_package }
+ let(:event_scope) { :npm }
+ let(:originator_type) { :deploy_token }
+
+ shared_examples 'handle forbidden event type' do |result: []|
+ let(:event_type) { :search }
+
+ it { is_expected.to eq(result) }
+ end
+
+ describe '.event_allowed?' do
+ subject { described_class.event_allowed?(event_type) }
+
+ it { is_expected.to eq(true) }
+
+ it_behaves_like 'handle forbidden event type', result: false
+ end
+
+ describe '.unique_counters_for' do
+ subject { described_class.unique_counters_for(event_scope, event_type, originator_type) }
+
+ it { is_expected.to contain_exactly('i_package_npm_deploy_token') }
+
+ it_behaves_like 'handle forbidden event type'
+
+ context 'when an originator type is quest' do
+ let(:originator_type) { :guest }
+
+ it { is_expected.to eq([]) }
+ end
+ end
+
+ describe '.counters_for' do
+ subject { described_class.counters_for(event_scope, event_type, originator_type) }
+
+ it do
+ is_expected.to contain_exactly(
+ 'i_package_push_package',
+ 'i_package_push_package_by_deploy_token',
+ 'i_package_npm_push_package'
+ )
+ end
+
+ it_behaves_like 'handle forbidden event type'
+ end
+end
diff --git a/spec/requests/api/graphql/mutations/container_repository/destroy_spec.rb b/spec/requests/api/graphql/mutations/container_repository/destroy_spec.rb
index 8b76c19cda6..ef159e41d3d 100644
--- a/spec/requests/api/graphql/mutations/container_repository/destroy_spec.rb
+++ b/spec/requests/api/graphql/mutations/container_repository/destroy_spec.rb
@@ -39,7 +39,7 @@ RSpec.describe 'Destroying a container repository', feature_category: :container
expect(DeleteContainerRepositoryWorker)
.not_to receive(:perform_async)
- expect { subject }.to change { ::Packages::Event.count }.by(1)
+ subject
expect(container_repository_mutation_response).to match_schema('graphql/container_repository')
expect(container_repository_mutation_response['status']).to eq('DELETE_SCHEDULED')
@@ -53,7 +53,7 @@ RSpec.describe 'Destroying a container repository', feature_category: :container
expect(DeleteContainerRepositoryWorker)
.not_to receive(:perform_async).with(user.id, container_repository.id)
- expect { subject }.not_to change { ::Packages::Event.count }
+ subject
expect(mutation_response).to be_nil
end
diff --git a/spec/requests/api/graphql/mutations/container_repository/destroy_tags_spec.rb b/spec/requests/api/graphql/mutations/container_repository/destroy_tags_spec.rb
index 9e07a831076..0cb607e13ec 100644
--- a/spec/requests/api/graphql/mutations/container_repository/destroy_tags_spec.rb
+++ b/spec/requests/api/graphql/mutations/container_repository/destroy_tags_spec.rb
@@ -36,7 +36,7 @@ RSpec.describe 'Destroying a container repository tags', feature_category: :cont
it 'destroys the container repository tags' do
expect(Projects::ContainerRepository::DeleteTagsService)
.to receive(:new).and_call_original
- expect { subject }.to change { ::Packages::Event.count }.by(1)
+ subject
expect(tag_names_response).to eq(tags)
expect(errors_response).to eq([])
@@ -50,7 +50,7 @@ RSpec.describe 'Destroying a container repository tags', feature_category: :cont
expect(Projects::ContainerRepository::DeleteTagsService)
.not_to receive(:new)
- expect { subject }.not_to change { ::Packages::Event.count }
+ subject
expect(mutation_response).to be_nil
end
@@ -89,7 +89,7 @@ RSpec.describe 'Destroying a container repository tags', feature_category: :cont
let(:tags) { Array.new(Mutations::ContainerRepositories::DestroyTags::LIMIT + 1, 'x') }
it 'returns too many tags error' do
- expect { subject }.not_to change { ::Packages::Event.count }
+ subject
explanation = graphql_errors.dig(0, 'message')
expect(explanation).to eq(Mutations::ContainerRepositories::DestroyTags::TOO_MANY_TAGS_ERROR_MESSAGE)
@@ -113,7 +113,7 @@ RSpec.describe 'Destroying a container repository tags', feature_category: :cont
it 'does not create a package event' do
expect(::Packages::CreateEventService).not_to receive(:new)
- expect { subject }.not_to change { ::Packages::Event.count }
+ subject
end
end
end
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index 664fc7dde7a..b1fafffb253 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -897,7 +897,7 @@ RSpec.describe 'project routing' do
end
describe Projects::MetricsDashboardController, 'routing' do
- it 'routes to #show with no dashboard_path and no page' do
+ it 'routes to #show with no dashboard_path' do
expect(get: "/gitlab/gitlabhq/-/metrics").to route_to(
"projects/metrics_dashboard#show",
**base_params
@@ -912,19 +912,17 @@ RSpec.describe 'project routing' do
)
end
- it 'routes to #show with only page' do
+ it 'routes to #show' do
expect(get: "/gitlab/gitlabhq/-/metrics/panel/new").to route_to(
"projects/metrics_dashboard#show",
- page: 'panel/new',
**base_params
)
end
- it 'routes to #show with dashboard_path and page' do
+ it 'routes to #show with dashboard_path' do
expect(get: "/gitlab/gitlabhq/-/metrics/config%2Fprometheus%2Fcommon_metrics.yml/panel/new").to route_to(
"projects/metrics_dashboard#show",
dashboard_path: 'config/prometheus/common_metrics.yml',
- page: 'panel/new',
**base_params
)
end
diff --git a/spec/services/packages/create_event_service_spec.rb b/spec/services/packages/create_event_service_spec.rb
index 44ad3f29c58..45c758ec866 100644
--- a/spec/services/packages/create_event_service_spec.rb
+++ b/spec/services/packages/create_event_service_spec.rb
@@ -15,47 +15,6 @@ RSpec.describe Packages::CreateEventService, feature_category: :package_registry
subject { described_class.new(nil, user, params).execute }
describe '#execute' do
- shared_examples 'db package event creation' do |originator_type, expected_scope|
- before do
- allow(::Gitlab::UsageDataCounters::HLLRedisCounter).to receive(:track_event)
- end
-
- context 'with feature flag disable' do
- before do
- stub_feature_flags(collect_package_events: false)
- end
-
- it 'does not create an event' do
- expect { subject }.not_to change { Packages::Event.count }
- end
- end
-
- context 'with feature flag enabled' do
- before do
- stub_feature_flags(collect_package_events: true)
- end
-
- it 'creates the event' do
- expect { subject }.to change { Packages::Event.count }.by(1)
-
- expect(subject.originator_type).to eq(originator_type)
- expect(subject.originator).to eq(user&.id)
- expect(subject.event_scope).to eq(expected_scope)
- expect(subject.event_type).to eq(event_name)
- end
-
- context 'on a read-only instance' do
- before do
- allow(Gitlab::Database).to receive(:read_only?).and_return(true)
- end
-
- it 'does not create an event' do
- expect { subject }.not_to change { Packages::Event.count }
- end
- end
- end
- end
-
shared_examples 'redis package unique event creation' do |originator_type, expected_scope|
it 'tracks the event' do
expect(::Gitlab::UsageDataCounters::HLLRedisCounter).to receive(:track_event).with(/package/, values: user.id)
@@ -75,7 +34,6 @@ RSpec.describe Packages::CreateEventService, feature_category: :package_registry
context 'with a user' do
let(:user) { create(:user) }
- it_behaves_like 'db package event creation', 'user', 'generic'
it_behaves_like 'redis package unique event creation', 'user', 'generic'
it_behaves_like 'redis package count event creation', 'user', 'generic'
end
@@ -83,7 +41,6 @@ RSpec.describe Packages::CreateEventService, feature_category: :package_registry
context 'with a deploy token' do
let(:user) { create(:deploy_token) }
- it_behaves_like 'db package event creation', 'deploy_token', 'generic'
it_behaves_like 'redis package unique event creation', 'deploy_token', 'generic'
it_behaves_like 'redis package count event creation', 'deploy_token', 'generic'
end
@@ -91,7 +48,6 @@ RSpec.describe Packages::CreateEventService, feature_category: :package_registry
context 'with no user' do
let(:user) { nil }
- it_behaves_like 'db package event creation', 'guest', 'generic'
it_behaves_like 'redis package count event creation', 'guest', 'generic'
end
@@ -101,14 +57,12 @@ RSpec.describe Packages::CreateEventService, feature_category: :package_registry
context 'as guest' do
let(:user) { nil }
- it_behaves_like 'db package event creation', 'guest', 'npm'
it_behaves_like 'redis package count event creation', 'guest', 'npm'
end
context 'with user' do
let(:user) { create(:user) }
- it_behaves_like 'db package event creation', 'user', 'npm'
it_behaves_like 'redis package unique event creation', 'user', 'npm'
it_behaves_like 'redis package count event creation', 'user', 'npm'
end
diff --git a/spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb b/spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb
index f1ffddf6507..ef9830fbce8 100644
--- a/spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb
+++ b/spec/support/shared_examples/analytics/cycle_analytics/request_params_examples.rb
@@ -119,9 +119,13 @@ RSpec.shared_examples 'unlicensed cycle analytics request params' do
it { is_expected.to eq(false) }
end
- describe 'enable_tasks_by_type_chart data attribute' do
- subject(:value) { described_class.new(params).to_data_attributes[:enable_tasks_by_type_chart] }
+ describe 'feature availablity data attributes' do
+ subject(:value) { described_class.new(params).to_data_attributes }
- it { is_expected.to eq('false') }
+ it 'disables all paid features' do
+ is_expected.to match(a_hash_including(enable_tasks_by_type_chart: 'false',
+ enable_customizable_stages: 'false',
+ enable_projects_filter: 'false'))
+ end
end
end
diff --git a/spec/support/shared_examples/features/wiki/user_views_wiki_sidebar_shared_examples.rb b/spec/support/shared_examples/features/wiki/user_views_wiki_sidebar_shared_examples.rb
index b3378c76658..21c7e2b6c75 100644
--- a/spec/support/shared_examples/features/wiki/user_views_wiki_sidebar_shared_examples.rb
+++ b/spec/support/shared_examples/features/wiki/user_views_wiki_sidebar_shared_examples.rb
@@ -108,6 +108,20 @@ RSpec.shared_examples 'User views wiki sidebar' do
end
end
+ it 'shows create child page button when hover to the page title in the sidebar', :js do
+ visit wiki_path(wiki)
+
+ within('.right-sidebar') do
+ first_wiki_list = first("[data-testid='wiki-list']")
+ wiki_link = first("[data-testid='wiki-list'] a:last-of-type")['href']
+
+ first_wiki_list.hover
+ wiki_new_page_link = first("[data-testid='wiki-list'] a")['href']
+
+ expect(wiki_new_page_link).to eq "#{wiki_link}/%7Bnew_page_title%7D"
+ end
+ end
+
context 'when there are more than 15 existing pages' do
before do
create(:wiki_page, wiki: wiki, title: 'my page 16')
diff --git a/spec/support/shared_examples/requests/api/packages_shared_examples.rb b/spec/support/shared_examples/requests/api/packages_shared_examples.rb
index 98264baa61d..b7f2805ed97 100644
--- a/spec/support/shared_examples/requests/api/packages_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/packages_shared_examples.rb
@@ -143,17 +143,13 @@ RSpec.shared_examples 'job token for package uploads' do |authorize_endpoint: fa
end
RSpec.shared_examples 'a package tracking event' do |category, action, service_ping_context = true|
- before do
- stub_feature_flags(collect_package_events: true)
- end
-
let(:context) do
[Gitlab::Tracking::ServicePingContext.new(data_source: :redis_hll,
event: snowplow_gitlab_standard_context[:property]).to_h]
end
it "creates a gitlab tracking event #{action}", :snowplow, :aggregate_failures do
- expect { subject }.to change { Packages::Event.count }.by(1)
+ subject
if service_ping_context
expect_snowplow_event(category: category, action: action,
@@ -166,12 +162,8 @@ RSpec.shared_examples 'a package tracking event' do |category, action, service_p
end
RSpec.shared_examples 'not a package tracking event' do
- before do
- stub_feature_flags(collect_package_events: true)
- end
-
it 'does not create a gitlab tracking event', :snowplow, :aggregate_failures do
- expect { subject }.not_to change { Packages::Event.count }
+ subject
expect_no_snowplow_event
end