Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-02 12:08:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-02 12:08:33 +0300
commit251d3d2b234a4b449edefec4ed8dcf9bc2f8be37 (patch)
tree714806d3146ec19b556a989d589c34b2f0ef576b
parent91ef4dcc05931e8be5cfb28462656386ed1fca21 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/ci/docs.gitlab-ci.yml2
-rw-r--r--app/assets/javascripts/design_management/components/design_sidebar.vue2
-rw-r--r--app/assets/javascripts/vue_shared/components/todo_button.vue2
-rw-r--r--app/models/analytics/instance_statistics/measurement.rb2
-rw-r--r--app/models/ci/build_trace_chunk.rb16
-rw-r--r--app/serializers/test_case_entity.rb1
-rw-r--r--app/views/admin/dashboard/index.html.haml2
-rw-r--r--app/views/clusters/clusters/_advanced_settings.html.haml17
-rw-r--r--app/views/projects/environments/show.html.haml2
-rw-r--r--app/views/projects/issues/_new_branch.html.haml2
-rw-r--r--app/views/projects/settings/operations/_alert_management.html.haml2
-rw-r--r--changelogs/unreleased/233430-design-repo-in-backup.yml5
-rw-r--r--changelogs/unreleased/254721-enable-store_ci_pipeline_counts_by_status-ff-by-default.yml5
-rw-r--r--changelogs/unreleased/258203-add-api-fuzzing-plan-limits-db.yml5
-rw-r--r--changelogs/unreleased/always-show-clear-cluster-cache-button.yml5
-rw-r--r--changelogs/unreleased/expose-junit-spec-file-path.yml5
-rw-r--r--config/feature_flags/development/multiline_comments.yml6
-rw-r--r--config/feature_flags/development/store_ci_pipeline_counts_by_status.yml2
-rw-r--r--config/initializers/1_settings.rb3
-rw-r--r--db/migrate/20200930132319_add_api_fuzzing_to_plan_limits.rb9
-rw-r--r--db/schema_migrations/202009301323191
-rw-r--r--db/structure.sql3
-rw-r--r--doc/README.md2
-rw-r--r--doc/administration/auth/README.md2
-rw-r--r--doc/administration/geo/replication/multiple_servers.md2
-rw-r--r--doc/administration/index.md4
-rw-r--r--doc/administration/packages/dependency_proxy.md2
-rw-r--r--doc/administration/reference_architectures/10k_users.md4
-rw-r--r--doc/administration/reference_architectures/1k_users.md2
-rw-r--r--doc/administration/reference_architectures/25k_users.md4
-rw-r--r--doc/administration/reference_architectures/50k_users.md4
-rw-r--r--doc/administration/troubleshooting/ssl.md2
-rw-r--r--doc/ci/environments/index.md2
-rw-r--r--doc/ci/yaml/README.md4
-rw-r--r--doc/customization/welcome_message.md4
-rw-r--r--doc/user/analytics/productivity_analytics.md2
-rw-r--r--doc/user/index.md2
-rw-r--r--doc/user/project/index.md2
-rw-r--r--doc/user/project/merge_requests/test_coverage_visualization.md10
-rw-r--r--doc/user/project/pages/getting_started_part_three.md4
-rw-r--r--lib/backup/repositories.rb2
-rw-r--r--lib/tasks/gitlab/db.rake5
-rw-r--r--locale/gitlab.pot32
-rw-r--r--qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb2
-rw-r--r--spec/factories/design_management/designs.rb2
-rw-r--r--spec/features/clusters/cluster_detail_page_spec.rb12
-rw-r--r--spec/fixtures/api/schemas/entities/test_case.json1
-rw-r--r--spec/fixtures/lib/backup/design_repo.bundlebin0 -> 490 bytes
-rw-r--r--spec/frontend/design_management/components/design_todo_button_spec.js2
-rw-r--r--spec/frontend/vue_shared/components/todo_button_spec.js2
-rw-r--r--spec/lib/backup/repositories_spec.rb14
-rw-r--r--spec/models/plan_limits_spec.rb1
-rw-r--r--spec/serializers/test_case_entity_spec.rb2
-rw-r--r--spec/tasks/gitlab/backup_rake_spec.rb2
-rw-r--r--spec/tasks/gitlab/db_rake_spec.rb43
55 files changed, 225 insertions, 54 deletions
diff --git a/.gitlab/ci/docs.gitlab-ci.yml b/.gitlab/ci/docs.gitlab-ci.yml
index 0e0e156a64f..0c6b5b31ab6 100644
--- a/.gitlab/ci/docs.gitlab-ci.yml
+++ b/.gitlab/ci/docs.gitlab-ci.yml
@@ -42,7 +42,7 @@ docs lint:
extends:
- .default-retry
- .docs:rules:docs-lint
- image: "registry.gitlab.com/gitlab-org/gitlab-docs/lint:vale-2.3.4-markdownlint-0.23.2"
+ image: "registry.gitlab.com/gitlab-org/gitlab-docs/lint:vale-2.4.0-markdownlint-0.23.2"
stage: test
needs: []
script:
diff --git a/app/assets/javascripts/design_management/components/design_sidebar.vue b/app/assets/javascripts/design_management/components/design_sidebar.vue
index df425e3b96d..fecedceef32 100644
--- a/app/assets/javascripts/design_management/components/design_sidebar.vue
+++ b/app/assets/javascripts/design_management/components/design_sidebar.vue
@@ -126,7 +126,7 @@ export default {
v-if="showTodoButton"
class="gl-py-4 gl-mb-4 gl-display-flex gl-justify-content-space-between gl-align-items-center gl-border-b-1 gl-border-b-solid gl-border-b-gray-100"
>
- <span>{{ __('To-Do') }}</span>
+ <span>{{ __('To Do') }}</span>
<design-todo-button :design="design" @error="$emit('todoError', $event)" />
</div>
<h2 class="gl-font-weight-bold gl-mt-0">
diff --git a/app/assets/javascripts/vue_shared/components/todo_button.vue b/app/assets/javascripts/vue_shared/components/todo_button.vue
index debf19ccca6..a9d4f8403fa 100644
--- a/app/assets/javascripts/vue_shared/components/todo_button.vue
+++ b/app/assets/javascripts/vue_shared/components/todo_button.vue
@@ -15,7 +15,7 @@ export default {
},
computed: {
buttonLabel() {
- return this.isTodo ? __('Mark as done') : __('Add a To-Do');
+ return this.isTodo ? __('Mark as done') : __('Add a To Do');
},
},
};
diff --git a/app/models/analytics/instance_statistics/measurement.rb b/app/models/analytics/instance_statistics/measurement.rb
index c724cdf22a5..76cc1111e90 100644
--- a/app/models/analytics/instance_statistics/measurement.rb
+++ b/app/models/analytics/instance_statistics/measurement.rb
@@ -38,7 +38,7 @@ module Analytics
scope :with_identifier, -> (identifier) { where(identifier: identifier) }
def self.measurement_identifier_values
- if Feature.enabled?(:store_ci_pipeline_counts_by_status)
+ if Feature.enabled?(:store_ci_pipeline_counts_by_status, default_enabled: true)
identifiers.values
else
identifiers.values - EXPERIMENTAL_IDENTIFIERS.map { |identifier| identifiers[identifier] }
diff --git a/app/models/ci/build_trace_chunk.rb b/app/models/ci/build_trace_chunk.rb
index f18da30e092..55bcb8adaca 100644
--- a/app/models/ci/build_trace_chunk.rb
+++ b/app/models/ci/build_trace_chunk.rb
@@ -140,8 +140,7 @@ module Ci
# no chunk with higher index in the database.
#
def final?
- build.pending_state.present? &&
- build.trace_chunks.maximum(:chunk_index).to_i == chunk_index
+ build.pending_state.present? && chunks_max_index == chunk_index
end
def <=>(other)
@@ -165,7 +164,14 @@ module Ci
current_size = current_data&.bytesize.to_i
unless current_size == CHUNK_SIZE || final?
- raise FailedToPersistDataError, 'Data is not fulfilled in a bucket'
+ raise FailedToPersistDataError, <<~MSG
+ data is not fulfilled in a bucket
+
+ size: #{current_size}
+ state: #{build.pending_state.present?}
+ max: #{chunks_max_index}
+ index: #{chunk_index}
+ MSG
end
self.raw_data = nil
@@ -223,6 +229,10 @@ module Ci
self.class.get_store_class(data_store)
end
+ def chunks_max_index
+ build.trace_chunks.maximum(:chunk_index).to_i
+ end
+
def lock_params
["trace_write:#{build_id}:chunks:#{chunk_index}",
{ ttl: WRITE_LOCK_TTL,
diff --git a/app/serializers/test_case_entity.rb b/app/serializers/test_case_entity.rb
index d2e08590ef0..b44aa62ad73 100644
--- a/app/serializers/test_case_entity.rb
+++ b/app/serializers/test_case_entity.rb
@@ -6,6 +6,7 @@ class TestCaseEntity < Grape::Entity
expose :status
expose :name
expose :classname
+ expose :file
expose :execution_time
expose :system_output
expose :stack_trace
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 2f3bb19b955..b0d4a3fd8f5 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -51,7 +51,7 @@
= feature_entry(_('LDAP'),
enabled: Gitlab.config.ldap.enabled,
- doc_href: help_page_path('administration/auth/ldap'))
+ doc_href: help_page_path('administration/auth/ldap/index.md'))
= feature_entry(_('Gravatar'),
href: general_admin_application_settings_path(anchor: 'js-account-settings'),
diff --git a/app/views/clusters/clusters/_advanced_settings.html.haml b/app/views/clusters/clusters/_advanced_settings.html.haml
index 34ff1b5d758..047f77ba94b 100644
--- a/app/views/clusters/clusters/_advanced_settings.html.haml
+++ b/app/views/clusters/clusters/_advanced_settings.html.haml
@@ -26,13 +26,16 @@
= link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank'
= field.submit _('Save changes'), class: 'btn btn-success'
- - if @cluster.managed?
- .sub-section.form-group
- %h4
- = s_('ClusterIntegration|Clear cluster cache')
- %p
- = s_("ClusterIntegration|Clear the local cache of namespace and service accounts. This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts.")
- = link_to(s_('ClusterIntegration|Clear cluster cache'), clusterable.clear_cluster_cache_path(@cluster), method: :delete, class: 'btn btn-primary')
+ .sub-section.form-group
+ %h4
+ = s_('ClusterIntegration|Clear cluster cache')
+ %p
+ = s_("ClusterIntegration|Clear the local cache of namespace and service accounts.")
+ - if @cluster.managed?
+ = s_("ClusterIntegration|This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts.")
+ - else
+ = s_("ClusterIntegration|This is necessary to clear existing environment-namespace associations from clusters previously managed by GitLab.")
+ = link_to(s_('ClusterIntegration|Clear cluster cache'), clusterable.clear_cluster_cache_path(@cluster), method: :delete, class: 'btn btn-primary')
.sub-section.form-group
%h4.text-danger
diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml
index 308dcf6d7be..a774e3b61cc 100644
--- a/app/views/projects/environments/show.html.haml
+++ b/app/views/projects/environments/show.html.haml
@@ -65,7 +65,7 @@
%p.blank-state-text
= html_escape(_("Define environments in the deploy stage(s) in %{code_open}.gitlab-ci.yml%{code_close} to track deployments here.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe }
.text-center
- = link_to _("Read more"), help_page_path("ci/environments"), class: "btn btn-success"
+ = link_to _("Read more"), help_page_path("ci/environments/index.md"), class: "btn btn-success"
- else
.table-holder.gl-overflow-visible
.ci-table.environments{ role: 'grid' }
diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml
index 9bbab925f6a..aa95cecb5fe 100644
--- a/app/views/projects/issues/_new_branch.html.haml
+++ b/app/views/projects/issues/_new_branch.html.haml
@@ -43,7 +43,7 @@
%li.droplab-item-ignore.gl-ml-3.gl-mr-3.gl-mt-5
- if can_create_confidential_merge_request?
- #js-forked-project{ data: { namespace_path: @project.namespace.full_path, project_path: @project.full_path, new_fork_path: new_project_fork_path(@project), help_page_path: help_page_path('user/project/merge_requests') } }
+ #js-forked-project{ data: { namespace_path: @project.namespace.full_path, project_path: @project.full_path, new_fork_path: new_project_fork_path(@project), help_page_path: help_page_path('user/project/merge_requests/index.md') } }
.form-group
%label{ for: 'new-branch-name' }
= _('Branch name')
diff --git a/app/views/projects/settings/operations/_alert_management.html.haml b/app/views/projects/settings/operations/_alert_management.html.haml
index f8f3ecb6273..5c16a5e2758 100644
--- a/app/views/projects/settings/operations/_alert_management.html.haml
+++ b/app/views/projects/settings/operations/_alert_management.html.haml
@@ -9,6 +9,6 @@
= _('Expand')
%p
= _('Display alerts from all your monitoring tools directly within GitLab.')
- = link_to _('More information'), help_page_path('user/project/operations/alert_management'), target: '_blank', rel: 'noopener noreferrer'
+ = link_to _('More information'), help_page_path('operations/incident_management/index.md'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
.js-alerts-settings{ data: alerts_settings_data }
diff --git a/changelogs/unreleased/233430-design-repo-in-backup.yml b/changelogs/unreleased/233430-design-repo-in-backup.yml
new file mode 100644
index 00000000000..e8bbd3cfb94
--- /dev/null
+++ b/changelogs/unreleased/233430-design-repo-in-backup.yml
@@ -0,0 +1,5 @@
+---
+title: Include Design Management git repositories in GitLab Backup
+merge_request: 43947
+author:
+type: fixed
diff --git a/changelogs/unreleased/254721-enable-store_ci_pipeline_counts_by_status-ff-by-default.yml b/changelogs/unreleased/254721-enable-store_ci_pipeline_counts_by_status-ff-by-default.yml
new file mode 100644
index 00000000000..e0491b10620
--- /dev/null
+++ b/changelogs/unreleased/254721-enable-store_ci_pipeline_counts_by_status-ff-by-default.yml
@@ -0,0 +1,5 @@
+---
+title: Store pipeline counts by status for instance statistics
+merge_request: 43857
+author:
+type: added
diff --git a/changelogs/unreleased/258203-add-api-fuzzing-plan-limits-db.yml b/changelogs/unreleased/258203-add-api-fuzzing-plan-limits-db.yml
new file mode 100644
index 00000000000..19695b5c384
--- /dev/null
+++ b/changelogs/unreleased/258203-add-api-fuzzing-plan-limits-db.yml
@@ -0,0 +1,5 @@
+---
+title: Add API Fuzzing plan limits db column
+merge_request: 43934
+author:
+type: added
diff --git a/changelogs/unreleased/always-show-clear-cluster-cache-button.yml b/changelogs/unreleased/always-show-clear-cluster-cache-button.yml
new file mode 100644
index 00000000000..744e226e50b
--- /dev/null
+++ b/changelogs/unreleased/always-show-clear-cluster-cache-button.yml
@@ -0,0 +1,5 @@
+---
+title: Always show the "Clear cluster cache" button among the advanced Kubernetes cluster configuration options
+merge_request: 43619
+author:
+type: changed
diff --git a/changelogs/unreleased/expose-junit-spec-file-path.yml b/changelogs/unreleased/expose-junit-spec-file-path.yml
new file mode 100644
index 00000000000..de15bae28b9
--- /dev/null
+++ b/changelogs/unreleased/expose-junit-spec-file-path.yml
@@ -0,0 +1,5 @@
+---
+title: Expose file path from XML Test Report artifact
+merge_request: 43594
+author:
+type: changed
diff --git a/config/feature_flags/development/multiline_comments.yml b/config/feature_flags/development/multiline_comments.yml
index cb80d381e18..135e5be1dc5 100644
--- a/config/feature_flags/development/multiline_comments.yml
+++ b/config/feature_flags/development/multiline_comments.yml
@@ -1,7 +1,7 @@
---
name: multiline_comments
-introduced_by_url:
-rollout_issue_url:
-group:
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/issues/211255
+rollout_issue_url:
+group: group::source code
type: development
default_enabled: true
diff --git a/config/feature_flags/development/store_ci_pipeline_counts_by_status.yml b/config/feature_flags/development/store_ci_pipeline_counts_by_status.yml
index e3239bbad03..62044bf855a 100644
--- a/config/feature_flags/development/store_ci_pipeline_counts_by_status.yml
+++ b/config/feature_flags/development/store_ci_pipeline_counts_by_status.yml
@@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43027
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/254721
type: development
group: group::analytics
-default_enabled: false
+default_enabled: true
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 8118313e859..79052e2b1dd 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -529,6 +529,9 @@ Settings.cron_jobs['member_invitation_reminder_emails_worker']['cron'] ||= '0 0
Settings.cron_jobs['member_invitation_reminder_emails_worker']['job_class'] = 'MemberInvitationReminderEmailsWorker'
Gitlab.ee do
+ Settings.cron_jobs['active_user_count_threshold_worker'] ||= Settingslogic.new({})
+ Settings.cron_jobs['active_user_count_threshold_worker']['cron'] ||= '0 12 * * *'
+ Settings.cron_jobs['active_user_count_threshold_worker']['job_class'] = 'ActiveUserCountThresholdWorker'
Settings.cron_jobs['adjourned_group_deletion_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['adjourned_group_deletion_worker']['cron'] ||= '0 3 * * *'
Settings.cron_jobs['adjourned_group_deletion_worker']['job_class'] = 'AdjournedGroupDeletionWorker'
diff --git a/db/migrate/20200930132319_add_api_fuzzing_to_plan_limits.rb b/db/migrate/20200930132319_add_api_fuzzing_to_plan_limits.rb
new file mode 100644
index 00000000000..9be79974ee4
--- /dev/null
+++ b/db/migrate/20200930132319_add_api_fuzzing_to_plan_limits.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+class AddApiFuzzingToPlanLimits < ActiveRecord::Migration[6.0]
+ DOWNTIME = false
+
+ def change
+ add_column :plan_limits, "ci_max_artifact_size_api_fuzzing", :integer, default: 0, null: false
+ end
+end
diff --git a/db/schema_migrations/20200930132319 b/db/schema_migrations/20200930132319
new file mode 100644
index 00000000000..7bffd187de2
--- /dev/null
+++ b/db/schema_migrations/20200930132319
@@ -0,0 +1 @@
+1ded640c70d5e569f0f26729c96d2dc27c528bcb045e28f073ed8fce9f918d95 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 3888896d0eb..2e50f47ca7e 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -14389,7 +14389,8 @@ CREATE TABLE plan_limits (
generic_packages_max_file_size bigint DEFAULT '5368709120'::bigint NOT NULL,
project_feature_flags integer DEFAULT 200 NOT NULL,
golang_max_file_size bigint DEFAULT 104857600 NOT NULL,
- debian_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL
+ debian_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL,
+ ci_max_artifact_size_api_fuzzing integer DEFAULT 0 NOT NULL
);
CREATE SEQUENCE plan_limits_id_seq
diff --git a/doc/README.md b/doc/README.md
index 43311451f06..03ecbef56ea 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -92,7 +92,7 @@ The following documentation relates to the DevOps **Manage** stage:
| Manage topics | Description |
|:--------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Authentication and<br/>Authorization](administration/auth/README.md) **(CORE ONLY)** | Supported authentication and authorization providers. |
-| [GitLab Value Stream Analytics](user/project/cycle_analytics.md) | Measure the time it takes to go from an [idea to production](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#from-idea-to-production-with-gitlab) for each project you have. |
+| [GitLab Value Stream Analytics](user/analytics/value_stream_analytics.md) | Measure the time it takes to go from an [idea to production](https://about.gitlab.com/blog/2016/08/05/continuous-integration-delivery-and-deployment-with-gitlab/#from-idea-to-production-with-gitlab) for each project you have. |
| [Instance-level Analytics](user/admin_area/analytics/index.md) | Discover statistics on how many GitLab features you use and user activity. |
<div align="right">
diff --git a/doc/administration/auth/README.md b/doc/administration/auth/README.md
index 926a4abab7d..cf82454cfd2 100644
--- a/doc/administration/auth/README.md
+++ b/doc/administration/auth/README.md
@@ -18,7 +18,7 @@ providers:
- [Azure](../../integration/azure.md)
- [Bitbucket Cloud](../../integration/bitbucket.md)
- [CAS](../../integration/cas.md)
-- [Crowd](../../integration/crowd.md)
+- [Crowd](crowd.md)
- [Facebook](../../integration/facebook.md)
- [GitHub](../../integration/github.md)
- [GitLab.com](../../integration/gitlab.md)
diff --git a/doc/administration/geo/replication/multiple_servers.md b/doc/administration/geo/replication/multiple_servers.md
index cba41c375a3..9828c52ee7d 100644
--- a/doc/administration/geo/replication/multiple_servers.md
+++ b/doc/administration/geo/replication/multiple_servers.md
@@ -133,7 +133,7 @@ Configure the following services, again using the non-Geo multi-node
documentation:
- [Configuring Redis for GitLab](../../redis/replication_and_failover.md#example-configuration-for-the-gitlab-application) for multiple nodes.
-- [Gitaly](../../high_availability/gitaly.md), which will store data that is
+- [Gitaly](../../gitaly/index.md), which will store data that is
synchronized from the **primary** node.
NOTE: **Note:**
diff --git a/doc/administration/index.md b/doc/administration/index.md
index d8414544d88..076658ead0e 100644
--- a/doc/administration/index.md
+++ b/doc/administration/index.md
@@ -55,7 +55,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
- [Environment variables](environment_variables.md): Supported environment
variables that can be used to override their default values to configure
GitLab.
-- [Plugins](plugins.md): With custom plugins, GitLab administrators can introduce custom integrations without modifying GitLab's source code.
+- [Plugins](file_hooks.md): With custom plugins, GitLab administrators can introduce custom integrations without modifying GitLab's source code.
- [Enforcing Terms of Service](../user/admin_area/settings/terms.md)
- [Third party offers](../user/admin_area/settings/third_party_offers.md)
- [Compliance](compliance.md): A collection of features from across the application that you may configure to help ensure that your GitLab instance and DevOps workflow meet compliance standards.
@@ -115,7 +115,7 @@ Learn how to install, configure, update, and maintain your GitLab instance.
- [Kerberos authentication](../integration/kerberos.md) **(STARTER ONLY)**
- See also other [authentication](../topics/authentication/index.md#gitlab-administrators) topics (for example, enforcing 2FA).
- [Email users](../tools/email.md): Email GitLab users from within GitLab. **(STARTER ONLY)**
-- [User Cohorts](../user/admin_area/user_cohorts.md): Display the monthly cohorts of new users and their activities over time.
+- [User Cohorts](../user/admin_area/analytics/user_cohorts.md): Display the monthly cohorts of new users and their activities over time.
- [Audit logs and events](audit_events.md): View the changes made within the GitLab server for:
- Groups and projects. **(STARTER)**
- Instances. **(PREMIUM ONLY)**
diff --git a/doc/administration/packages/dependency_proxy.md b/doc/administration/packages/dependency_proxy.md
index b97978ac382..fba3d51f741 100644
--- a/doc/administration/packages/dependency_proxy.md
+++ b/doc/administration/packages/dependency_proxy.md
@@ -11,7 +11,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
GitLab can be utilized as a dependency proxy for a variety of common package managers.
This is the administration documentation. If you want to learn how to use the
-dependency proxies, see the [user guide](../../user/group/dependency_proxy/index.md).
+dependency proxies, see the [user guide](../../user/packages/dependency_proxy/index.md).
## Enabling the Dependency Proxy feature
diff --git a/doc/administration/reference_architectures/10k_users.md b/doc/administration/reference_architectures/10k_users.md
index 2dabc6a73de..2f32cf9fb04 100644
--- a/doc/administration/reference_architectures/10k_users.md
+++ b/doc/administration/reference_architectures/10k_users.md
@@ -1838,7 +1838,7 @@ On each node perform the following:
1. Specify the necessary NFS mounts in `/etc/fstab`.
The exact contents of `/etc/fstab` will depend on how you chose
- to configure your NFS server. See the [NFS documentation](../high_availability/nfs.md)
+ to configure your NFS server. See the [NFS documentation](../nfs.md)
for examples and the various options.
1. Create the shared directories. These may be different depending on your NFS
@@ -2064,7 +2064,7 @@ advanced code search across your entire GitLab instance.
are recommended over NFS wherever possible for improved performance. If you intend
to use GitLab Pages, this currently [requires NFS](troubleshooting.md#gitlab-pages-requires-nfs).
-See how to [configure NFS](../high_availability/nfs.md).
+See how to [configure NFS](../nfs.md).
<div align="right">
<a type="button" class="btn btn-default" href="#setup-components">
diff --git a/doc/administration/reference_architectures/1k_users.md b/doc/administration/reference_architectures/1k_users.md
index 8955ff1e459..f54a25b7a9b 100644
--- a/doc/administration/reference_architectures/1k_users.md
+++ b/doc/administration/reference_architectures/1k_users.md
@@ -45,7 +45,7 @@ For this default reference architecture, to install GitLab use the standard
NOTE: **Note:**
You can also optionally configure GitLab to use an
[external PostgreSQL service](../postgresql/external.md) or an
-[external object storage service](../high_availability/object_storage.md) for
+[external object storage service](../object_storage.md) for
added performance and reliability at a reduced complexity cost.
## Configure Advanced Search **(STARTER ONLY)**
diff --git a/doc/administration/reference_architectures/25k_users.md b/doc/administration/reference_architectures/25k_users.md
index 8fec26425e2..55de38645d7 100644
--- a/doc/administration/reference_architectures/25k_users.md
+++ b/doc/administration/reference_architectures/25k_users.md
@@ -1838,7 +1838,7 @@ On each node perform the following:
1. Specify the necessary NFS mounts in `/etc/fstab`.
The exact contents of `/etc/fstab` will depend on how you chose
- to configure your NFS server. See the [NFS documentation](../high_availability/nfs.md)
+ to configure your NFS server. See the [NFS documentation](../nfs.md)
for examples and the various options.
1. Create the shared directories. These may be different depending on your NFS
@@ -2064,7 +2064,7 @@ advanced code search across your entire GitLab instance.
are recommended over NFS wherever possible for improved performance. If you intend
to use GitLab Pages, this currently [requires NFS](troubleshooting.md#gitlab-pages-requires-nfs).
-See how to [configure NFS](../high_availability/nfs.md).
+See how to [configure NFS](../nfs.md).
<div align="right">
<a type="button" class="btn btn-default" href="#setup-components">
diff --git a/doc/administration/reference_architectures/50k_users.md b/doc/administration/reference_architectures/50k_users.md
index 2b1f3df7695..7ea571108fb 100644
--- a/doc/administration/reference_architectures/50k_users.md
+++ b/doc/administration/reference_architectures/50k_users.md
@@ -1838,7 +1838,7 @@ On each node perform the following:
1. Specify the necessary NFS mounts in `/etc/fstab`.
The exact contents of `/etc/fstab` will depend on how you chose
- to configure your NFS server. See the [NFS documentation](../high_availability/nfs.md)
+ to configure your NFS server. See the [NFS documentation](../nfs.md)
for examples and the various options.
1. Create the shared directories. These may be different depending on your NFS
@@ -2064,7 +2064,7 @@ advanced code search across your entire GitLab instance.
are recommended over NFS wherever possible for improved performance. If you intend
to use GitLab Pages, this currently [requires NFS](troubleshooting.md#gitlab-pages-requires-nfs).
-See how to [configure NFS](../high_availability/nfs.md).
+See how to [configure NFS](../nfs.md).
<div align="right">
<a type="button" class="btn btn-default" href="#setup-components">
diff --git a/doc/administration/troubleshooting/ssl.md b/doc/administration/troubleshooting/ssl.md
index e6c081e1eea..dc3c08b61ac 100644
--- a/doc/administration/troubleshooting/ssl.md
+++ b/doc/administration/troubleshooting/ssl.md
@@ -205,6 +205,6 @@ Some of these errors come from the Excon Ruby gem, and could be generated in cir
where GitLab is configured to initiate an HTTPS session to a remote server
that is serving just HTTP.
-One scenario is that you're using [object storage](../high_availability/object_storage.md)
+One scenario is that you're using [object storage](../object_storage.md)
which is not served under HTTPS. GitLab is misconfigured and attempts a TLS handshake,
but the object storage will respond with plain HTTP.
diff --git a/doc/ci/environments/index.md b/doc/ci/environments/index.md
index 3321ef76b7f..589607fbed8 100644
--- a/doc/ci/environments/index.md
+++ b/doc/ci/environments/index.md
@@ -290,7 +290,7 @@ Clicking the play button in any view triggers the `deploy_prod` job. The deploym
new environment named `production`.
If your environment's name is `production` (all lowercase), it's recorded in
-[Value Stream Analytics](../../user/project/cycle_analytics.md).
+[Value Stream Analytics](../../user/analytics/value_stream_analytics.md).
### Configuring dynamic environments
diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md
index b14d299f366..98ff5c22e7c 100644
--- a/doc/ci/yaml/README.md
+++ b/doc/ci/yaml/README.md
@@ -1544,8 +1544,8 @@ docker build:
# - when: never would be redundant here, this is implied any time rules are listed.
```
-Keywords such as `branches` or `refs` that are currently available for
-`only`/`except` are not yet available in `rules` as they are being individually
+Keywords such as `branches` or `refs` that are available for
+`only`/`except` are not available in `rules`. They are being individually
considered for their usage and behavior in this context. Future keyword improvements
are being discussed in our [epic for improving `rules`](https://gitlab.com/groups/gitlab-org/-/epics/2783),
where anyone can add suggestions or requests.
diff --git a/doc/customization/welcome_message.md b/doc/customization/welcome_message.md
index 45f1fed355e..9667e5e380a 100644
--- a/doc/customization/welcome_message.md
+++ b/doc/customization/welcome_message.md
@@ -1,5 +1,5 @@
---
-redirect_to: 'branded_login_page.md'
+redirect_to: '../user/admin_area/appearance.md#sign-in--sign-up-pages'
---
-This document was moved to [another location](branded_login_page.md).
+This document was moved to [another location](../user/admin_area/appearance.md#sign-in--sign-up-pages).
diff --git a/doc/user/analytics/productivity_analytics.md b/doc/user/analytics/productivity_analytics.md
index 653836de8be..290aae6395f 100644
--- a/doc/user/analytics/productivity_analytics.md
+++ b/doc/user/analytics/productivity_analytics.md
@@ -13,7 +13,7 @@ Track development velocity with Productivity Analytics.
For many companies, the development cycle is a black box and getting an estimate of how
long, on average, it takes to deliver features is an enormous endeavor.
-While [Value Stream Analytics](../project/cycle_analytics.md) focuses on the entire
+While [Value Stream Analytics](../analytics/value_stream_analytics.md) focuses on the entire
Software Development Life Cycle (SDLC) process, Productivity Analytics provides a way for Engineering Management to drill down in a systematic way to uncover patterns and causes for success or failure at an individual, project, or group level.
Productivity can slow down for many reasons ranging from degrading code base to quickly growing teams. In order to investigate, department or team leaders can start by visualizing the time it takes for merge requests to be merged.
diff --git a/doc/user/index.md b/doc/user/index.md
index dfada4b8f50..32a1c235882 100644
--- a/doc/user/index.md
+++ b/doc/user/index.md
@@ -46,7 +46,7 @@ GitLab is a Git-based platform that integrates a great number of essential tools
- Building, testing, and deploying with built-in [Continuous Integration](../ci/README.md).
- Deploying personal and professional static websites with [GitLab Pages](project/pages/index.md).
- Integrating with Docker by using [GitLab Container Registry](packages/container_registry/index.md).
-- Tracking the development lifecycle by using [GitLab Value Stream Analytics](project/cycle_analytics.md).
+- Tracking the development lifecycle by using [GitLab Value Stream Analytics](analytics/value_stream_analytics.md).
- Provide support with [Service Desk](project/service_desk.md).
- [Export issues as CSV](project/issues/csv_export.md).
diff --git a/doc/user/project/index.md b/doc/user/project/index.md
index e00d0187622..a00f93bac9c 100644
--- a/doc/user/project/index.md
+++ b/doc/user/project/index.md
@@ -96,7 +96,7 @@ When you create a project in GitLab, you'll have access to a large number of
- [Wiki](wiki/index.md): document your GitLab project in an integrated Wiki.
- [Snippets](../snippets.md): store, share and collaborate on code snippets.
-- [Value Stream Analytics](cycle_analytics.md): review your development lifecycle.
+- [Value Stream Analytics](../analytics/value_stream_analytics.md): review your development lifecycle.
- [Insights](insights/index.md): configure the Insights that matter for your projects. **(ULTIMATE)**
- [Security Dashboard](../application_security/security_dashboard/index.md): Security Dashboard. **(ULTIMATE)**
- [Syntax highlighting](highlighting.md): an alternative to customize
diff --git a/doc/user/project/merge_requests/test_coverage_visualization.md b/doc/user/project/merge_requests/test_coverage_visualization.md
index a80565c41e5..b81158c3653 100644
--- a/doc/user/project/merge_requests/test_coverage_visualization.md
+++ b/doc/user/project/merge_requests/test_coverage_visualization.md
@@ -97,7 +97,10 @@ test-jdk11:
- target/site/jacoco/jacoco.xml
coverage-jdk11:
- stage: visualize # Must be in a stage later than test-jdk11's stage. The visualize stage does not exist by default. Please define it first, or chose an existing stage like deploy.
+ # Must be in a stage later than test-jdk11's stage.
+ # The `visualize` stage does not exist by default.
+ # Please define it first, or chose an existing stage like `deploy`.
+ stage: visualize
image: haynes/jacoco2cobertura:1.0.3
script:
# convert report from jacoco to cobertura
@@ -134,7 +137,10 @@ test-jdk11:
- build/jacoco/jacoco.xml
coverage-jdk11:
- stage: visualize # Must be in a stage later than test-jdk11's stage. The visualize stage does not exist by default. Please define it first, or chose an existing stage like deploy.
+ # Must be in a stage later than test-jdk11's stage.
+ # The `visualize` stage does not exist by default.
+ # Please define it first, or chose an existing stage like `deploy`.
+ stage: visualize
image: haynes/jacoco2cobertura:1.0.3
script:
# convert report from jacoco to cobertura
diff --git a/doc/user/project/pages/getting_started_part_three.md b/doc/user/project/pages/getting_started_part_three.md
index 9bc9fe97fd3..4bf5300aa13 100644
--- a/doc/user/project/pages/getting_started_part_three.md
+++ b/doc/user/project/pages/getting_started_part_three.md
@@ -1 +1,5 @@
+---
+redirect_to: 'custom_domains_ssl_tls_certification/index.md'
+---
+
This document was moved to [another location](custom_domains_ssl_tls_certification/index.md).
diff --git a/lib/backup/repositories.rb b/lib/backup/repositories.rb
index 0c5963e55ab..6818d485862 100644
--- a/lib/backup/repositories.rb
+++ b/lib/backup/repositories.rb
@@ -45,6 +45,7 @@ module Backup
Project.find_each(batch_size: 1000) do |project|
restore_repository(project, Gitlab::GlRepository::PROJECT)
restore_repository(project, Gitlab::GlRepository::WIKI)
+ restore_repository(project, Gitlab::GlRepository::DESIGN)
end
restore_object_pools
@@ -118,6 +119,7 @@ module Backup
def dump_project(project)
backup_repository(project, Gitlab::GlRepository::PROJECT)
backup_repository(project, Gitlab::GlRepository::WIKI)
+ backup_repository(project, Gitlab::GlRepository::DESIGN)
end
def backup_repository(container, type)
diff --git a/lib/tasks/gitlab/db.rake b/lib/tasks/gitlab/db.rake
index f54f65f4f48..8a1809f9dfc 100644
--- a/lib/tasks/gitlab/db.rake
+++ b/lib/tasks/gitlab/db.rake
@@ -35,6 +35,11 @@ namespace :gitlab do
# Truncate schema_migrations to ensure migrations re-run
connection.execute('TRUNCATE schema_migrations') if connection.table_exists? 'schema_migrations'
+ # Drop any views
+ connection.views.each do |view|
+ connection.execute("DROP VIEW IF EXISTS #{connection.quote_table_name(view)} CASCADE")
+ end
+
# Drop tables with cascade to avoid dependent table errors
# PG: http://www.postgresql.org/docs/current/static/ddl-depend.html
# Add `IF EXISTS` because cascade could have already deleted a table.
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 50901e07999..f8004ba4f87 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -5520,7 +5520,7 @@ msgstr ""
msgid "ClusterIntegration|Clear cluster cache"
msgstr ""
-msgid "ClusterIntegration|Clear the local cache of namespace and service accounts. This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts."
+msgid "ClusterIntegration|Clear the local cache of namespace and service accounts."
msgstr ""
msgid "ClusterIntegration|Cluster management project (alpha)"
@@ -6219,6 +6219,12 @@ msgstr ""
msgid "ClusterIntegration|This account must have permissions to create a Kubernetes cluster in the %{link_to_container_project} specified below"
msgstr ""
+msgid "ClusterIntegration|This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts."
+msgstr ""
+
+msgid "ClusterIntegration|This is necessary to clear existing environment-namespace associations from clusters previously managed by GitLab."
+msgstr ""
+
msgid "ClusterIntegration|This option will allow you to install applications on RBAC clusters."
msgstr ""
@@ -8220,6 +8226,9 @@ msgstr ""
msgid "Days to merge"
msgstr ""
+msgid "Dear Administrator,"
+msgstr ""
+
msgid "Debug"
msgstr ""
@@ -11398,6 +11407,9 @@ msgstr ""
msgid "For more info, read the documentation."
msgstr ""
+msgid "For more information on how the number of active users is calculated, see the %{self_managed_subscriptions_doc_link} documentation."
+msgstr ""
+
msgid "For more information, go to the "
msgstr ""
@@ -11974,6 +11986,9 @@ msgstr ""
msgid "GitLab API"
msgstr ""
+msgid "GitLab Billing Team."
+msgstr ""
+
msgid "GitLab Group Runners can execute code for all the projects in this group."
msgstr ""
@@ -13286,6 +13301,9 @@ msgstr ""
msgid "If enabled, access to projects will be validated on an external service using their classification label."
msgstr ""
+msgid "If the number of active users exceeds the user limit, you will be charged for the number of %{users_over_license_link} at your next license reconciliation."
+msgstr ""
+
msgid "If there is no previous license or if the previous license has expired, some GitLab functionality will be blocked until a new, valid license is uploaded."
msgstr ""
@@ -19109,6 +19127,9 @@ msgstr ""
msgid "Please provide attributes to update"
msgstr ""
+msgid "Please reach out if you have any questions and we'll be happy to assist."
+msgstr ""
+
msgid "Please refer to %{docs_url}"
msgstr ""
@@ -25356,6 +25377,9 @@ msgstr ""
msgid "Thank you for signing up for your free trial! You will get additional instructions in your inbox shortly."
msgstr ""
+msgid "Thank you for your business."
+msgstr ""
+
msgid "Thank you for your feedback!"
msgstr ""
@@ -28743,6 +28767,9 @@ msgstr ""
msgid "We will notify %{inviter} that you declined their invitation to join GitLab. You will stop receiving reminders."
msgstr ""
+msgid "We would like to inform you that your subscription GitLab Enterprise Edition %{plan_name} is nearing its user limit. You have %{active_user_count} active users, which is almost at the user limit of %{maximum_user_count}."
+msgstr ""
+
msgid "We've found no vulnerabilities"
msgstr ""
@@ -29330,6 +29357,9 @@ msgstr ""
msgid "You can filter by 'days to merge' by clicking on the columns in the chart."
msgstr ""
+msgid "You can find more information about GitLab subscriptions in %{subscriptions_doc_link}."
+msgstr ""
+
msgid "You can generate an access token scoped to this project for each application to use the GitLab API."
msgstr ""
diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb
index ab675f517db..7844d0d7ccb 100644
--- a/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb
+++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_merge_ref_diff_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
module QA
- RSpec.describe 'Create' do
+ RSpec.describe 'Create', :requires_admin do
describe 'View merge request merge-ref diff' do
let(:merge_request) do
Resource::MergeRequest.fabricate_via_api! do |merge_request|
diff --git a/spec/factories/design_management/designs.rb b/spec/factories/design_management/designs.rb
index 66c33c9ece0..38d0545483c 100644
--- a/spec/factories/design_management/designs.rb
+++ b/spec/factories/design_management/designs.rb
@@ -75,7 +75,7 @@ FactoryBot.define do
end
# Use this trait if you want versions in a particular history, but don't
- # want to pay for gitlay calls.
+ # want to pay for gitaly calls.
trait :with_versions do
transient do
deleted { false }
diff --git a/spec/features/clusters/cluster_detail_page_spec.rb b/spec/features/clusters/cluster_detail_page_spec.rb
index 4f7f62d00a5..31d6bcda9e8 100644
--- a/spec/features/clusters/cluster_detail_page_spec.rb
+++ b/spec/features/clusters/cluster_detail_page_spec.rb
@@ -87,6 +87,7 @@ RSpec.describe 'Clusterable > Show page' do
within('#advanced-settings-section') do
expect(page).to have_content('Google Kubernetes Engine')
expect(page).to have_content('Manage your Kubernetes cluster by visiting')
+ expect_common_advanced_options
end
end
end
@@ -117,6 +118,7 @@ RSpec.describe 'Clusterable > Show page' do
within('#advanced-settings-section') do
expect(page).not_to have_content('Google Kubernetes Engine')
expect(page).not_to have_content('Manage your Kubernetes cluster by visiting')
+ expect_common_advanced_options
end
end
end
@@ -176,4 +178,14 @@ RSpec.describe 'Clusterable > Show page' do
let(:cluster) { create(:cluster, :provided_by_user, :instance) }
end
end
+
+ private
+
+ def expect_common_advanced_options
+ aggregate_failures do
+ expect(page).to have_content('Cluster management project')
+ expect(page).to have_content('Clear cluster cache')
+ expect(page).to have_content('Remove Kubernetes cluster integration')
+ end
+ end
end
diff --git a/spec/fixtures/api/schemas/entities/test_case.json b/spec/fixtures/api/schemas/entities/test_case.json
index 0dd3c5d472f..d731d7eed0a 100644
--- a/spec/fixtures/api/schemas/entities/test_case.json
+++ b/spec/fixtures/api/schemas/entities/test_case.json
@@ -8,6 +8,7 @@
"status": { "type": "string" },
"name": { "type": "string" },
"classname": { "type": "string" },
+ "file": { "type": ["string", "null"] },
"execution_time": { "type": "float" },
"system_output": { "type": ["string", "null"] },
"stack_trace": { "type": ["string", "null"] },
diff --git a/spec/fixtures/lib/backup/design_repo.bundle b/spec/fixtures/lib/backup/design_repo.bundle
new file mode 100644
index 00000000000..3ed4ad6ab8b
--- /dev/null
+++ b/spec/fixtures/lib/backup/design_repo.bundle
Binary files differ
diff --git a/spec/frontend/design_management/components/design_todo_button_spec.js b/spec/frontend/design_management/components/design_todo_button_spec.js
index 451c23f0fea..9ebc6ca26a2 100644
--- a/spec/frontend/design_management/components/design_todo_button_spec.js
+++ b/spec/frontend/design_management/components/design_todo_button_spec.js
@@ -111,7 +111,7 @@ describe('Design management design todo button', () => {
});
it('renders correct button text', () => {
- expect(wrapper.text()).toBe('Add a To-Do');
+ expect(wrapper.text()).toBe('Add a To Do');
});
describe('when clicked', () => {
diff --git a/spec/frontend/vue_shared/components/todo_button_spec.js b/spec/frontend/vue_shared/components/todo_button_spec.js
index 482b5de11f6..1f8a214d632 100644
--- a/spec/frontend/vue_shared/components/todo_button_spec.js
+++ b/spec/frontend/vue_shared/components/todo_button_spec.js
@@ -33,7 +33,7 @@ describe('Todo Button', () => {
it.each`
label | isTodo
${'Mark as done'} | ${true}
- ${'Add a To-Do'} | ${false}
+ ${'Add a To Do'} | ${false}
`('sets correct label when isTodo is $isTodo', ({ label, isTodo }) => {
createComponent({ isTodo });
diff --git a/spec/lib/backup/repositories_spec.rb b/spec/lib/backup/repositories_spec.rb
index 35df2b7f241..540c64e74ca 100644
--- a/spec/lib/backup/repositories_spec.rb
+++ b/spec/lib/backup/repositories_spec.rb
@@ -21,13 +21,15 @@ RSpec.describe Backup::Repositories do
RSpec.shared_examples 'creates repository bundles' do
specify :aggregate_failures do
- # Add data to the wiki repository, so it will be included in the dump.
+ # Add data to the wiki and design repositories, so they will be included in the dump.
create(:wiki_page, container: project)
+ create(:design, :with_file, issue: create(:issue, project: project))
subject.dump(max_concurrency: 1, max_storage_concurrency: 1)
expect(File).to exist(File.join(Gitlab.config.backup.path, 'repositories', project.disk_path + '.bundle'))
expect(File).to exist(File.join(Gitlab.config.backup.path, 'repositories', project.disk_path + '.wiki' + '.bundle'))
+ expect(File).to exist(File.join(Gitlab.config.backup.path, 'repositories', project.disk_path + '.design' + '.bundle'))
end
end
@@ -157,7 +159,8 @@ RSpec.describe Backup::Repositories do
it 'restores repositories from bundles', :aggregate_failures do
next_path_to_bundle = [
Rails.root.join('spec/fixtures/lib/backup/project_repo.bundle'),
- Rails.root.join('spec/fixtures/lib/backup/wiki_repo.bundle')
+ Rails.root.join('spec/fixtures/lib/backup/wiki_repo.bundle'),
+ Rails.root.join('spec/fixtures/lib/backup/design_repo.bundle')
].to_enum
allow_next_instance_of(described_class::BackupRestore) do |backup_restore|
@@ -170,12 +173,16 @@ RSpec.describe Backup::Repositories do
expect(collect_commit_shas.call(project.repository)).to eq(['393a7d860a5a4c3cc736d7eb00604e3472bb95ec'])
expect(collect_commit_shas.call(project.wiki.repository)).to eq(['c74b9948d0088d703ee1fafeddd9ed9add2901ea'])
+ expect(collect_commit_shas.call(project.design_repository)).to eq(['c3cd4d7bd73a51a0f22045c3a4c871c435dc959d'])
end
describe 'command failure' do
before do
expect(Project).to receive(:find_each).and_yield(project)
+ allow_next_instance_of(DesignManagement::Repository) do |repository|
+ allow(repository).to receive(:create_repository) { raise 'Fail in tests' }
+ end
allow_next_instance_of(Repository) do |repository|
allow(repository).to receive(:create_repository) { raise 'Fail in tests' }
end
@@ -214,6 +221,9 @@ RSpec.describe Backup::Repositories do
end
it 'cleans existing repositories' do
+ expect_next_instance_of(DesignManagement::Repository) do |repository|
+ expect(repository).to receive(:remove)
+ end
expect(Repository).to receive(:new).twice.and_wrap_original do |method, *original_args|
repository = method.call(*original_args)
diff --git a/spec/models/plan_limits_spec.rb b/spec/models/plan_limits_spec.rb
index bc6398de9a4..67fb11f34e0 100644
--- a/spec/models/plan_limits_spec.rb
+++ b/spec/models/plan_limits_spec.rb
@@ -199,6 +199,7 @@ RSpec.describe PlanLimits do
ci_max_artifact_size_secret_detection
ci_max_artifact_size_requirements
ci_max_artifact_size_coverage_fuzzing
+ ci_max_artifact_size_api_fuzzing
]
end
diff --git a/spec/serializers/test_case_entity_spec.rb b/spec/serializers/test_case_entity_spec.rb
index 32e9562f4c1..45e63e3feec 100644
--- a/spec/serializers/test_case_entity_spec.rb
+++ b/spec/serializers/test_case_entity_spec.rb
@@ -19,6 +19,7 @@ RSpec.describe TestCaseEntity do
expect(subject[:status]).to eq('success')
expect(subject[:name]).to eq('Test#sum when a is 1 and b is 3 returns summary')
expect(subject[:classname]).to eq('spec.test_spec')
+ expect(subject[:file]).to eq('./spec/test_spec.rb')
expect(subject[:execution_time]).to eq(1.11)
end
end
@@ -30,6 +31,7 @@ RSpec.describe TestCaseEntity do
expect(subject[:status]).to eq('failed')
expect(subject[:name]).to eq('Test#sum when a is 1 and b is 3 returns summary')
expect(subject[:classname]).to eq('spec.test_spec')
+ expect(subject[:file]).to eq('./spec/test_spec.rb')
expect(subject[:execution_time]).to eq(2.22)
end
end
diff --git a/spec/tasks/gitlab/backup_rake_spec.rb b/spec/tasks/gitlab/backup_rake_spec.rb
index a0e1322b756..212a7f74b40 100644
--- a/spec/tasks/gitlab/backup_rake_spec.rb
+++ b/spec/tasks/gitlab/backup_rake_spec.rb
@@ -326,6 +326,7 @@ RSpec.describe 'gitlab:app namespace rake task', :delete do
let!(:project_a) { create(:project, :repository) }
let!(:project_a_wiki_page) { create(:wiki_page, container: project_a) }
+ let!(:project_a_design) { create(:design, :with_file, issue: create(:issue, project: project_a)) }
let!(:project_b) { create(:project, :repository, repository_storage: 'test_second_storage') }
let!(:b_storage_dir) { File.join(test_second_storage_dir, File.dirname(project_b.disk_path)) }
@@ -341,6 +342,7 @@ RSpec.describe 'gitlab:app namespace rake task', :delete do
expect(tar_contents).to include(
"repositories/#{project_a.disk_path}.bundle",
"repositories/#{project_a.disk_path}.wiki.bundle",
+ "repositories/#{project_a.disk_path}.design.bundle",
"repositories/#{project_b.disk_path}.bundle"
)
end
diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb
index d379a6873cf..e4630aefb85 100644
--- a/spec/tasks/gitlab/db_rake_spec.rb
+++ b/spec/tasks/gitlab/db_rake_spec.rb
@@ -164,6 +164,49 @@ RSpec.describe 'gitlab:db namespace rake task' do
end
end
+ describe 'drop_tables' do
+ subject { run_rake_task('gitlab:db:drop_tables') }
+
+ let(:tables) { %w(one two) }
+ let(:views) { %w(three four) }
+ let(:connection) { ActiveRecord::Base.connection }
+
+ before do
+ allow(connection).to receive(:execute).and_return(nil)
+
+ allow(connection).to receive(:tables).and_return(tables)
+ allow(connection).to receive(:views).and_return(views)
+ end
+
+ it 'drops all tables, except schema_migrations' do
+ expect(connection).to receive(:execute).with('DROP TABLE IF EXISTS "one" CASCADE')
+ expect(connection).to receive(:execute).with('DROP TABLE IF EXISTS "two" CASCADE')
+
+ subject
+ end
+
+ it 'drops all views' do
+ expect(connection).to receive(:execute).with('DROP VIEW IF EXISTS "three" CASCADE')
+ expect(connection).to receive(:execute).with('DROP VIEW IF EXISTS "four" CASCADE')
+
+ subject
+ end
+
+ it 'truncates schema_migrations table' do
+ expect(connection).to receive(:execute).with('TRUNCATE schema_migrations')
+
+ subject
+ end
+
+ it 'drops extra schemas' do
+ Gitlab::Database::EXTRA_SCHEMAS.each do |schema|
+ expect(connection).to receive(:execute).with("DROP SCHEMA IF EXISTS \"#{schema}\"")
+ end
+
+ subject
+ end
+ end
+
describe 'reindex' do
let(:reindex) { double('reindex') }
let(:indexes) { double('indexes') }