summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 18:11:54 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 18:11:54 +0000
commita174146bf09aa549a4ae43f2b8a0f6aa638f499e (patch)
tree3260c27a5ac960bb08acbae9e7d8a5d784abdbe9
parent6a85a7c312b542034fa0880aa00b1308b1fd5a2e (diff)
downloadgitlab-ce-a174146bf09aa549a4ae43f2b8a0f6aa638f499e.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/ci/static-analysis.gitlab-ci.yml1
-rw-r--r--.rubocop_todo.yml4
-rw-r--r--.rubocop_todo/performance/method_object_as_block.yml100
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--app/assets/javascripts/blob/sketch/index.js2
-rw-r--r--app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue40
-rw-r--r--app/assets/javascripts/pipeline_editor/components/file_tree/container.vue41
-rw-r--r--app/assets/javascripts/pipeline_editor/components/file_tree/file_item.vue24
-rw-r--r--app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue1
-rw-r--r--app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue54
-rw-r--r--app/assets/javascripts/repository/components/breadcrumbs.vue5
-rw-r--r--app/assets/javascripts/sidebar/components/attention_requested_toggle.vue11
-rw-r--r--app/assets/stylesheets/page_bundles/pipeline_editor.scss9
-rw-r--r--app/controllers/projects/ci/pipeline_editor_controller.rb1
-rw-r--r--app/views/projects/ci/pipeline_editor/show.html.haml1
-rw-r--r--config/application.rb14
-rw-r--r--config/feature_flags/development/pipeline_editor_file_tree.yml8
-rw-r--r--config/initializers/00_connection_logger.rb26
-rw-r--r--data/deprecations/14-9-deprecation-htpassword-authentication-container-registry.yml (renamed from data/deprecations/templates/14-9-deprecation-htpassword-authentication-container-registry.yml)0
-rw-r--r--data/removals/15_0/15-0-container-registry-htpasswd.yml11
-rw-r--r--doc/administration/instance_limits.md2
-rw-r--r--doc/administration/logs.md2
-rw-r--r--doc/ci/enable_or_disable_ci.md2
-rw-r--r--doc/development/documentation/styleguide/index.md107
-rw-r--r--doc/development/integrations/index.md2
-rw-r--r--doc/development/rails_initializers.md18
-rw-r--r--doc/development/testing_guide/end_to_end/rspec_metadata_tests.md2
-rw-r--r--doc/integration/index.md2
-rw-r--r--doc/integration/jenkins.md4
-rw-r--r--doc/update/removals.md14
-rw-r--r--doc/user/profile/notifications.md2
-rw-r--r--doc/user/project/integrations/bamboo.md4
-rw-r--r--doc/user/project/integrations/bugzilla.md2
-rw-r--r--doc/user/project/integrations/index.md120
-rw-r--r--doc/user/project/integrations/overview.md120
-rw-r--r--doc/user/project/integrations/webhooks.md4
-rw-r--r--doc/user/project/merge_requests/merge_when_pipeline_succeeds.md2
-rw-r--r--doc/user/project/repository/web_editor.md2
-rw-r--r--locale/gitlab.pot257
-rw-r--r--package.json2
-rw-r--r--spec/frontend/blob/sketch/index_spec.js43
-rw-r--r--spec/frontend/members/components/table/role_dropdown_spec.js27
-rw-r--r--spec/frontend/pdf/index_spec.js18
-rw-r--r--spec/frontend/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js94
-rw-r--r--spec/frontend/pipeline_editor/components/file-tree/constants.js1
-rw-r--r--spec/frontend/pipeline_editor/components/file-tree/container_spec.js56
-rw-r--r--spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js37
-rw-r--r--spec/frontend/pipeline_editor/pipeline_editor_home_spec.js53
-rw-r--r--spec/frontend/repository/components/breadcrumbs_spec.js3
-rw-r--r--spec/frontend/sidebar/components/attention_requested_toggle_spec.js6
-rw-r--r--spec/frontend_integration/fly_out_nav_browser_spec.js21
-rw-r--r--spec/initializers/00_connection_logger_spec.rb39
-rw-r--r--yarn.lock8
53 files changed, 983 insertions, 448 deletions
diff --git a/.gitlab/ci/static-analysis.gitlab-ci.yml b/.gitlab/ci/static-analysis.gitlab-ci.yml
index f5f0dcfe7f8..4fe521910cb 100644
--- a/.gitlab/ci/static-analysis.gitlab-ci.yml
+++ b/.gitlab/ci/static-analysis.gitlab-ci.yml
@@ -7,6 +7,7 @@
variables:
SETUP_DB: "false"
ENABLE_SPRING: "1"
+ SKIP_LOG_INITIALIZER_CONNECTIONS: "1"
# Disable warnings in browserslist which can break on backports
# https://github.com/browserslist/browserslist/blob/a287ec6/node.js#L367-L384
BROWSERSLIST_IGNORE_OLD_DATA: "true"
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 78e462cdc7a..fef456d3d19 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -79,10 +79,6 @@ Performance/CollectionLiteralInLoop:
Performance/ConstantRegexp:
Enabled: false
-# Offense count: 121
-Performance/MethodObjectAsBlock:
- Enabled: false
-
# Offense count: 15209
# Configuration parameters: Prefixes.
# Prefixes: when, with, without
diff --git a/.rubocop_todo/performance/method_object_as_block.yml b/.rubocop_todo/performance/method_object_as_block.yml
new file mode 100644
index 00000000000..07ceaa93acd
--- /dev/null
+++ b/.rubocop_todo/performance/method_object_as_block.yml
@@ -0,0 +1,100 @@
+---
+Performance/MethodObjectAsBlock:
+ # Offense count: 150
+ # Temporarily disabled due to too many offenses
+ Enabled: false
+ Exclude:
+ - 'app/controllers/concerns/metrics_dashboard.rb'
+ - 'app/controllers/concerns/requires_whitelisted_monitoring_client.rb'
+ - 'app/controllers/projects/merge_requests/drafts_controller.rb'
+ - 'app/finders/bulk_imports/entities_finder.rb'
+ - 'app/models/clusters/cluster.rb'
+ - 'app/models/concerns/prometheus_adapter.rb'
+ - 'app/models/concerns/token_authenticatable.rb'
+ - 'app/models/container_repository.rb'
+ - 'app/models/programming_language.rb'
+ - 'app/presenters/packages/detail/package_presenter.rb'
+ - 'app/services/bulk_imports/file_download_service.rb'
+ - 'app/services/ci/pipeline_processing/atomic_processing_service.rb'
+ - 'app/services/ci/prometheus_metrics/observe_histograms_service.rb'
+ - 'app/services/concerns/users/participable_service.rb'
+ - 'app/services/discussions/resolve_service.rb'
+ - 'app/services/jira/requests/projects/list_service.rb'
+ - 'app/services/merge_requests/refresh_service.rb'
+ - 'app/services/packages/debian/generate_distribution_service.rb'
+ - 'app/services/projects/container_repository/delete_tags_service.rb'
+ - 'app/workers/gitlab/import/stuck_import_job.rb'
+ - 'app/workers/object_storage/migrate_uploads_worker.rb'
+ - 'config/initializers/0_inject_enterprise_edition_module.rb'
+ - 'ee/app/finders/security/findings_finder.rb'
+ - 'ee/app/graphql/resolvers/vulnerabilities/scanners_resolver.rb'
+ - 'ee/app/services/dashboard/projects/create_service.rb'
+ - 'ee/app/services/security/findings/cleanup_service.rb'
+ - 'ee/app/services/security/ingestion/bulk_insertable_task.rb'
+ - 'ee/app/services/security/ingestion/ingest_reports_service.rb'
+ - 'ee/app/services/security/ingestion/tasks/ingest_vulnerability_statistics.rb'
+ - 'ee/app/services/security/store_findings_metadata_service.rb'
+ - 'ee/app/services/security/store_grouped_scans_service.rb'
+ - 'ee/lib/ee/container_registry/client.rb'
+ - 'ee/lib/ee/gitlab/ci/config_ee.rb'
+ - 'ee/lib/ee/gitlab/etag_caching/router/rails.rb'
+ - 'ee/lib/pseudonymizer/dumper.rb'
+ - 'ee/spec/services/groups/participants_service_spec.rb'
+ - 'lib/api/helpers/packages/conan/api_helpers.rb'
+ - 'lib/bulk_imports/pipeline.rb'
+ - 'lib/container_registry/base_client.rb'
+ - 'lib/container_registry/gitlab_api_client.rb'
+ - 'lib/gitlab/ci/build/rules/rule.rb'
+ - 'lib/gitlab/ci/build/rules/rule/clause/exists.rb'
+ - 'lib/gitlab/ci/config/external/mapper.rb'
+ - 'lib/gitlab/ci/config/yaml/tags/resolver.rb'
+ - 'lib/gitlab/ci/pipeline/chain/create_deployments.rb'
+ - 'lib/gitlab/ci/pipeline/chain/ensure_environments.rb'
+ - 'lib/gitlab/ci/pipeline/chain/ensure_resource_groups.rb'
+ - 'lib/gitlab/ci/pipeline/chain/validate/external.rb'
+ - 'lib/gitlab/ci/status/composite.rb'
+ - 'lib/gitlab/config/entry/legacy_validation_helpers.rb'
+ - 'lib/gitlab/config/entry/validators.rb'
+ - 'lib/gitlab/container_repository/tags/cache.rb'
+ - 'lib/gitlab/daemon.rb'
+ - 'lib/gitlab/data_builder/pipeline.rb'
+ - 'lib/gitlab/dependency_linker/cartfile_linker.rb'
+ - 'lib/gitlab/dependency_linker/gemfile_linker.rb'
+ - 'lib/gitlab/dependency_linker/gemspec_linker.rb'
+ - 'lib/gitlab/dependency_linker/package_json_linker.rb'
+ - 'lib/gitlab/dependency_linker/podspec_json_linker.rb'
+ - 'lib/gitlab/dependency_linker/podspec_linker.rb'
+ - 'lib/gitlab/etag_caching/router/graphql.rb'
+ - 'lib/gitlab/etag_caching/router/rails.rb'
+ - 'lib/gitlab/health_checks/simple_abstract_check.rb'
+ - 'lib/gitlab/import_export/attributes_finder.rb'
+ - 'lib/gitlab/import_export/config.rb'
+ - 'lib/gitlab/import_export/fast_hash_serializer.rb'
+ - 'lib/gitlab/import_export/group/tree_restorer.rb'
+ - 'lib/gitlab/middleware/basic_health_check.rb'
+ - 'lib/gitlab/prometheus/additional_metrics_parser.rb'
+ - 'lib/gitlab/prometheus/queries/matched_metric_query.rb'
+ - 'lib/gitlab/prometheus/queries/query_additional_metrics.rb'
+ - 'lib/gitlab/search_context.rb'
+ - 'lib/gitlab/sidekiq_queue.rb'
+ - 'lib/gitlab/uploads/migration_helper.rb'
+ - 'lib/gitlab/utils.rb'
+ - 'lib/peek/views/detailed_view.rb'
+ - 'lib/tasks/gitlab/assets.rake'
+ - 'qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb'
+ - 'rubocop/cop/avoid_return_from_blocks.rb'
+ - 'rubocop/cop/gitlab/mark_used_feature_flags.rb'
+ - 'rubocop/rubocop.rb'
+ - 'scripts/api/download_job_artifact.rb'
+ - 'spec/graphql/resolvers/concerns/caching_array_resolver_spec.rb'
+ - 'spec/lib/api/entities/merge_request_basic_spec.rb'
+ - 'spec/lib/gitlab/import_export/import_test_coverage_spec.rb'
+ - 'spec/lib/gitlab/search_context/builder_spec.rb'
+ - 'spec/models/design_management/version_spec.rb'
+ - 'spec/services/notification_service_spec.rb'
+ - 'spec/services/projects/container_repository/cleanup_tags_service_spec.rb'
+ - 'spec/support/helpers/migrations_helpers.rb'
+ - 'spec/support/shared_examples/models/active_record_enum_shared_examples.rb'
+ - 'spec/support_specs/helpers/stub_feature_flags_spec.rb'
+ - 'tooling/lib/tooling/test_map_packer.rb'
+ - 'tooling/quality/test_level.rb'
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index 48808496065..5cd7339fbfe 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-c311109b15c26e1981c855bfa5c87aef02d27560
+53768dae0bc6395d2b80438286723a912aa50921
diff --git a/app/assets/javascripts/blob/sketch/index.js b/app/assets/javascripts/blob/sketch/index.js
index d257810da65..a92161bbc1b 100644
--- a/app/assets/javascripts/blob/sketch/index.js
+++ b/app/assets/javascripts/blob/sketch/index.js
@@ -27,7 +27,7 @@ export default class SketchLoader {
}
getZipFile() {
- return new JSZip.external.Promise((resolve, reject) => {
+ return new Promise((resolve, reject) => {
JSZipUtils.getBinaryContent(this.container.dataset.endpoint, (err, data) => {
if (err) {
reject(err);
diff --git a/app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue b/app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue
index 83b074dd55c..4ac28b3b9c0 100644
--- a/app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue
+++ b/app/assets/javascripts/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue
@@ -1,26 +1,66 @@
<script>
+import { GlButton } from '@gitlab/ui';
+import getAppStatus from '~/pipeline_editor/graphql/queries/client/app_status.query.graphql';
+import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
+import { EDITOR_APP_STATUS_EMPTY } from '../../constants';
import BranchSwitcher from './branch_switcher.vue';
export default {
components: {
BranchSwitcher,
+ GlButton,
},
+ mixins: [glFeatureFlagMixin()],
props: {
hasUnsavedChanges: {
type: Boolean,
required: false,
default: false,
},
+ isNewCiConfigFile: {
+ type: Boolean,
+ required: false,
+ default: false,
+ },
shouldLoadNewBranch: {
type: Boolean,
required: false,
default: false,
},
},
+ apollo: {
+ appStatus: {
+ query: getAppStatus,
+ update(data) {
+ return data.app.status;
+ },
+ },
+ },
+ computed: {
+ showFileTreeToggle() {
+ return (
+ this.glFeatures.pipelineEditorFileTree &&
+ !this.isNewCiConfigFile &&
+ this.appStatus !== EDITOR_APP_STATUS_EMPTY
+ );
+ },
+ },
+ methods: {
+ onFileTreeBtnClick() {
+ this.$emit('toggle-file-tree');
+ },
+ },
};
</script>
<template>
<div class="gl-mb-4">
+ <gl-button
+ v-if="showFileTreeToggle"
+ icon="file-tree"
+ data-testid="file-tree-toggle"
+ :aria-label="__('File Tree')"
+ @click="onFileTreeBtnClick"
+ />
<branch-switcher
:has-unsaved-changes="hasUnsavedChanges"
:should-load-new-branch="shouldLoadNewBranch"
diff --git a/app/assets/javascripts/pipeline_editor/components/file_tree/container.vue b/app/assets/javascripts/pipeline_editor/components/file_tree/container.vue
new file mode 100644
index 00000000000..d1ff70ad518
--- /dev/null
+++ b/app/assets/javascripts/pipeline_editor/components/file_tree/container.vue
@@ -0,0 +1,41 @@
+<script>
+import { GlAlert } from '@gitlab/ui';
+import { __, s__ } from '~/locale';
+import FileItem from './file_item.vue';
+
+const i18n = {
+ tipBtn: __('Learn more'),
+ tipDescription: s__(
+ 'PipelineEditorFileTree|When you use the include keyword to add pipeline configuration from files in the project, those files will be listed here.',
+ ),
+ tipTitle: s__('PipelineEditorFileTree|Configuration files added with the include keyword'),
+};
+
+export default {
+ i18n,
+ name: 'PipelineEditorFileTreeContainer',
+ components: {
+ FileItem,
+ GlAlert,
+ },
+ inject: ['ciConfigPath'],
+ data() {
+ return {
+ showTip: true,
+ };
+ },
+ methods: {
+ dismissTip() {
+ this.showTip = false;
+ },
+ },
+};
+</script>
+<template>
+ <aside class="file-tree-container gl-mr-5 gl-mb-5">
+ <file-item class="gl-mb-3 gl-bg-gray-50" :file-name="ciConfigPath" />
+ <gl-alert v-if="showTip" variant="tip" :title="$options.i18n.tipTitle" @dismiss="dismissTip">
+ {{ $options.i18n.tipDescription }}
+ </gl-alert>
+ </aside>
+</template>
diff --git a/app/assets/javascripts/pipeline_editor/components/file_tree/file_item.vue b/app/assets/javascripts/pipeline_editor/components/file_tree/file_item.vue
new file mode 100644
index 00000000000..d51a2874c9e
--- /dev/null
+++ b/app/assets/javascripts/pipeline_editor/components/file_tree/file_item.vue
@@ -0,0 +1,24 @@
+<script>
+import FileIcon from '~/vue_shared/components/file_icon.vue';
+
+export default {
+ name: 'PipelineEditorFileItem',
+ components: {
+ FileIcon,
+ },
+ props: {
+ fileName: {
+ type: String,
+ required: true,
+ },
+ },
+};
+</script>
+<template>
+ <div class="gl-py-2 gl-px-3 gl-rounded-base">
+ <span class="file-row-name" :title="fileName">
+ <file-icon class="file-row-icon" :file-name="fileName" />
+ <span>{{ fileName }}</span>
+ </span>
+ </div>
+</template>
diff --git a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue
index 4e6a4ffa6d2..3c6d5b1d3ad 100644
--- a/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue
+++ b/app/assets/javascripts/pipeline_editor/pipeline_editor_app.vue
@@ -104,6 +104,7 @@ export default {
this.setAppStatus(EDITOR_APP_STATUS_EMPTY);
}
+ this.isNewCiConfigFile = false;
if (!hasCIFile) {
if (this.shouldSkipStartScreen) {
this.setNewEmptyCiConfigFile();
diff --git a/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue b/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
index 23e3ce10d5a..ffe275cba68 100644
--- a/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
+++ b/app/assets/javascripts/pipeline_editor/pipeline_editor_home.vue
@@ -1,9 +1,11 @@
<script>
import { GlModal } from '@gitlab/ui';
import { __ } from '~/locale';
+import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import CommitSection from './components/commit/commit_section.vue';
import PipelineEditorDrawer from './components/drawer/pipeline_editor_drawer.vue';
import PipelineEditorFileNav from './components/file_nav/pipeline_editor_file_nav.vue';
+import PipelineEditorFileTree from './components/file_tree/container.vue';
import PipelineEditorHeader from './components/header/pipeline_editor_header.vue';
import PipelineEditorTabs from './components/pipeline_editor_tabs.vue';
import { CREATE_TAB } from './constants';
@@ -28,9 +30,11 @@ export default {
GlModal,
PipelineEditorDrawer,
PipelineEditorFileNav,
+ PipelineEditorFileTree,
PipelineEditorHeader,
PipelineEditorTabs,
},
+ mixins: [glFeatureFlagMixin()],
props: {
ciConfigData: {
type: Object,
@@ -61,6 +65,7 @@ export default {
scrollToCommitForm: false,
shouldLoadNewBranch: false,
showDrawer: false,
+ showFileTree: false,
showSwitchBranchModal: false,
};
},
@@ -68,6 +73,9 @@ export default {
showCommitForm() {
return this.currentTab === CREATE_TAB;
},
+ isFileTreeVisible() {
+ return this.showFileTree && this.glFeatures.pipelineEditorFileTree;
+ },
},
methods: {
closeBranchModal() {
@@ -82,6 +90,9 @@ export default {
openDrawer() {
this.showDrawer = true;
},
+ toggleFileTree() {
+ this.showFileTree = !this.showFileTree;
+ },
switchBranch() {
this.showSwitchBranchModal = false;
this.shouldLoadNewBranch = true;
@@ -114,28 +125,35 @@ export default {
</gl-modal>
<pipeline-editor-file-nav
:has-unsaved-changes="hasUnsavedChanges"
+ :is-new-ci-config-file="isNewCiConfigFile"
:should-load-new-branch="shouldLoadNewBranch"
@select-branch="handleConfirmSwitchBranch"
+ @toggle-file-tree="toggleFileTree"
v-on="$listeners"
/>
- <pipeline-editor-header
- :ci-config-data="ciConfigData"
- :commit-sha="commitSha"
- :is-new-ci-config-file="isNewCiConfigFile"
- v-on="$listeners"
- />
- <pipeline-editor-tabs
- :ci-config-data="ciConfigData"
- :ci-file-content="ciFileContent"
- :commit-sha="commitSha"
- :is-new-ci-config-file="isNewCiConfigFile"
- :show-drawer="showDrawer"
- v-on="$listeners"
- @open-drawer="openDrawer"
- @close-drawer="closeDrawer"
- @set-current-tab="setCurrentTab"
- @walkthrough-popover-cta-clicked="setScrollToCommitForm"
- />
+ <div class="gl-display-flex gl-w-full gl-sm-flex-direction-column">
+ <pipeline-editor-file-tree v-if="isFileTreeVisible" class="gl-flex-shrink-0" />
+ <div class="gl-flex-grow-1 gl-min-w-0">
+ <pipeline-editor-header
+ :ci-config-data="ciConfigData"
+ :commit-sha="commitSha"
+ :is-new-ci-config-file="isNewCiConfigFile"
+ v-on="$listeners"
+ />
+ <pipeline-editor-tabs
+ :ci-config-data="ciConfigData"
+ :ci-file-content="ciFileContent"
+ :commit-sha="commitSha"
+ :is-new-ci-config-file="isNewCiConfigFile"
+ :show-drawer="showDrawer"
+ v-on="$listeners"
+ @open-drawer="openDrawer"
+ @close-drawer="closeDrawer"
+ @set-current-tab="setCurrentTab"
+ @walkthrough-popover-cta-clicked="setScrollToCommitForm"
+ />
+ </div>
+ </div>
<commit-section
v-if="showCommitForm"
:ref="$options.commitSectionRef"
diff --git a/app/assets/javascripts/repository/components/breadcrumbs.vue b/app/assets/javascripts/repository/components/breadcrumbs.vue
index 84c9f9d0bbe..20888db80a9 100644
--- a/app/assets/javascripts/repository/components/breadcrumbs.vue
+++ b/app/assets/javascripts/repository/components/breadcrumbs.vue
@@ -269,6 +269,9 @@ export default {
renderAddToTreeDropdown() {
return !this.isBlobPath && (this.canCollaborate || this.canCreateMrFromFork);
},
+ newDirectoryPath() {
+ return joinPaths(this.newDirPath, this.currentPath);
+ },
},
methods: {
isLast(i) {
@@ -332,7 +335,7 @@ export default {
:commit-message="__('Add new directory')"
:target-branch="selectedBranch"
:original-branch="originalBranch"
- :path="newDirPath"
+ :path="newDirectoryPath"
/>
</nav>
</template>
diff --git a/app/assets/javascripts/sidebar/components/attention_requested_toggle.vue b/app/assets/javascripts/sidebar/components/attention_requested_toggle.vue
index cdc1c65a516..cd1aae155d2 100644
--- a/app/assets/javascripts/sidebar/components/attention_requested_toggle.vue
+++ b/app/assets/javascripts/sidebar/components/attention_requested_toggle.vue
@@ -5,9 +5,8 @@ import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants';
export default {
i18n: {
- attentionRequestedReviewer: __('Request attention to review'),
- attentionRequestedAssignee: __('Request attention'),
- removeAttentionRequested: __('Remove attention request'),
+ addAttentionRequest: __('Add attention request'),
+ removeAttentionRequest: __('Remove attention request'),
attentionRequestedNoPermission: __('Attention requested'),
noAttentionRequestedNoPermission: __('No attention request'),
},
@@ -36,16 +35,14 @@ export default {
tooltipTitle() {
if (this.user.attention_requested) {
if (this.user.can_update_merge_request) {
- return this.$options.i18n.removeAttentionRequested;
+ return this.$options.i18n.removeAttentionRequest;
}
return this.$options.i18n.attentionRequestedNoPermission;
}
if (this.user.can_update_merge_request) {
- return this.type === 'reviewer'
- ? this.$options.i18n.attentionRequestedReviewer
- : this.$options.i18n.attentionRequestedAssignee;
+ return this.$options.i18n.addAttentionRequest;
}
return this.$options.i18n.noAttentionRequestedNoPermission;
diff --git a/app/assets/stylesheets/page_bundles/pipeline_editor.scss b/app/assets/stylesheets/page_bundles/pipeline_editor.scss
new file mode 100644
index 00000000000..8e4cff2d167
--- /dev/null
+++ b/app/assets/stylesheets/page_bundles/pipeline_editor.scss
@@ -0,0 +1,9 @@
+@import 'mixins_and_variables_and_functions';
+
+.file-tree-container {
+ @include gl-w-full;
+
+ @media (min-width: $breakpoint-md) {
+ width: 300px;
+ }
+}
diff --git a/app/controllers/projects/ci/pipeline_editor_controller.rb b/app/controllers/projects/ci/pipeline_editor_controller.rb
index 8c6e8f0e126..fdcae23a440 100644
--- a/app/controllers/projects/ci/pipeline_editor_controller.rb
+++ b/app/controllers/projects/ci/pipeline_editor_controller.rb
@@ -4,6 +4,7 @@ class Projects::Ci::PipelineEditorController < Projects::ApplicationController
before_action :check_can_collaborate!
before_action do
push_frontend_feature_flag(:schema_linting, @project, default_enabled: :yaml)
+ push_frontend_feature_flag(:pipeline_editor_file_tree, @project, default_enabled: :yaml)
end
feature_category :pipeline_authoring
diff --git a/app/views/projects/ci/pipeline_editor/show.html.haml b/app/views/projects/ci/pipeline_editor/show.html.haml
index c4757ea9c26..18eac48d42a 100644
--- a/app/views/projects/ci/pipeline_editor/show.html.haml
+++ b/app/views/projects/ci/pipeline_editor/show.html.haml
@@ -1,5 +1,6 @@
- @force_fluid_layout = true
- add_page_specific_style 'page_bundles/pipelines'
+- add_page_specific_style 'page_bundles/pipeline_editor'
- page_title s_('Pipelines|Pipeline Editor')
- content_for :prefetch_asset_tags do
diff --git a/config/application.rb b/config/application.rb
index 703b829edbb..d20ee54cfd2 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -287,6 +287,7 @@ module Gitlab
config.assets.precompile << "page_bundles/pipeline.css"
config.assets.precompile << "page_bundles/pipeline_schedules.css"
config.assets.precompile << "page_bundles/pipelines.css"
+ config.assets.precompile << "page_bundles/pipeline_editor.css"
config.assets.precompile << "page_bundles/productivity_analytics.css"
config.assets.precompile << "page_bundles/profile_two_factor_auth.css"
config.assets.precompile << "page_bundles/project.css"
@@ -487,6 +488,19 @@ module Gitlab
end
end
+ # We know Rails closes database connections in the
+ # active_record.clear_active_connections initializer, so only log database
+ # connections opened after that.
+ initializer :start_logging_new_postgresql_connections, after: :finisher_hook do
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.warn_on_new_connection = true
+ end
+
+ # It is legitimate to open database connections after initializers so stop
+ # logging
+ initializer :stop_logging_new_postgresql_connections, after: :set_routes_reloader_hook do
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.warn_on_new_connection = false
+ end
+
# Load JH initializers under JH. Load ordering is:
# 1. prepend_helpers_path
# 2. before_zeitwerk
diff --git a/config/feature_flags/development/pipeline_editor_file_tree.yml b/config/feature_flags/development/pipeline_editor_file_tree.yml
new file mode 100644
index 00000000000..db31133a530
--- /dev/null
+++ b/config/feature_flags/development/pipeline_editor_file_tree.yml
@@ -0,0 +1,8 @@
+---
+name: pipeline_editor_file_tree
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/83910
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/357219
+milestone: '15.0'
+type: development
+group: group::pipeline authoring
+default_enabled: false
diff --git a/config/initializers/00_connection_logger.rb b/config/initializers/00_connection_logger.rb
new file mode 100644
index 00000000000..9f03d13f95f
--- /dev/null
+++ b/config/initializers/00_connection_logger.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+module NewConnectionLogger
+ extend ActiveSupport::Concern
+
+ prepended do |base|
+ base.class_attribute :warn_on_new_connection, default: false
+ end
+
+ class_methods do
+ def new_client(...)
+ if warn_on_new_connection && !ENV['SKIP_LOG_INITIALIZER_CONNECTIONS']
+ cleaned_caller = Gitlab::BacktraceCleaner.clean_backtrace(caller)
+ message = "Database connection should not be called during initializers. Read more at https://docs.gitlab.com/ee/development/rails_initializers.html#database-connections-in-initializers"
+
+ ActiveSupport::Deprecation.warn(message, cleaned_caller)
+
+ warn caller if ENV['DEBUG_INITIALIZER_CONNECTIONS']
+ end
+
+ super
+ end
+ end
+end
+
+ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend(NewConnectionLogger)
diff --git a/data/deprecations/templates/14-9-deprecation-htpassword-authentication-container-registry.yml b/data/deprecations/14-9-deprecation-htpassword-authentication-container-registry.yml
index 14c6b235a1a..14c6b235a1a 100644
--- a/data/deprecations/templates/14-9-deprecation-htpassword-authentication-container-registry.yml
+++ b/data/deprecations/14-9-deprecation-htpassword-authentication-container-registry.yml
diff --git a/data/removals/15_0/15-0-container-registry-htpasswd.yml b/data/removals/15_0/15-0-container-registry-htpasswd.yml
new file mode 100644
index 00000000000..e9a4b2e9882
--- /dev/null
+++ b/data/removals/15_0/15-0-container-registry-htpasswd.yml
@@ -0,0 +1,11 @@
+- name: "Container registry authentication with htpasswd"
+ announcement_milestone: "14.9"
+ announcement_date: "2022-03-22"
+ removal_milestone: "15.0"
+ removal_date: "2022-05-22"
+ breaking_change: true
+ reporter: trizzi
+ body: | # Do not modify this line, instead modify the lines below.
+ The Container Registry supports [authentication](https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#auth) with `htpasswd`. It relies on an [Apache `htpasswd` file](https://httpd.apache.org/docs/2.4/programs/htpasswd.html), with passwords hashed using `bcrypt`.
+
+ Since it isn't used in the context of GitLab (the product), `htpasswd` authentication will be deprecated in GitLab 14.9 and removed in GitLab 15.0.
diff --git a/doc/administration/instance_limits.md b/doc/administration/instance_limits.md
index 0a0c538caa2..5188fcf36b0 100644
--- a/doc/administration/instance_limits.md
+++ b/doc/administration/instance_limits.md
@@ -886,7 +886,7 @@ than the specified limit, hooks are not executed.
More information can be found in these docs:
- [Webhooks push events](../user/project/integrations/webhook_events.md#push-events)
-- [Project services push hooks limit](../user/project/integrations/overview.md#push-hooks-limit)
+- [Project services push hooks limit](../user/project/integrations/index.md#push-hooks-limit)
### Activities
diff --git a/doc/administration/logs.md b/doc/administration/logs.md
index 22e13270179..f19a5e056c6 100644
--- a/doc/administration/logs.md
+++ b/doc/administration/logs.md
@@ -385,7 +385,7 @@ Depending on your installation method, this file is located at:
- Omnibus GitLab: `/var/log/gitlab/gitlab-rails/integrations_json.log`
- Installations from source: `/home/git/gitlab/log/integrations_json.log`
-It contains information about [integration](../user/project/integrations/overview.md)
+It contains information about [integration](../user/project/integrations/index.md)
activities, such as Jira, Asana, and irker services. It uses JSON format,
like this example:
diff --git a/doc/ci/enable_or_disable_ci.md b/doc/ci/enable_or_disable_ci.md
index 65c907b8e7b..2e514fd0f0a 100644
--- a/doc/ci/enable_or_disable_ci.md
+++ b/doc/ci/enable_or_disable_ci.md
@@ -31,7 +31,7 @@ If you disable GitLab CI/CD in a project:
- Existing jobs and pipelines are not deleted. Re-enable CI/CD to access them again.
The project or instance settings do not enable or disable pipelines run in an
-[external integration](../user/project/integrations/overview.md#integrations-listing).
+[external integration](../user/project/integrations/index.md#available-integrations).
## Enable CI/CD in a project
diff --git a/doc/development/documentation/styleguide/index.md b/doc/development/documentation/styleguide/index.md
index 81fd4d63aee..80e5dd18726 100644
--- a/doc/development/documentation/styleguide/index.md
+++ b/doc/development/documentation/styleguide/index.md
@@ -401,6 +401,39 @@ Backticks are more precise than quotes. For example, in this string:
It's not clear whether the user should include the period in the string.
+### Inline code
+
+Inline code style is applied inline with regular text. Use inline code style:
+
+- For filenames or fragments of configuration files. For example, `.gitlab-ci.yml`, `CODEOWNERS`, and `only: [main]`.
+- For HTTP methods (`HTTP POST`) and HTTP status codes, both full (`404 File Not Found`) and abbreviated (`404`).
+ For example: Send a `DELETE` request to delete the runner. Send a `POST` request to create one.
+
+To apply inline code style, wrap the text in a single backtick (`` ` ``). For example, `this is inline code style`.
+
+### Code blocks
+
+Code block style separates code text from regular text. Use code block style for commands run in the command-line
+interface. Code block style is easier to copy and paste in a user's terminal window.
+
+To apply code block style, wrap the text in triple backticks (three `` ` ``) and add a syntax highlighting hint. For
+example:
+
+````plaintext
+```plaintext
+This is codeblock style
+```
+````
+
+When using code block style:
+
+- Use quadruple backticks (four `` ` ``) to apply code block style when the code block you are styling has triple
+ backticks in it. For example, when illustrating code block style.
+- Add a blank line above and below code blocks.
+- Syntax highlight hints are required for code blocks. See the
+ [list of supported languages and lexers](https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers)
+ for available syntax highlighters. Use `plaintext` if no better hint is available.
+
## Lists
- Always start list items with a capital letter, unless they're parameters or
@@ -1166,80 +1199,6 @@ different mobile devices.
`/help`, because the GitLab Markdown processor doesn't support iframes. It's
hidden on the documentation site, but is displayed by `/help`.
-## Code blocks
-
-- Always wrap code added to a sentence in inline code blocks (`` ` ``).
- For example, `.gitlab-ci.yml`, `git add .`, `CODEOWNERS`, or `only: [main]`.
- File names, commands, entries, and anything that refers to code should be
- added to code blocks. To make things easier for the user, always add a full
- code block for things that can be useful to copy and paste, as they can do it
- with the button on code blocks.
-- HTTP methods (`HTTP POST`) and HTTP status codes, both full (`404 File Not Found`)
- and abbreviated (`404`), should be wrapped in inline code blocks when used in sentences.
- For example: Send a `DELETE` request to delete the runner. Send a `POST` request to create one.
-- Add a blank line above and below code blocks.
-- When providing a shell command and its output, prefix the shell command with `$`
- and leave a blank line between the command and the output.
-- When providing a command without output, don't prefix the shell command with `$`.
-- If you need to include triple backticks inside a code block, use four backticks
- for the code block fences instead of three.
-- For regular fenced code blocks, always use a highlighting class corresponding to
- the language for better readability. Examples:
-
- ````markdown
- ```ruby
- Ruby code
- ```
-
- ```javascript
- JavaScript code
- ```
-
- ```markdown
- [Markdown code example](example.md)
- ```
-
- ```plaintext
- Code or text for which no specific highlighting class is available.
- ```
- ````
-
-Syntax highlighting is required for fenced code blocks added to the GitLab
-documentation. Refer to this table for the most common language classes,
-or check the [complete list](https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers)
-of available language classes:
-
-| Preferred language tags | Language aliases and notes |
-|-------------------------|------------------------------------------------------------------------------|
-| `asciidoc` | |
-| `dockerfile` | Alias: `docker`. |
-| `elixir` | |
-| `erb` | |
-| `golang` | Alias: `go`. |
-| `graphql` | |
-| `haml` | |
-| `html` | |
-| `ini` | For some simple configuration files that are not in TOML format. |
-| `javascript` | Alias `js`. |
-| `json` | |
-| `markdown` | Alias: `md`. |
-| `mermaid` | |
-| `nginx` | |
-| `perl` | |
-| `php` | |
-| `plaintext` | Examples with no defined language, such as output from shell commands or API calls. If a code block has no language, it defaults to `plaintext`. Alias: `text`.|
-| `prometheus` | Prometheus configuration examples. |
-| `python` | |
-| `ruby` | Alias: `rb`. |
-| `shell` | Aliases: `bash` or `sh`. |
-| `sql` | |
-| `toml` | Runner configuration examples, and other TOML-formatted configuration files. |
-| `typescript` | Alias: `ts`. |
-| `xml` | |
-| `yaml` | Alias: `yml`. |
-
-For a complete reference on code blocks, see the [Kramdown guide](https://about.gitlab.com/handbook/markdown-guide/#code-blocks).
-
## GitLab SVG icons
> [Introduced](https://gitlab.com/gitlab-org/gitlab-docs/-/issues/384) in GitLab 12.7.
diff --git a/doc/development/integrations/index.md b/doc/development/integrations/index.md
index 34ac307c98a..05ab4eb3572 100644
--- a/doc/development/integrations/index.md
+++ b/doc/development/integrations/index.md
@@ -275,7 +275,7 @@ as described above in [Customize the frontend form](#customize-the-frontend-form
our [usability guidelines](https://design.gitlab.com/usability/helping-users) for help text.
For more detailed documentation, provide a page in `doc/user/project/integrations`,
-and link it from the [Integrations overview](../../user/project/integrations/overview.md).
+and link it from the [Integrations overview](../../user/project/integrations/index.md).
You can also refer to our general [documentation guidelines](../documentation/index.md).
diff --git a/doc/development/rails_initializers.md b/doc/development/rails_initializers.md
index ee73dac2b72..9bf4109f1cb 100644
--- a/doc/development/rails_initializers.md
+++ b/doc/development/rails_initializers.md
@@ -20,3 +20,21 @@ Some examples where you would need to do this are:
1. Modifying Rails' `config.autoload_paths`
1. Changing configuration that Zeitwerk uses, for example, inflections
+
+## Database connections in initializers
+
+Ideally, database connections are not opened from Rails initializers. Opening a
+database connection (e.g. checking the database exists, or making a database
+query) from an initializer means that tasks like `db:drop`, and
+`db:test:prepare` will fail because an active session prevents the database from
+being dropped.
+
+To help detect when database connections are opened from initializers, we now
+warn in stderr. For example:
+
+```shell
+DEPRECATION WARNING: Database connection should not be called during initializers (called from block in <module:HasVariable> at app/models/concerns/ci/has_variable.rb:22)
+```
+
+If you wish to print out the full backtrace, set the
+`DEBUG_INITIALIZER_CONNECTIONS` environment variable.
diff --git a/doc/development/testing_guide/end_to_end/rspec_metadata_tests.md b/doc/development/testing_guide/end_to_end/rspec_metadata_tests.md
index 45161404c73..938504161ba 100644
--- a/doc/development/testing_guide/end_to_end/rspec_metadata_tests.md
+++ b/doc/development/testing_guide/end_to_end/rspec_metadata_tests.md
@@ -21,7 +21,7 @@ This is a partial list of the [RSpec metadata](https://relishapp.com/rspec/rspec
| `:github` | The test requires a GitHub personal access token. |
| `:group_saml` | The test requires a GitLab instance that has SAML SSO enabled at the group level. Interacts with an external SAML identity provider. Paired with the `:orchestrated` tag. |
| `:instance_saml` | The test requires a GitLab instance that has SAML SSO enabled at the instance level. Interacts with an external SAML identity provider. Paired with the `:orchestrated` tag. |
-| `:integrations` | This aims to test the available [integrations](../../../user/project/integrations/overview.md#integrations-listing). The test requires Docker to be installed in the run context. It will provision the containers and can be run against a local instance or using the `gitlab-qa` scenario `Test::Integration::Integrations` |
+| `:integrations` | This aims to test the available [integrations](../../../user/project/integrations/index.md#available-integrations). The test requires Docker to be installed in the run context. It will provision the containers and can be run against a local instance or using the `gitlab-qa` scenario `Test::Integration::Integrations` |
| `:service_ping_disabled` | The test interacts with the GitLab configuration service ping at the instance level to turn admin setting service ping checkbox on or off. This tag will have the test run only in the `service_ping_disabled` job and must be paired with the `:orchestrated` and `:requires_admin` tags. |
| `:jira` | The test requires a Jira Server. [GitLab-QA](https://gitlab.com/gitlab-org/gitlab-qa) provisions the Jira Server in a Docker container when the `Test::Integration::Jira` test scenario is run. |
| `:kubernetes` | The test includes a GitLab instance that is configured to be run behind an SSH tunnel, allowing a TLS-accessible GitLab. This test also includes provisioning of at least one Kubernetes cluster to test against. _This tag is often be paired with `:orchestrated`._ |
diff --git a/doc/integration/index.md b/doc/integration/index.md
index b26c841f943..f1d16dc409d 100644
--- a/doc/integration/index.md
+++ b/doc/integration/index.md
@@ -64,7 +64,7 @@ or [Kroki](../administration/integration/kroki.md) to use diagrams in AsciiDoc a
## Integrations
-Integration with services such as Campfire, Flowdock, Jira, Pivotal Tracker, and Slack are available as [Integrations](../user/project/integrations/overview.md).
+Integration with services such as Campfire, Flowdock, Jira, Pivotal Tracker, and Slack are available as [Integrations](../user/project/integrations/index.md).
## Troubleshooting
diff --git a/doc/integration/jenkins.md b/doc/integration/jenkins.md
index 54d235b5357..7b02580dac1 100644
--- a/doc/integration/jenkins.md
+++ b/doc/integration/jenkins.md
@@ -137,7 +137,7 @@ than the [webhook integration](#configure-a-webhook).
- Merge request
- Tag push
1. Enter the **Jenkins server URL**.
-1. Optional. Clear the **Enable SSL verification** checkbox to disable [SSL verification](../user/project/integrations/overview.md#ssl-verification).
+1. Optional. Clear the **Enable SSL verification** checkbox to disable [SSL verification](../user/project/integrations/index.md#manage-ssl-verification).
1. Enter the **Project name**.
The project name should be URL-friendly, where spaces are replaced with underscores. To ensure
@@ -201,7 +201,7 @@ This issue can occur when the request exceeds the
[webhook timeout](../user/project/integrations/webhooks.md#webhook-fails-or-multiple-webhook-requests-are-triggered),
which is set to 10 seconds by default.
-Check the [service hook logs](../user/project/integrations/overview.md#troubleshooting-integrations)
+Check the [service hook logs](../user/project/integrations/index.md#troubleshooting-integrations)
for request failures or check the `/var/log/gitlab/gitlab-rails/production.log`
file for messages like:
diff --git a/doc/update/removals.md b/doc/update/removals.md
index 7e2b4f84fa1..b8ec2a99516 100644
--- a/doc/update/removals.md
+++ b/doc/update/removals.md
@@ -28,6 +28,20 @@ For removal reviewers (Technical Writers only):
https://about.gitlab.com/handbook/marketing/blog/release-posts/#update-the-removals-doc
-->
+## 15.0
+
+### Container registry authentication with htpasswd
+
+WARNING:
+This feature was changed or removed in 15.0
+as a [breaking change](https://docs.gitlab.com/ee/development/contributing/#breaking-changes).
+Before updating GitLab, review the details carefully to determine if you need to make any
+changes to your code, settings, or workflow.
+
+The Container Registry supports [authentication](https://gitlab.com/gitlab-org/container-registry/-/blob/master/docs/configuration.md#auth) with `htpasswd`. It relies on an [Apache `htpasswd` file](https://httpd.apache.org/docs/2.4/programs/htpasswd.html), with passwords hashed using `bcrypt`.
+
+Since it isn't used in the context of GitLab (the product), `htpasswd` authentication will be deprecated in GitLab 14.9 and removed in GitLab 15.0.
+
## 14.9
### Integrated error tracking disabled by default
diff --git a/doc/user/profile/notifications.md b/doc/user/profile/notifications.md
index d0e9b427f1c..b363ee2f78d 100644
--- a/doc/user/profile/notifications.md
+++ b/doc/user/profile/notifications.md
@@ -24,7 +24,7 @@ You might receive notifications for one of the following reasons:
or edit, or someone mentions <sup>1</sup> you.
- You've [enabled notifications in an issue, merge request, or epic](#notifications-on-issues-merge-requests-and-epics).
- You've configured notifications for the [project](#change-level-of-project-notifications) or [group](#group-notifications).
-- You're subscribed to group or project pipeline notifications via the pipeline emails [integration](../project/integrations/overview.md).
+- You're subscribed to group or project pipeline notifications via the pipeline emails [integration](../project/integrations/index.md).
1. GitLab doesn't send a notification when
[a comment is edited to include a user mention](../discussions/index.md#editing-a-comment-to-add-a-mention).
diff --git a/doc/user/project/integrations/bamboo.md b/doc/user/project/integrations/bamboo.md
index bf343078634..22e6d45dd96 100644
--- a/doc/user/project/integrations/bamboo.md
+++ b/doc/user/project/integrations/bamboo.md
@@ -46,7 +46,7 @@ integration in GitLab.
1. Select **Atlassian Bamboo**.
1. Ensure the **Active** checkbox is selected.
1. Enter the base URL of your Bamboo server. For example, `https://bamboo.example.com`.
-1. Optional. Clear the **Enable SSL verification** checkbox to disable [SSL verification](overview.md#ssl-verification).
+1. Optional. Clear the **Enable SSL verification** checkbox to disable [SSL verification](index.md#manage-ssl-verification).
1. Enter the [build key](#identify-the-bamboo-build-plan-build-key) from your Bamboo
build plan.
1. If necessary, enter a username and password for a Bamboo user that has
@@ -71,7 +71,7 @@ Bamboo. For example, `https://bamboo.example.com/browse/PROJ-PLAN`.
### Builds not triggered
If builds are not triggered, ensure you entered the right GitLab IP address in
-Bamboo under **Trigger IP addresses**. Also check [service hook logs](overview.md#troubleshooting-integrations) for request failures.
+Bamboo under **Trigger IP addresses**. Also check [service hook logs](index.md#troubleshooting-integrations) for request failures.
### Advanced Atlassian Bamboo features not available in GitLab UI
diff --git a/doc/user/project/integrations/bugzilla.md b/doc/user/project/integrations/bugzilla.md
index 4a9a8d62098..0f7ce182e1a 100644
--- a/doc/user/project/integrations/bugzilla.md
+++ b/doc/user/project/integrations/bugzilla.md
@@ -57,4 +57,4 @@ internal issue tracker, the internal issue is linked.
## Troubleshooting
-To see recent service hook deliveries, check [service hook logs](overview.md#troubleshooting-integrations).
+To see recent service hook deliveries, check [service hook logs](index.md#troubleshooting-integrations).
diff --git a/doc/user/project/integrations/index.md b/doc/user/project/integrations/index.md
index 9764c4d44a0..7af2e431157 100644
--- a/doc/user/project/integrations/index.md
+++ b/doc/user/project/integrations/index.md
@@ -6,26 +6,114 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Project integrations **(FREE)**
-You can find the available integrations under your project's
-**Settings > Integrations** page. You need to have at least
-the Maintainer role on the project.
+You can integrate your GitLab projects with other applications. Integrations are
+like plugins, and give you the freedom to add
+functionality to GitLab.
-## Integrations
+## View project integrations
-Like plugins, integrations allow you to integrate GitLab with other applications, adding additional features.
-For more information, read the
-[overview of integrations](overview.md) or learn how to manage your integrations:
+Prerequisites:
-- *For GitLab 13.3 and later,* read [Project integration management](../../admin_area/settings/project_integration_management.md).
-- *For GitLab 13.2 and earlier,* read [Integration Management](../../admin_area/settings/project_integration_management.md),
- which replaced the deprecated Service Templates [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/268032)
- in GitLab 14.0.
+- You must have at least the Maintainer role for the project.
-## Project webhooks
+To view the available integrations for your project:
-Project webhooks allow you to trigger a URL if for example new code is pushed or
-a new issue is created. You can configure webhooks to listen for specific events
-like pushes, issues or merge requests. GitLab sends a POST request with data
-to the webhook URL.
+1. On the top bar, select **Menu > Projects** and find your project.
+1. On the left sidebar, select **Settings > Integrations**.
+
+You can also view and manage integration settings across [all projects in an instance or group](../../admin_area/settings/project_integration_management.md).
+For a single project, you can choose to inherit the instance or group configuration,
+or provide custom settings.
+
+NOTE:
+Instance and group-based integration management replaces service templates, which
+were [removed](https://gitlab.com/gitlab-org/gitlab/-/issues/268032) in GitLab 14.0.
+
+## Manage SSL verification
+
+By default, the SSL certificate for outgoing HTTP requests is verified based on
+an internal list of Certificate Authorities. This means the certificate cannot
+be self-signed.
+
+You can turn off SSL verification in the configuration settings for [webhooks](webhooks.md#configure-a-webhook-in-gitlab)
+and some integrations.
+
+## Available integrations
+
+You can configure the following integrations.
+
+| Integration | Description | Integration hooks |
+|-----------------------------------------------------------------------------|-----------------------------------------------------------------------|------------------------|
+| [Asana](asana.md) | Add commit messages as comments to Asana tasks. | **{dotted-circle}** No |
+| Assembla | Manage projects. | **{dotted-circle}** No |
+| [Atlassian Bamboo CI](bamboo.md) | Run CI/CD pipelines with Atlassian Bamboo. | **{check-circle}** Yes |
+| [Bugzilla](bugzilla.md) | Use Bugzilla as the issue tracker. | **{dotted-circle}** No |
+| Buildkite | Run CI/CD pipelines with Buildkite. | **{check-circle}** Yes |
+| Campfire | Connect to chat. | **{dotted-circle}** No |
+| [Confluence Workspace](../../../api/integrations.md#confluence-integration) | Use Confluence Cloud Workspace as an internal wiki. | **{dotted-circle}** No |
+| [Custom issue tracker](custom_issue_tracker.md) | Use a custom issue tracker. | **{dotted-circle}** No |
+| [Datadog](../../../integration/datadog.md) | Trace your GitLab pipelines with Datadog. | **{check-circle}** Yes |
+| [Discord Notifications](discord_notifications.md) | Send notifications about project events to a Discord channel. | **{dotted-circle}** No |
+| Drone CI | Run CI/CD pipelines with Drone. | **{check-circle}** Yes |
+| [Emails on push](emails_on_push.md) | Send commits and diff of each push by email. | **{dotted-circle}** No |
+| [EWM](ewm.md) | Use IBM Engineering Workflow Management as the issue tracker. | **{dotted-circle}** No |
+| [External wiki](../wiki/index.md#link-an-external-wiki) | Link an external wiki. | **{dotted-circle}** No |
+| [Flowdock](../../../api/integrations.md#flowdock) | Send notifications from GitLab to Flowdock flows. | **{dotted-circle}** No |
+| [GitHub](github.md) | Obtain statuses for commits and pull requests. | **{dotted-circle}** No |
+| [Google Chat](hangouts_chat.md) | Send notifications from your GitLab project to a room in Google Chat. | **{dotted-circle}** No |
+| [Harbor](harbor.md) | Use Harbor as the container registry. | **{dotted-circle}** No |
+| [irker (IRC gateway)](irker.md) | Send IRC messages. | **{dotted-circle}** No |
+| [Jenkins](../../../integration/jenkins.md) | Run CI/CD pipelines with Jenkins. | **{check-circle}** Yes |
+| JetBrains TeamCity CI | Run CI/CD pipelines with TeamCity. | **{check-circle}** Yes |
+| [Jira](../../../integration/jira/index.md) | Use Jira as the issue tracker. | **{dotted-circle}** No |
+| [Mattermost notifications](mattermost.md) | Send notifications about project events to Mattermost channels. | **{dotted-circle}** No |
+| [Mattermost slash commands](mattermost_slash_commands.md) | Perform common tasks with slash commands. | **{dotted-circle}** No |
+| [Microsoft Teams notifications](microsoft_teams.md) | Receive event notifications. | **{dotted-circle}** No |
+| Packagist | Keep your PHP dependencies updated on Packagist. | **{check-circle}** Yes |
+| [Pipelines emails](pipeline_status_emails.md) | Send the pipeline status to a list of recipients by email. | **{dotted-circle}** No |
+| [Pivotal Tracker](pivotal_tracker.md) | Add commit messages as comments to Pivotal Tracker stories. | **{dotted-circle}** No |
+| [Prometheus](prometheus.md) | Monitor application metrics. | **{dotted-circle}** No |
+| Pushover | Get real-time notifications on your device. | **{dotted-circle}** No |
+| [Redmine](redmine.md) | Use Redmine as the issue tracker. | **{dotted-circle}** No |
+| [Slack application](gitlab_slack_application.md) | Use Slack's official GitLab application. | **{dotted-circle}** No |
+| [Slack notifications](slack.md) | Send notifications about project events to Slack. | **{dotted-circle}** No |
+| [Slack slash commands](slack_slash_commands.md) | Enable slash commands in a workspace. | **{dotted-circle}** No |
+| [Unify Circuit](unify_circuit.md) | Send notifications about project events to Unify Circuit. | **{dotted-circle}** No |
+| [Webex Teams](webex_teams.md) | Receive events notifications. | **{dotted-circle}** No |
+| [YouTrack](youtrack.md) | Use YouTrack as the issue tracker. | **{dotted-circle}** No |
+| [ZenTao](zentao.md) | Use ZenTao as the issue tracker. | **{dotted-circle}** No |
+
+### Project webhooks
+
+You can configure a project webhook to listen for specific events
+like pushes, issues, or merge requests. When the webhook is triggered, GitLab
+sends a POST request with data to a specified webhook URL.
Learn more [about webhooks](webhooks.md).
+
+## Push hooks limit
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17874) in GitLab 12.4.
+
+If a single push includes changes to more than three branches or tags, integrations
+supported by `push_hooks` and `tag_push_hooks` events aren't executed.
+
+You can change the number of supported branches or tags by changing the
+[`push_event_hooks_limit` application setting](../../../api/settings.md#list-of-settings-that-can-be-accessed-via-api-calls).
+
+## Troubleshooting integrations
+
+Some integrations use hooks to integrate with external applications. To confirm which ones use integration hooks, see the [available integrations](#available-integrations). Learn more about [troubleshooting integration hooks](webhooks.md#troubleshoot-webhooks).
+
+### `Test Failed. Save Anyway` error
+
+Some integrations fail with an error `Test Failed. Save Anyway` when you set them
+up on uninitialized repositories. This error occurs because the integration uses
+push data to build the test payload, and there are no push events in the project.
+
+To resolve this error, initialize the repository by pushing a test file to the project
+and set up the integration again.
+
+## Contribute to integrations
+
+To add a new integration, see the [Integrations development guide](../../../development/integrations/index.md).
diff --git a/doc/user/project/integrations/overview.md b/doc/user/project/integrations/overview.md
index 081780e6277..9625edcd8f9 100644
--- a/doc/user/project/integrations/overview.md
+++ b/doc/user/project/integrations/overview.md
@@ -1,117 +1,11 @@
---
-stage: Ecosystem
-group: Integrations
-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
+redirect_to: 'index.md'
+remove_date: '2022-07-20'
---
-# Integrations **(FREE)**
+This document was moved to [another location](index.md).
-Integrations allow you to integrate GitLab with other applications. They
-are a bit like plugins in that they allow a lot of freedom in adding
-functionality to GitLab.
-
-## Accessing integrations
-
-To find the available integrations for your project:
-
-1. On the top bar, select **Menu > Projects** and find your project.
-1. On the left sidebar, select **Settings > Integrations**.
-
-There are more than 20 integrations to integrate with. Select the one that you
-want to configure.
-
-## Integrations listing
-
-Click on the integration links to see further configuration instructions and details.
-
-| Integration | Description | Integration hooks |
-| --------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ---------------------- |
-| [Asana](asana.md) | Add commit messages as comments to Asana tasks. | **{dotted-circle}** No |
-| Assembla | Manage projects. | **{dotted-circle}** No |
-| [Atlassian Bamboo CI](bamboo.md) | Run CI/CD pipelines with Atlassian Bamboo. | **{check-circle}** Yes |
-| [Bugzilla](bugzilla.md) | Use Bugzilla as the issue tracker. | **{dotted-circle}** No |
-| Buildkite | Run CI/CD pipelines with Buildkite. | **{check-circle}** Yes |
-| Campfire | Connect to chat. | **{dotted-circle}** No |
-| [Confluence Workspace](../../../api/integrations.md#confluence-integration) | Replace the link to the internal wiki with a link to a Confluence Cloud Workspace. | **{dotted-circle}** No |
-| [Custom issue tracker](custom_issue_tracker.md) | Use a custom issue tracker. | **{dotted-circle}** No |
-| [Datadog](../../../integration/datadog.md) | Trace your GitLab pipelines with Datadog. | **{check-circle}** Yes |
-| [Discord Notifications](discord_notifications.md) | Send notifications about project events to a Discord channel. | **{dotted-circle}** No |
-| Drone CI | Run CI/CD pipelines with Drone. | **{check-circle}** Yes |
-| [Emails on push](emails_on_push.md) | Send commits and diff of each push by email. | **{dotted-circle}** No |
-| [EWM](ewm.md) | Use IBM Engineering Workflow Management as the issue tracker. | **{dotted-circle}** No |
-| [External wiki](../wiki/index.md#link-an-external-wiki) | Link an external wiki. | **{dotted-circle}** No |
-| [Flowdock](../../../api/integrations.md#flowdock) | Send notifications from GitLab to Flowdock flows. | **{dotted-circle}** No |
-| [GitHub](github.md) | Obtain statuses for commits and pull requests. | **{dotted-circle}** No |
-| [Google Chat](hangouts_chat.md) | Send notifications from your GitLab project to a room in Google Chat.| **{dotted-circle}** No |
-| [Harbor](harbor.md) | Use Harbor as the container registry. | **{dotted-circle}** No |
-| [irker (IRC gateway)](irker.md) | Send IRC messages. | **{dotted-circle}** No |
-| [Jenkins](../../../integration/jenkins.md) | Run CI/CD pipelines with Jenkins. | **{check-circle}** Yes |
-| JetBrains TeamCity CI | Run CI/CD pipelines with TeamCity. | **{check-circle}** Yes |
-| [Jira](../../../integration/jira/index.md) | Use Jira as the issue tracker. | **{dotted-circle}** No |
-| [Mattermost notifications](mattermost.md) | Send notifications about project events to Mattermost channels. | **{dotted-circle}** No |
-| [Mattermost slash commands](mattermost_slash_commands.md) | Perform common tasks with slash commands. | **{dotted-circle}** No |
-| [Microsoft Teams notifications](microsoft_teams.md) | Receive event notifications. | **{dotted-circle}** No |
-| Packagist | Keep your PHP dependencies updated on Packagist. | **{check-circle}** Yes |
-| [Pipelines emails](pipeline_status_emails.md) | Send the pipeline status to a list of recipients by email. | **{dotted-circle}** No |
-| [Pivotal Tracker](pivotal_tracker.md) | Add commit messages as comments to Pivotal Tracker stories. | **{dotted-circle}** No |
-| [Prometheus](prometheus.md) | Monitor application metrics. | **{dotted-circle}** No |
-| Pushover | Get real-time notifications on your device. | **{dotted-circle}** No |
-| [Redmine](redmine.md) | Use Redmine as the issue tracker. | **{dotted-circle}** No |
-| [Slack application](gitlab_slack_application.md) | Use Slack's official GitLab application. | **{dotted-circle}** No |
-| [Slack notifications](slack.md) | Send notifications about project events to Slack. | **{dotted-circle}** No |
-| [Slack slash commands](slack_slash_commands.md) | Enable slash commands in workspace. | **{dotted-circle}** No |
-| [Unify Circuit](unify_circuit.md) | Send notifications about project events to Unify Circuit. | **{dotted-circle}** No |
-| [Webex Teams](webex_teams.md) | Receive events notifications. | **{dotted-circle}** No |
-| [YouTrack](youtrack.md) | Use YouTrack as the issue tracker. | **{dotted-circle}** No |
-| [ZenTao](zentao.md) | Use ZenTao as the issue tracker. | **{dotted-circle}** No |
-
-## Push hooks limit
-
-> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/17874) in GitLab 12.4.
-
-If a single push includes changes to more than three branches or tags, integrations
-supported by `push_hooks` and `tag_push_hooks` events aren't executed.
-
-The number of branches or tags supported can be changed via
-[`push_event_hooks_limit` application setting](../../../api/settings.md#list-of-settings-that-can-be-accessed-via-api-calls).
-
-## Project integration management
-
-Project integration management lets you control integration settings across all projects
-of an instance. On the project level, administrators you can choose whether to inherit the
-instance configuration or provide custom settings.
-
-Read more about [Project integration management](../../admin_area/settings/project_integration_management.md).
-
-## SSL verification
-
-By default, the SSL certificate for outgoing HTTP requests is verified based on
-an internal list of Certificate Authorities. This means the certificate cannot
-be self-signed.
-
-You can turn off SSL verification in the configuration settings for [webhooks](webhooks.md#configure-a-webhook-in-gitlab)
-and some integrations.
-
-## Troubleshooting integrations
-
-Some integrations use hooks for integration with external applications. To confirm which ones use integration hooks, see the [integrations listing](#integrations-listing) above. Learn more about [troubleshooting integration hooks](webhooks.md#troubleshoot-webhooks).
-
-### Uninitialized repositories
-
-Some integrations fail with an error `Test Failed. Save Anyway` when you attempt to set them up on
-uninitialized repositories. Some integrations use push data to build the test payload,
-and this error occurs when no push events exist in the project yet.
-
-To resolve this error, initialize the repository by pushing a test file to the project and set up
-the integration again.
-
-## Contributing to integrations
-
-Because GitLab is open source we can ship with the code and tests for all
-plugins. This allows the community to keep the plugins up to date so that they
-always work in newer GitLab versions.
-
-For an overview of what integrations are available, please see the
-[integrations source directory](https://gitlab.com/gitlab-org/gitlab/-/tree/master/app/models/integrations).
-
-Contributions are welcome!
+<!-- This redirect file can be deleted after 2022-07-20. -->
+<!-- Redirects that point to other docs in the same project expire in three months. -->
+<!-- Redirects that point to docs in a different project or site (for example, link is not relative and starts with `https:`) expire in one year. -->
+<!-- Before deletion, see: https://docs.gitlab.com/ee/development/documentation/redirects.html -->
diff --git a/doc/user/project/integrations/webhooks.md b/doc/user/project/integrations/webhooks.md
index f4f5b3f545b..ac7d447961c 100644
--- a/doc/user/project/integrations/webhooks.md
+++ b/doc/user/project/integrations/webhooks.md
@@ -57,7 +57,7 @@ You can configure a webhook for a group or a project.
The URL must be percent-encoded if it contains one or more special characters.
1. In **Secret token**, enter the [secret token](#validate-payloads-by-using-a-secret-token) to validate payloads.
1. In the **Trigger** section, select the [events](webhook_events.md) to trigger the webhook.
-1. Optional. Clear the **Enable SSL verification** checkbox to disable [SSL verification](overview.md#ssl-verification).
+1. Optional. Clear the **Enable SSL verification** checkbox to disable [SSL verification](index.md#manage-ssl-verification).
1. Select **Add webhook**.
## Configure your webhook receiver endpoint
@@ -244,7 +244,7 @@ To view the table:
- **Failed to connect** if it is misconfigured, and needs manual intervention to re-enable it.
- **Fails to connect** if it is temporarily disabled and will retry later.
-
+
![Badges on failing webhooks](img/failed_badges.png)
1. Select **Edit** for the webhook you want to view.
diff --git a/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md b/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md
index 256dde4fa17..7cb5b45230d 100644
--- a/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md
+++ b/doc/user/project/merge_requests/merge_when_pipeline_succeeds.md
@@ -50,7 +50,7 @@ You can prevent merge requests from being merged if:
This works for both:
- GitLab CI/CD pipelines
-- Pipelines run from an [external CI integration](../integrations/overview.md#integrations-listing)
+- Pipelines run from an [external CI integration](../integrations/index.md#available-integrations)
As a result, [disabling GitLab CI/CD pipelines](../../../ci/enable_or_disable_ci.md)
does not disable this feature, as it is possible to use pipelines from external
diff --git a/doc/user/project/repository/web_editor.md b/doc/user/project/repository/web_editor.md
index 6eed1717507..747bd690911 100644
--- a/doc/user/project/repository/web_editor.md
+++ b/doc/user/project/repository/web_editor.md
@@ -159,7 +159,7 @@ repository project, GitLab performs these actions:
- Creates a default branch.
- Commits a blank `README.md` file to it.
- Creates and redirects you to a new branch based on the issue title.
-- _If your project is [configured with a deployment service](../integrations/overview.md) like Kubernetes,_
+- _If your project is [configured with a deployment service](../integrations/index.md) like Kubernetes,_
GitLab prompts you to set up [auto deploy](../../../topics/autodevops/stages.md#auto-deploy)
by helping you create a `.gitlab-ci.yml` file.
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 4008bae92e3..52d5dc827b2 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -265,11 +265,6 @@ msgid_plural "%d groups"
msgstr[0] ""
msgstr[1] ""
-msgid "%d group selected"
-msgid_plural "%d groups selected"
-msgstr[0] ""
-msgstr[1] ""
-
msgid "%d hour"
msgid_plural "%d hours"
msgstr[0] ""
@@ -385,11 +380,6 @@ msgid_plural "%d seconds"
msgstr[0] ""
msgstr[1] ""
-msgid "%d shard selected"
-msgid_plural "%d shards selected"
-msgstr[0] ""
-msgstr[1] ""
-
msgid "%d star"
msgid_plural "%d stars"
msgstr[0] ""
@@ -784,9 +774,6 @@ msgstr ""
msgid "%{level_name} is not allowed since the fork source project has lower visibility."
msgstr ""
-msgid "%{linkStart}Learn more.%{linkEnd}"
-msgstr ""
-
msgid "%{link_start}Add a license%{link_end} that you have received from GitLab Inc."
msgstr ""
@@ -2166,6 +2153,9 @@ msgstr ""
msgid "Add approvers"
msgstr ""
+msgid "Add attention request"
+msgstr ""
+
msgid "Add bold text"
msgstr ""
@@ -2586,12 +2576,6 @@ msgstr ""
msgid "AdminDashboard|Error loading the statistics. Please try again"
msgstr ""
-msgid "AdminGeo|The URL of the primary site that is used internally by the secondary sites."
-msgstr ""
-
-msgid "AdminGeo|The URL of the secondary site that is used internally by the primary site."
-msgstr ""
-
msgid "AdminLabels|Define your default set of project labels"
msgstr ""
@@ -3723,9 +3707,6 @@ msgstr ""
msgid "Allow this key to push to this repository"
msgstr ""
-msgid "Allow this secondary site to replicate content on Object Storage"
-msgstr ""
-
msgid "Allow use of licensed EE features"
msgstr ""
@@ -5665,9 +5646,6 @@ msgstr ""
msgid "Below you will find all the groups that are public."
msgstr ""
-msgid "Beta"
-msgstr ""
-
msgid "Bi-weekly code coverage"
msgstr ""
@@ -7474,9 +7452,6 @@ msgstr ""
msgid "Choose file…"
msgstr ""
-msgid "Choose specific groups or storage shards"
-msgstr ""
-
msgid "Choose the preferred Runner and populate the AWS CFT."
msgstr ""
@@ -9649,9 +9624,6 @@ msgstr ""
msgid "Container repositories"
msgstr ""
-msgid "Container repositories synchronization concurrency limit"
-msgstr ""
-
msgid "Container repository"
msgstr ""
@@ -14841,9 +14813,6 @@ msgstr ""
msgid "Errors found on line %{line_number}: %{error_lines}. Please check if these lines have a requirement title."
msgstr ""
-msgid "Errors:"
-msgstr ""
-
msgid "Escalate this incident"
msgstr ""
@@ -15915,6 +15884,9 @@ msgstr ""
msgid "File Hooks (%{count})"
msgstr ""
+msgid "File Tree"
+msgstr ""
+
msgid "File added"
msgstr ""
@@ -15942,9 +15914,6 @@ msgstr ""
msgid "File suppressed by a .gitattributes entry or the file's encoding is unsupported."
msgstr ""
-msgid "File synchronization concurrency limit"
-msgstr ""
-
msgid "File templates"
msgstr ""
@@ -16422,6 +16391,16 @@ msgstr ""
msgid "Geo sites"
msgstr ""
+msgid "Geo|%d group selected"
+msgid_plural "%d groups selected"
+msgstr[0] ""
+msgstr[1] ""
+
+msgid "Geo|%d shard selected"
+msgid_plural "%d shards selected"
+msgstr[0] ""
+msgstr[1] ""
+
msgid "Geo|%{boldStart}N/A%{boldEnd}: Geo does not verify this component yet. See the %{linkStart}data types we plan to support%{linkEnd}."
msgstr ""
@@ -16455,6 +16434,9 @@ msgstr ""
msgid "Geo|(%{timeAgo})"
msgstr ""
+msgid "Geo|Add New Site"
+msgstr ""
+
msgid "Geo|Add site"
msgstr ""
@@ -16476,6 +16458,9 @@ msgstr ""
msgid "Geo|All projects are being scheduled for reverify"
msgstr ""
+msgid "Geo|Allow this secondary site to replicate content on Object Storage"
+msgstr ""
+
msgid "Geo|Allowed Geo IP can't be blank"
msgstr ""
@@ -16485,9 +16470,15 @@ msgstr ""
msgid "Geo|Allowed Geo IP should contain valid IP addresses"
msgstr ""
+msgid "Geo|Beta"
+msgstr ""
+
msgid "Geo|Checksummed"
msgstr ""
+msgid "Geo|Choose specific groups or storage shards"
+msgstr ""
+
msgid "Geo|Connection timeout can't be blank"
msgstr ""
@@ -16500,6 +16491,9 @@ msgstr ""
msgid "Geo|Consult Geo troubleshooting information"
msgstr ""
+msgid "Geo|Container repositories synchronization concurrency limit"
+msgstr ""
+
msgid "Geo|Could not remove tracking entry for an existing project."
msgstr ""
@@ -16521,12 +16515,21 @@ msgstr ""
msgid "Geo|Edit %{nodeType} site"
msgstr ""
+msgid "Geo|Edit Geo Site"
+msgstr ""
+
msgid "Geo|Edit your search and try again."
msgstr ""
+msgid "Geo|Errors:"
+msgstr ""
+
msgid "Geo|Failed"
msgstr ""
+msgid "Geo|File synchronization concurrency limit"
+msgstr ""
+
msgid "Geo|Filter Geo sites"
msgstr ""
@@ -16551,9 +16554,15 @@ msgstr ""
msgid "Geo|Go to the primary site"
msgstr ""
+msgid "Geo|Groups to synchronize"
+msgstr ""
+
msgid "Geo|Healthy"
msgstr ""
+msgid "Geo|If enabled, GitLab will handle Object Storage replication using Geo. %{linkStart}Learn more%{linkEnd}"
+msgstr ""
+
msgid "Geo|If you want to make changes, you must visit the primary site."
msgstr ""
@@ -16566,6 +16575,9 @@ msgstr ""
msgid "Geo|Internal URL"
msgstr ""
+msgid "Geo|Internal URL (optional)"
+msgstr ""
+
msgid "Geo|Last event ID from primary"
msgstr ""
@@ -16590,9 +16602,21 @@ msgstr ""
msgid "Geo|Learn more about Geo site statuses"
msgstr ""
+msgid "Geo|Limit the number of concurrent operations this secondary site can run in the background."
+msgstr ""
+
msgid "Geo|Make everyone on your team more productive regardless of their location. GitLab Geo creates read-only mirrors of your GitLab instance so you can reduce the time it takes to clone and fetch large repos."
msgstr ""
+msgid "Geo|Minimum interval in days"
+msgstr ""
+
+msgid "Geo|Must match with the %{codeStart}external_url%{codeEnd} in %{codeStart}/etc/gitlab/gitlab.rb%{codeEnd}."
+msgstr ""
+
+msgid "Geo|Must match with the %{codeStart}geo_node_name%{codeEnd} in %{codeStart}/etc/gitlab/gitlab.rb%{codeEnd}. %{linkStart}Learn more%{linkEnd}"
+msgstr ""
+
msgid "Geo|Never"
msgstr ""
@@ -16608,6 +16632,9 @@ msgstr ""
msgid "Geo|Not synced yet"
msgstr ""
+msgid "Geo|Nothing found…"
+msgstr ""
+
msgid "Geo|Nothing to checksum"
msgstr ""
@@ -16617,6 +16644,9 @@ msgstr ""
msgid "Geo|Nothing to verify"
msgstr ""
+msgid "Geo|Object Storage replication"
+msgstr ""
+
msgid "Geo|Offline"
msgstr ""
@@ -16629,6 +16659,9 @@ msgstr ""
msgid "Geo|Pending verification"
msgstr ""
+msgid "Geo|Primary"
+msgstr ""
+
msgid "Geo|Primary node"
msgstr ""
@@ -16650,6 +16683,9 @@ msgstr ""
msgid "Geo|Queued"
msgstr ""
+msgid "Geo|Re-verification interval"
+msgstr ""
+
msgid "Geo|Redownload"
msgstr ""
@@ -16692,6 +16728,9 @@ msgstr ""
msgid "Geo|Replication summary"
msgstr ""
+msgid "Geo|Repository synchronization concurrency limit"
+msgstr ""
+
msgid "Geo|Resync"
msgstr ""
@@ -16719,15 +16758,36 @@ msgstr ""
msgid "Geo|Review replication status, and resynchronize and reverify items with the primary site."
msgstr ""
+msgid "Geo|Secondary"
+msgstr ""
+
msgid "Geo|Secondary node"
msgstr ""
msgid "Geo|Secondary site"
msgstr ""
+msgid "Geo|Select groups to replicate"
+msgstr ""
+
+msgid "Geo|Select shards to replicate"
+msgstr ""
+
msgid "Geo|Selective (%{syncLabel})"
msgstr ""
+msgid "Geo|Selective synchronization"
+msgstr ""
+
+msgid "Geo|Set verification limit and frequency."
+msgstr ""
+
+msgid "Geo|Set what should be replicated by this secondary site."
+msgstr ""
+
+msgid "Geo|Shards to synchronize"
+msgstr ""
+
msgid "Geo|Site name can't be blank"
msgstr ""
@@ -16761,6 +16821,12 @@ msgstr ""
msgid "Geo|Synchronization status"
msgstr ""
+msgid "Geo|The URL of the primary site that is used internally by the secondary sites. %{linkStart}Learn more.%{linkEnd}"
+msgstr ""
+
+msgid "Geo|The URL of the secondary site that is used internally by the primary site. %{linkStart}Learn more.%{linkEnd}"
+msgstr ""
+
msgid "Geo|The database is currently %{db_lag} behind the primary site."
msgstr ""
@@ -16776,6 +16842,12 @@ msgstr ""
msgid "Geo|There was an error fetching the Geo Sites"
msgstr ""
+msgid "Geo|There was an error fetching the Sites's Groups"
+msgstr ""
+
+msgid "Geo|There was an error saving this Geo Site"
+msgstr ""
+
msgid "Geo|This will resync all %{replicableType}. It may take some time to complete. Are you sure you want to continue?"
msgstr ""
@@ -16791,6 +16863,9 @@ msgstr ""
msgid "Geo|Tracking entry for project (%{project_id}) was successfully removed."
msgstr ""
+msgid "Geo|Tuning settings"
+msgstr ""
+
msgid "Geo|URL can't be blank"
msgstr ""
@@ -16815,6 +16890,9 @@ msgstr ""
msgid "Geo|Verification"
msgstr ""
+msgid "Geo|Verification concurrency limit"
+msgstr ""
+
msgid "Geo|Verification failed - %{error}"
msgstr ""
@@ -18159,9 +18237,6 @@ msgstr ""
msgid "Groups are the best way to manage projects and members."
msgstr ""
-msgid "Groups to synchronize"
-msgstr ""
-
msgid "GroupsDropdown|Frequently visited"
msgstr ""
@@ -18908,9 +18983,6 @@ msgstr ""
msgid "If disabled, only administrators can configure repository mirroring."
msgstr ""
-msgid "If enabled, GitLab will handle Object Storage replication using Geo. %{linkStart}Learn more%{linkEnd}"
-msgstr ""
-
msgid "If enabled, only protected branches will be mirrored."
msgstr ""
@@ -20485,9 +20557,6 @@ msgstr ""
msgid "Internal - The project can be accessed by any logged in user except external users."
msgstr ""
-msgid "Internal URL (optional)"
-msgstr ""
-
msgid "Internal error occurred while delivering this webhook."
msgstr ""
@@ -22631,9 +22700,6 @@ msgstr ""
msgid "Limit sign in from multiple IP addresses"
msgstr ""
-msgid "Limit the number of concurrent operations this secondary site can run in the background."
-msgstr ""
-
msgid "Limit the number of inbound incident management alerts that can be sent to a project."
msgstr ""
@@ -24442,9 +24508,6 @@ msgstr ""
msgid "Minimum capacity to be available before we schedule more mirrors preemptively."
msgstr ""
-msgid "Minimum interval in days"
-msgstr ""
-
msgid "Minutes"
msgstr ""
@@ -24694,12 +24757,6 @@ msgstr ""
msgid "Multiplier to apply to polling intervals. Decimal values are supported. Defaults to 1."
msgstr ""
-msgid "Must match with the %{codeStart}external_url%{codeEnd} in %{codeStart}/etc/gitlab/gitlab.rb%{codeEnd}."
-msgstr ""
-
-msgid "Must match with the %{codeStart}geo_node_name%{codeEnd} in %{codeStart}/etc/gitlab/gitlab.rb%{codeEnd}. %{linkStart}Learn more%{linkEnd}"
-msgstr ""
-
msgid "My awesome group"
msgstr ""
@@ -25762,9 +25819,6 @@ msgstr ""
msgid "Notes|You're only seeing %{boldStart}other activity%{boldEnd} in the feed. To add a comment, switch to one of the following options."
msgstr ""
-msgid "Nothing found…"
-msgstr ""
-
msgid "Nothing to preview."
msgstr ""
@@ -25980,9 +26034,6 @@ msgstr ""
msgid "OK"
msgstr ""
-msgid "Object Storage replication"
-msgstr ""
-
msgid "Object does not exist on the server or you don't have permissions to access it"
msgstr ""
@@ -27487,6 +27538,12 @@ msgstr ""
msgid "PipelineCharts|Total:"
msgstr ""
+msgid "PipelineEditorFileTree|Configuration files added with the include keyword"
+msgstr ""
+
+msgid "PipelineEditorFileTree|When you use the include keyword to add pipeline configuration from files in the project, those files will be listed here."
+msgstr ""
+
msgid "PipelineEditorTutorial|Browse %{linkStart}CI/CD examples and templates%{linkEnd}"
msgstr ""
@@ -28561,9 +28618,6 @@ msgstr ""
msgid "Previous unresolved discussion"
msgstr ""
-msgid "Primary"
-msgstr ""
-
msgid "Primary Action"
msgstr ""
@@ -30859,9 +30913,6 @@ msgstr ""
msgid "Re-request review"
msgstr ""
-msgid "Re-verification interval"
-msgstr ""
-
msgid "Read documentation"
msgstr ""
@@ -31875,9 +31926,6 @@ msgstr ""
msgid "Repository storage"
msgstr ""
-msgid "Repository synchronization concurrency limit"
-msgstr ""
-
msgid "Repository update events"
msgstr ""
@@ -31896,9 +31944,6 @@ msgstr ""
msgid "Request a new one"
msgstr ""
-msgid "Request attention"
-msgstr ""
-
msgid "Request attention from %{users_sentence}."
msgstr ""
@@ -31908,9 +31953,6 @@ msgstr ""
msgid "Request attention from assignee(s) or reviewer(s)"
msgstr ""
-msgid "Request attention to review"
-msgstr ""
-
msgid "Request details"
msgstr ""
@@ -33245,9 +33287,6 @@ msgstr ""
msgid "Seats usage data is updated every day at 12:00pm UTC"
msgstr ""
-msgid "Secondary"
-msgstr ""
-
msgid "Secondary email:"
msgstr ""
@@ -33488,9 +33527,6 @@ msgstr ""
msgid "SecurityOrchestration|All policies"
msgstr ""
-msgid "SecurityOrchestration|All scanners find"
-msgstr ""
-
msgid "SecurityOrchestration|Allow all inbound traffic to all pods from all pods on ports 443/TCP."
msgstr ""
@@ -33500,9 +33536,21 @@ msgstr ""
msgid "SecurityOrchestration|An error occurred unassigning your security policy project"
msgstr ""
+msgid "SecurityOrchestration|An error occurred while fetching the scan result policies."
+msgstr ""
+
+msgid "SecurityOrchestration|Any scanner finds"
+msgstr ""
+
msgid "SecurityOrchestration|Choose a project"
msgstr ""
+msgid "SecurityOrchestration|Create more robust vulnerability rules and apply them to all your projects."
+msgstr ""
+
+msgid "SecurityOrchestration|Create security policy"
+msgstr ""
+
msgid "SecurityOrchestration|Description"
msgstr ""
@@ -33656,6 +33704,9 @@ msgstr ""
msgid "SecurityOrchestration|Scan to be performed on every pipeline on the %{branches}"
msgstr ""
+msgid "SecurityOrchestration|Security Approvals"
+msgstr ""
+
msgid "SecurityOrchestration|Security policy project was linked successfully"
msgstr ""
@@ -33719,6 +33770,9 @@ msgstr ""
msgid "SecurityOrchestration|View policy project"
msgstr ""
+msgid "SecurityOrchestration|You don't have any security policies yet"
+msgstr ""
+
msgid "SecurityOrchestration|a"
msgstr ""
@@ -34196,9 +34250,6 @@ msgstr ""
msgid "Select group or project"
msgstr ""
-msgid "Select groups to replicate"
-msgstr ""
-
msgid "Select health status"
msgstr ""
@@ -34241,9 +34292,6 @@ msgstr ""
msgid "Select reviewer(s)"
msgstr ""
-msgid "Select shards to replicate"
-msgstr ""
-
msgid "Select source"
msgstr ""
@@ -34292,9 +34340,6 @@ msgstr ""
msgid "Selecting a GitLab user will add a link to the GitLab user in the descriptions of issues and comments (e.g. \"By %{link_open}@johnsmith%{link_close}\"). It will also associate and/or assign these issues and comments with the selected user."
msgstr ""
-msgid "Selective synchronization"
-msgstr ""
-
msgid "Self monitoring"
msgstr ""
@@ -34691,18 +34736,12 @@ msgstr ""
msgid "Set up your project to automatically push and/or pull changes to/from another repository. Branches, tags, and commits will be synced automatically."
msgstr ""
-msgid "Set verification limit and frequency."
-msgstr ""
-
msgid "Set weight"
msgstr ""
msgid "Set weight to %{weight}."
msgstr ""
-msgid "Set what should be replicated by this secondary site."
-msgstr ""
-
msgid "SetStatusModal|An indicator appears next to your name and avatar"
msgstr ""
@@ -34801,9 +34840,6 @@ msgstr ""
msgid "SeverityWidget|There was an error while updating severity."
msgstr ""
-msgid "Shards to synchronize"
-msgstr ""
-
msgid "Share"
msgstr ""
@@ -36848,9 +36884,6 @@ msgstr ""
msgid "Synced"
msgstr ""
-msgid "Synchronization settings"
-msgstr ""
-
msgid "Synchronize LDAP"
msgstr ""
@@ -38235,9 +38268,6 @@ msgstr ""
msgid "There was an error fetching the Geo Settings"
msgstr ""
-msgid "There was an error fetching the Sites's Groups"
-msgstr ""
-
msgid "There was an error fetching the deploy freezes."
msgstr ""
@@ -38286,9 +38316,6 @@ msgstr ""
msgid "There was an error retrieving the Jira users."
msgstr ""
-msgid "There was an error saving this Geo Site"
-msgstr ""
-
msgid "There was an error saving your changes."
msgstr ""
@@ -40012,9 +40039,6 @@ msgstr ""
msgid "Tuesday"
msgstr ""
-msgid "Tuning settings"
-msgstr ""
-
msgid "Turn off"
msgstr ""
@@ -41473,9 +41497,6 @@ msgstr ""
msgid "Various settings that affect GitLab performance."
msgstr ""
-msgid "Verification concurrency limit"
-msgstr ""
-
msgid "Verification status"
msgstr ""
diff --git a/package.json b/package.json
index 8080ac4f664..cb175f823ab 100644
--- a/package.json
+++ b/package.json
@@ -109,7 +109,7 @@
"codesandbox-api": "0.0.23",
"compression-webpack-plugin": "^5.0.2",
"copy-webpack-plugin": "^6.4.1",
- "core-js": "^3.22.0",
+ "core-js": "^3.22.1",
"cron-validator": "^1.1.1",
"cronstrue": "^1.122.0",
"cropper": "^2.3.0",
diff --git a/spec/frontend/blob/sketch/index_spec.js b/spec/frontend/blob/sketch/index_spec.js
index 7424897b22c..d608a6d1f85 100644
--- a/spec/frontend/blob/sketch/index_spec.js
+++ b/spec/frontend/blob/sketch/index_spec.js
@@ -1,7 +1,17 @@
-import JSZip from 'jszip';
import SketchLoader from '~/blob/sketch';
-
-jest.mock('jszip');
+import waitForPromises from 'helpers/wait_for_promises';
+
+jest.mock('jszip', () => {
+ return {
+ loadAsync: jest.fn().mockResolvedValue({
+ files: {
+ 'previews/preview.png': {
+ async: jest.fn().mockResolvedValue('foo'),
+ },
+ },
+ }),
+ };
+});
describe('Sketch viewer', () => {
beforeEach(() => {
@@ -9,12 +19,11 @@ describe('Sketch viewer', () => {
});
describe('with error message', () => {
- beforeEach((done) => {
+ beforeEach(() => {
jest.spyOn(SketchLoader.prototype, 'getZipFile').mockImplementation(
() =>
new Promise((resolve, reject) => {
reject();
- done();
}),
);
@@ -35,26 +44,12 @@ describe('Sketch viewer', () => {
});
describe('success', () => {
- beforeEach((done) => {
- const loadAsyncMock = {
- files: {
- 'previews/preview.png': {
- async: jest.fn(),
- },
- },
- };
-
- loadAsyncMock.files['previews/preview.png'].async.mockImplementation(
- () =>
- new Promise((resolve) => {
- resolve('foo');
- done();
- }),
- );
-
+ beforeEach(() => {
jest.spyOn(SketchLoader.prototype, 'getZipFile').mockResolvedValue();
- jest.spyOn(JSZip, 'loadAsync').mockResolvedValue(loadAsyncMock);
- return new SketchLoader(document.getElementById('js-sketch-viewer'));
+ // eslint-disable-next-line no-new
+ new SketchLoader(document.getElementById('js-sketch-viewer'));
+
+ return waitForPromises();
});
it('does not render error message', () => {
diff --git a/spec/frontend/members/components/table/role_dropdown_spec.js b/spec/frontend/members/components/table/role_dropdown_spec.js
index d4d950e99ba..2f1626a7044 100644
--- a/spec/frontend/members/components/table/role_dropdown_spec.js
+++ b/spec/frontend/members/components/table/role_dropdown_spec.js
@@ -4,8 +4,6 @@ import { within } from '@testing-library/dom';
import { mount, createWrapper } from '@vue/test-utils';
import Vue, { nextTick } from 'vue';
import Vuex from 'vuex';
-import waitForPromises from 'helpers/wait_for_promises';
-import { BV_DROPDOWN_SHOW } from '~/lib/utils/constants';
import RoleDropdown from '~/members/components/table/role_dropdown.vue';
import { MEMBER_TYPES } from '~/members/constants';
import { member } from '../../mock_data';
@@ -70,13 +68,10 @@ describe('RoleDropdown', () => {
});
describe('when dropdown is open', () => {
- beforeEach((done) => {
+ beforeEach(() => {
createComponent();
- findDropdownToggle().trigger('click');
- wrapper.vm.$root.$on(BV_DROPDOWN_SHOW, () => {
- done();
- });
+ return findDropdownToggle().trigger('click');
});
it('renders all valid roles', () => {
@@ -95,14 +90,14 @@ describe('RoleDropdown', () => {
});
describe('when dropdown item is selected', () => {
- it('does nothing if the item selected was already selected', () => {
- getDropdownItemByText('Owner').trigger('click');
+ it('does nothing if the item selected was already selected', async () => {
+ await getDropdownItemByText('Owner').trigger('click');
expect(actions.updateMemberRole).not.toHaveBeenCalled();
});
- it('calls `updateMemberRole` Vuex action', () => {
- getDropdownItemByText('Developer').trigger('click');
+ it('calls `updateMemberRole` Vuex action', async () => {
+ await getDropdownItemByText('Developer').trigger('click');
expect(actions.updateMemberRole).toHaveBeenCalledWith(expect.any(Object), {
memberId: member.id,
@@ -111,21 +106,19 @@ describe('RoleDropdown', () => {
});
it('displays toast when successful', async () => {
- getDropdownItemByText('Developer').trigger('click');
+ await getDropdownItemByText('Developer').trigger('click');
- await waitForPromises();
+ await nextTick();
expect($toast.show).toHaveBeenCalledWith('Role updated successfully.');
});
it('disables dropdown while waiting for `updateMemberRole` to resolve', async () => {
- getDropdownItemByText('Developer').trigger('click');
-
- await nextTick();
+ await getDropdownItemByText('Developer').trigger('click');
expect(findDropdown().props('disabled')).toBe(true);
- await waitForPromises();
+ await nextTick();
expect(findDropdown().props('disabled')).toBe(false);
});
diff --git a/spec/frontend/pdf/index_spec.js b/spec/frontend/pdf/index_spec.js
index 1ae77a62675..2b0932493bb 100644
--- a/spec/frontend/pdf/index_spec.js
+++ b/spec/frontend/pdf/index_spec.js
@@ -14,18 +14,8 @@ const Component = Vue.extend(PDFLab);
describe('PDF component', () => {
let vm;
- const checkLoaded = (done) => {
- if (vm.loading) {
- setTimeout(() => {
- checkLoaded(done);
- }, 100);
- } else {
- done();
- }
- };
-
describe('without PDF data', () => {
- beforeEach((done) => {
+ beforeEach(() => {
vm = new Component({
propsData: {
pdf: '',
@@ -33,8 +23,6 @@ describe('PDF component', () => {
});
vm.$mount();
-
- checkLoaded(done);
});
it('does not render', () => {
@@ -43,7 +31,7 @@ describe('PDF component', () => {
});
describe('with PDF data', () => {
- beforeEach((done) => {
+ beforeEach(() => {
vm = new Component({
propsData: {
pdf,
@@ -51,8 +39,6 @@ describe('PDF component', () => {
});
vm.$mount();
-
- checkLoaded(done);
});
it('renders pdf component', () => {
diff --git a/spec/frontend/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js b/spec/frontend/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js
index e24de832d6d..cccea77a243 100644
--- a/spec/frontend/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js
+++ b/spec/frontend/pipeline_editor/components/file-nav/pipeline_editor_file_nav_spec.js
@@ -1,19 +1,52 @@
+import Vue from 'vue';
+import VueApollo from 'vue-apollo';
import { shallowMount } from '@vue/test-utils';
+import { extendedWrapper } from 'helpers/vue_test_utils_helper';
+import createMockApollo from 'helpers/mock_apollo_helper';
import BranchSwitcher from '~/pipeline_editor/components/file_nav/branch_switcher.vue';
import PipelineEditorFileNav from '~/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue';
+import getAppStatus from '~/pipeline_editor/graphql/queries/client/app_status.query.graphql';
+import { EDITOR_APP_STATUS_EMPTY, EDITOR_APP_STATUS_VALID } from '~/pipeline_editor/constants';
+
+Vue.use(VueApollo);
describe('Pipeline editor file nav', () => {
let wrapper;
- const createComponent = ({ provide = {} } = {}) => {
- wrapper = shallowMount(PipelineEditorFileNav, {
- provide: {
- ...provide,
+ const mockApollo = createMockApollo();
+
+ const createComponent = ({
+ appStatus = EDITOR_APP_STATUS_VALID,
+ isNewCiConfigFile = false,
+ pipelineEditorFileTree = false,
+ } = {}) => {
+ mockApollo.clients.defaultClient.cache.writeQuery({
+ query: getAppStatus,
+ data: {
+ app: {
+ __typename: 'PipelineEditorApp',
+ status: appStatus,
+ },
},
});
+
+ wrapper = extendedWrapper(
+ shallowMount(PipelineEditorFileNav, {
+ apolloProvider: mockApollo,
+ provide: {
+ glFeatures: {
+ pipelineEditorFileTree,
+ },
+ },
+ propsData: {
+ isNewCiConfigFile,
+ },
+ }),
+ );
};
const findBranchSwitcher = () => wrapper.findComponent(BranchSwitcher);
+ const findFileTreeBtn = () => wrapper.findByTestId('file-tree-toggle');
afterEach(() => {
wrapper.destroy();
@@ -27,5 +60,58 @@ describe('Pipeline editor file nav', () => {
it('renders the branch switcher', () => {
expect(findBranchSwitcher().exists()).toBe(true);
});
+
+ it('does not render the file tree button', () => {
+ expect(findFileTreeBtn().exists()).toBe(false);
+ });
+ });
+
+ describe('with pipelineEditorFileTree feature flag ON', () => {
+ describe('when editor is in the empty state', () => {
+ it('does not render the file tree button', () => {
+ createComponent({
+ appStatus: EDITOR_APP_STATUS_EMPTY,
+ isNewCiConfigFile: false,
+ pipelineEditorFileTree: true,
+ });
+
+ expect(findFileTreeBtn().exists()).toBe(false);
+ });
+ });
+
+ describe('when user is about to create their config file for the first time', () => {
+ it('does not render the file tree button', () => {
+ createComponent({
+ appStatus: EDITOR_APP_STATUS_VALID,
+ isNewCiConfigFile: true,
+ pipelineEditorFileTree: true,
+ });
+
+ expect(findFileTreeBtn().exists()).toBe(false);
+ });
+ });
+
+ describe('when editor has a non-empty config file open', () => {
+ beforeEach(() => {
+ createComponent({
+ appStatus: EDITOR_APP_STATUS_VALID,
+ isNewCiConfigFile: false,
+ pipelineEditorFileTree: true,
+ });
+ });
+
+ it('renders the file tree button', () => {
+ expect(findFileTreeBtn().exists()).toBe(true);
+ expect(findFileTreeBtn().props('icon')).toBe('file-tree');
+ });
+
+ it('file tree button emits toggle-file-tree event', () => {
+ expect(wrapper.emitted('toggle-file-tree')).toBe(undefined);
+
+ findFileTreeBtn().vm.$emit('click');
+
+ expect(wrapper.emitted('toggle-file-tree')).toHaveLength(1);
+ });
+ });
});
});
diff --git a/spec/frontend/pipeline_editor/components/file-tree/constants.js b/spec/frontend/pipeline_editor/components/file-tree/constants.js
new file mode 100644
index 00000000000..2f0ea978c2b
--- /dev/null
+++ b/spec/frontend/pipeline_editor/components/file-tree/constants.js
@@ -0,0 +1 @@
+export const MOCK_DEFAULT_CI_FILE = '.gitlab-ci.yml';
diff --git a/spec/frontend/pipeline_editor/components/file-tree/container_spec.js b/spec/frontend/pipeline_editor/components/file-tree/container_spec.js
new file mode 100644
index 00000000000..e449a7e5753
--- /dev/null
+++ b/spec/frontend/pipeline_editor/components/file-tree/container_spec.js
@@ -0,0 +1,56 @@
+import { nextTick } from 'vue';
+import { shallowMount } from '@vue/test-utils';
+import { GlAlert } from '@gitlab/ui';
+import PipelineEditorFileTreeContainer from '~/pipeline_editor/components/file_tree/container.vue';
+import PipelineEditorFileTreeItem from '~/pipeline_editor/components/file_tree/file_item.vue';
+import { MOCK_DEFAULT_CI_FILE } from './constants';
+
+describe('Pipeline editor file nav', () => {
+ let wrapper;
+
+ const createComponent = ({ stubs } = {}) => {
+ wrapper = shallowMount(PipelineEditorFileTreeContainer, {
+ provide: {
+ ciConfigPath: MOCK_DEFAULT_CI_FILE,
+ },
+ stubs,
+ });
+ };
+
+ const findTip = () => wrapper.findComponent(GlAlert);
+ const fileTreeItem = () => wrapper.findComponent(PipelineEditorFileTreeItem);
+
+ afterEach(() => {
+ wrapper.destroy();
+ });
+
+ describe('template', () => {
+ beforeEach(() => {
+ createComponent({ stubs: { GlAlert } });
+ });
+
+ it('renders config file as a file item', () => {
+ expect(fileTreeItem().exists()).toBe(true);
+ expect(fileTreeItem().props('fileName')).toBe(MOCK_DEFAULT_CI_FILE);
+ });
+
+ it('renders tip', () => {
+ expect(findTip().exists()).toBe(true);
+ });
+ });
+
+ describe('alert tip', () => {
+ beforeEach(() => {
+ createComponent({ stubs: { GlAlert } });
+ });
+
+ it('can dismiss the tip', async () => {
+ expect(findTip().exists()).toBe(true);
+
+ findTip().vm.$emit('dismiss');
+ await nextTick();
+
+ expect(findTip().exists()).toBe(false);
+ });
+ });
+});
diff --git a/spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js b/spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js
new file mode 100644
index 00000000000..ec496b01f9a
--- /dev/null
+++ b/spec/frontend/pipeline_editor/components/file-tree/file_item_spec.js
@@ -0,0 +1,37 @@
+import { shallowMount } from '@vue/test-utils';
+import FileIcon from '~/vue_shared/components/file_icon.vue';
+import PipelineEditorFileTreeItem from '~/pipeline_editor/components/file_tree/file_item.vue';
+import { MOCK_DEFAULT_CI_FILE } from './constants';
+
+describe('Pipeline editor file nav', () => {
+ let wrapper;
+
+ const createComponent = () => {
+ wrapper = shallowMount(PipelineEditorFileTreeItem, {
+ propsData: {
+ fileName: MOCK_DEFAULT_CI_FILE,
+ },
+ });
+ };
+
+ const fileIcon = () => wrapper.findComponent(FileIcon);
+
+ afterEach(() => {
+ wrapper.destroy();
+ });
+
+ describe('template', () => {
+ beforeEach(() => {
+ createComponent();
+ });
+
+ it('renders file icon', () => {
+ expect(fileIcon().exists()).toBe(true);
+ expect(fileIcon().props('fileName')).toBe(MOCK_DEFAULT_CI_FILE);
+ });
+
+ it('renders file name', () => {
+ expect(wrapper.text()).toBe(MOCK_DEFAULT_CI_FILE);
+ });
+ });
+});
diff --git a/spec/frontend/pipeline_editor/pipeline_editor_home_spec.js b/spec/frontend/pipeline_editor/pipeline_editor_home_spec.js
index 98e2c17967c..ed818cebcf9 100644
--- a/spec/frontend/pipeline_editor/pipeline_editor_home_spec.js
+++ b/spec/frontend/pipeline_editor/pipeline_editor_home_spec.js
@@ -6,6 +6,7 @@ import CiEditorHeader from '~/pipeline_editor/components/editor/ci_editor_header
import CommitSection from '~/pipeline_editor/components/commit/commit_section.vue';
import PipelineEditorDrawer from '~/pipeline_editor/components/drawer/pipeline_editor_drawer.vue';
import PipelineEditorFileNav from '~/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue';
+import PipelineEditorFileTree from '~/pipeline_editor/components/file_tree/container.vue';
import BranchSwitcher from '~/pipeline_editor/components/file_nav/branch_switcher.vue';
import PipelineEditorHeader from '~/pipeline_editor/components/header/pipeline_editor_header.vue';
import PipelineEditorTabs from '~/pipeline_editor/components/pipeline_editor_tabs.vue';
@@ -47,8 +48,10 @@ describe('Pipeline editor home wrapper', () => {
const findFileNav = () => wrapper.findComponent(PipelineEditorFileNav);
const findModal = () => wrapper.findComponent(GlModal);
const findPipelineEditorDrawer = () => wrapper.findComponent(PipelineEditorDrawer);
+ const findPipelineEditorFileTree = () => wrapper.findComponent(PipelineEditorFileTree);
const findPipelineEditorHeader = () => wrapper.findComponent(PipelineEditorHeader);
const findPipelineEditorTabs = () => wrapper.findComponent(PipelineEditorTabs);
+ const findFileTreeBtn = () => wrapper.findByTestId('file-tree-toggle');
const findHelpBtn = () => wrapper.findByTestId('drawer-toggle');
afterEach(() => {
@@ -230,4 +233,54 @@ describe('Pipeline editor home wrapper', () => {
expect(findPipelineEditorDrawer().props('isVisible')).toBe(false);
});
});
+
+ describe('file tree', () => {
+ const toggleFileTree = async () => {
+ findFileTreeBtn().vm.$emit('click');
+ await nextTick();
+ };
+
+ describe('with pipelineEditorFileTree feature flag OFF', () => {
+ beforeEach(() => {
+ createComponent();
+ });
+
+ it('hides the file tree', () => {
+ expect(findFileTreeBtn().exists()).toBe(false);
+ expect(findPipelineEditorFileTree().exists()).toBe(false);
+ });
+ });
+
+ describe('with pipelineEditorFileTree feature flag ON', () => {
+ beforeEach(() => {
+ createComponent({
+ glFeatures: {
+ pipelineEditorFileTree: true,
+ },
+ stubs: {
+ GlButton,
+ PipelineEditorFileNav,
+ },
+ });
+ });
+
+ it('shows button toggle', () => {
+ expect(findFileTreeBtn().exists()).toBe(true);
+ });
+
+ it('hides the file tree by default', () => {
+ expect(findPipelineEditorFileTree().exists()).toBe(false);
+ });
+
+ it('toggles the drawer on button click', async () => {
+ await toggleFileTree();
+
+ expect(findPipelineEditorFileTree().exists()).toBe(true);
+
+ await toggleFileTree();
+
+ expect(findPipelineEditorFileTree().exists()).toBe(false);
+ });
+ });
+ });
});
diff --git a/spec/frontend/repository/components/breadcrumbs_spec.js b/spec/frontend/repository/components/breadcrumbs_spec.js
index eef66045573..40b32904589 100644
--- a/spec/frontend/repository/components/breadcrumbs_spec.js
+++ b/spec/frontend/repository/components/breadcrumbs_spec.js
@@ -147,7 +147,7 @@ describe('Repository breadcrumbs component', () => {
describe('renders the new directory modal', () => {
beforeEach(() => {
- factory('/', { canEditTree: true });
+ factory('some_dir', { canEditTree: true, newDirPath: 'root/master' });
});
it('does not render the modal while loading', () => {
expect(findNewDirectoryModal().exists()).toBe(false);
@@ -161,6 +161,7 @@ describe('Repository breadcrumbs component', () => {
await nextTick();
expect(findNewDirectoryModal().exists()).toBe(true);
+ expect(findNewDirectoryModal().props('path')).toBe('root/master/some_dir');
});
});
});
diff --git a/spec/frontend/sidebar/components/attention_requested_toggle_spec.js b/spec/frontend/sidebar/components/attention_requested_toggle_spec.js
index a9ae23c1624..e3eabc6a0f6 100644
--- a/spec/frontend/sidebar/components/attention_requested_toggle_spec.js
+++ b/spec/frontend/sidebar/components/attention_requested_toggle_spec.js
@@ -96,9 +96,9 @@ describe('Attention require toggle', () => {
it.each`
type | attentionRequested | tooltip | canUpdateMergeRequest
- ${'reviewer'} | ${true} | ${AttentionRequestedToggle.i18n.removeAttentionRequested} | ${true}
- ${'reviewer'} | ${false} | ${AttentionRequestedToggle.i18n.attentionRequestedReviewer} | ${true}
- ${'assignee'} | ${false} | ${AttentionRequestedToggle.i18n.attentionRequestedAssignee} | ${true}
+ ${'reviewer'} | ${true} | ${AttentionRequestedToggle.i18n.removeAttentionRequest} | ${true}
+ ${'reviewer'} | ${false} | ${AttentionRequestedToggle.i18n.addAttentionRequest} | ${true}
+ ${'assignee'} | ${false} | ${AttentionRequestedToggle.i18n.addAttentionRequest} | ${true}
${'reviewer'} | ${true} | ${AttentionRequestedToggle.i18n.attentionRequestedNoPermission} | ${false}
${'reviewer'} | ${false} | ${AttentionRequestedToggle.i18n.noAttentionRequestedNoPermission} | ${false}
${'assignee'} | ${true} | ${AttentionRequestedToggle.i18n.attentionRequestedNoPermission} | ${false}
diff --git a/spec/frontend_integration/fly_out_nav_browser_spec.js b/spec/frontend_integration/fly_out_nav_browser_spec.js
index ef2afa20528..47f3c6a0ac2 100644
--- a/spec/frontend_integration/fly_out_nav_browser_spec.js
+++ b/spec/frontend_integration/fly_out_nav_browser_spec.js
@@ -184,19 +184,21 @@ describe('Fly out sidebar navigation', () => {
mockBoundingRects();
});
- it('shows sub-items after 0ms if no menu is open', (done) => {
+ it('shows sub-items after 0ms if no menu is open', () => {
const subItems = findSubItems();
mouseEnterTopItems(el);
expect(getHideSubItemsInterval()).toBe(0);
- setTimeout(() => {
- expect(subItems.style.display).toBe('block');
- done();
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ expect(subItems.style.display).toBe('block');
+ resolve();
+ });
});
});
- it('shows sub-items after 300ms if a menu is currently open', (done) => {
+ it('shows sub-items after 300ms if a menu is currently open', () => {
const subItems = findSubItems();
documentMouseMove({
@@ -213,10 +215,11 @@ describe('Fly out sidebar navigation', () => {
mouseEnterTopItems(el, 0);
- setTimeout(() => {
- expect(subItems.style.display).toBe('block');
-
- done();
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ expect(subItems.style.display).toBe('block');
+ resolve();
+ });
});
});
});
diff --git a/spec/initializers/00_connection_logger_spec.rb b/spec/initializers/00_connection_logger_spec.rb
new file mode 100644
index 00000000000..8b288b463c4
--- /dev/null
+++ b/spec/initializers/00_connection_logger_spec.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe ActiveRecord::ConnectionAdapters::PostgreSQLAdapter do # rubocop:disable RSpec/FilePath
+ before do
+ allow(PG).to receive(:connect)
+ end
+
+ let(:conn_params) { PG::Connection.conndefaults_hash }
+
+ context 'when warn_on_new_connection is enabled' do
+ before do
+ described_class.warn_on_new_connection = true
+ end
+
+ it 'warns on new connection' do
+ expect(ActiveSupport::Deprecation)
+ .to receive(:warn).with(/Database connection should not be called during initializers/, anything)
+
+ expect(PG).to receive(:connect).with(conn_params)
+
+ described_class.new_client(conn_params)
+ end
+ end
+
+ context 'when warn_on_new_connection is disabled' do
+ before do
+ described_class.warn_on_new_connection = false
+ end
+
+ it 'does not warn on new connection' do
+ expect(ActiveSupport::Deprecation).not_to receive(:warn)
+ expect(PG).to receive(:connect).with(conn_params)
+
+ described_class.new_client(conn_params)
+ end
+ end
+end
diff --git a/yarn.lock b/yarn.lock
index 5b20e7536e9..382eeb7d040 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3918,10 +3918,10 @@ core-js-pure@^3.0.0:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.5.tgz#c79e75f5e38dbc85a662d91eea52b8256d53b813"
integrity sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==
-core-js@^3.22.0:
- version "3.22.0"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.0.tgz#b52007870c5e091517352e833b77f0b2d2b259f3"
- integrity sha512-8h9jBweRjMiY+ORO7bdWSeWfHhLPO7whobj7Z2Bl0IDo00C228EdGgH7FE4jGumbEjzcFfkfW8bXgdkEDhnwHQ==
+core-js@^3.22.1:
+ version "3.22.1"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.1.tgz#1936e4f1da82675fe22ae10ee60ef638cd9752fd"
+ integrity sha512-l6CwCLq7XgITOQGhv1dIUmwCFoqFjyQ6zQHUCQlS0xKmb9d6OHIg8jDiEoswhaettT21BSF5qKr6kbvE+aKwxw==
core-js@~2.3.0:
version "2.3.0"