summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 03:09:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 03:09:12 +0000
commit3591ecba91126089ebf916f9bd95fe497609920c (patch)
tree139e2f7ebdc0e11b62ad1b0e5bfbdf18a6f2ddf2
parent38c1da5195bdcaab0b20bf6303a675b9283ac476 (diff)
downloadgitlab-ce-3591ecba91126089ebf916f9bd95fe497609920c.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/models/concerns/enums/package_metadata.rb18
-rw-r--r--app/views/admin/application_settings/_localization.html.haml2
-rw-r--r--app/views/admin/applications/index.html.haml4
-rw-r--r--app/views/admin/system_info/show.html.haml8
-rw-r--r--app/views/layouts/_snowplow.html.haml7
-rw-r--r--app/views/projects/environments/show.html.haml2
-rw-r--r--app/views/projects/pages_domains/_certificate.html.haml2
-rw-r--r--config/dependency_decisions.yml4
-rw-r--r--config/feature_flags/development/explain_vulnerability_vertex.yml (renamed from config/feature_flags/development/tofa_experimentation.yml)4
-rw-r--r--data/removals/16_0/16-0-vulnerabilityFindingDismiss-mutation.yml (renamed from data/removals/16-0/16-0-vulnerabilityFindingDismiss-mutation.yml)0
-rw-r--r--db/migrate/20230503100753_add_version_format_and_data_type_to_checkpoints.rb19
-rw-r--r--db/post_migrate/20230502102832_schedule_index_to_members_on_source_and_type_and_access_level.rb13
-rw-r--r--db/post_migrate/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level.rb15
-rw-r--r--db/post_migrate/20230504010535_ensure_notes_bigint_backfill_is_finished_for_gitlab_dot_com.rb29
-rw-r--r--db/post_migrate/20230508034422_notes_bigint_create_indexes_async_for_gitlab_dot_com.rb64
-rw-r--r--db/schema_migrations/202305021028321
-rw-r--r--db/schema_migrations/202305021200211
-rw-r--r--db/schema_migrations/202305031007531
-rw-r--r--db/schema_migrations/202305040105351
-rw-r--r--db/schema_migrations/202305080344221
-rw-r--r--db/structure.sql6
-rw-r--r--doc/administration/external_pipeline_validation.md3
-rw-r--r--doc/api/deployments.md8
-rw-r--r--doc/api/epic_issues.md2
-rw-r--r--doc/api/feature_flag_user_lists.md2
-rw-r--r--doc/api/groups.md2
-rw-r--r--doc/api/projects.md24
-rw-r--r--doc/api/rest/index.md4
-rw-r--r--doc/api/templates/dockerfiles.md2
-rw-r--r--doc/ci/jobs/job_artifacts.md20
-rw-r--r--doc/ci/secrets/index.md2
-rw-r--r--doc/ci/services/index.md2
-rw-r--r--doc/development/merge_request_concepts/performance.md2
-rw-r--r--doc/operations/metrics/dashboards/default.md2
-rw-r--r--doc/topics/autodevops/upgrading_auto_deploy_dependencies.md2
-rw-r--r--doc/topics/autodevops/upgrading_postgresql.md2
-rw-r--r--doc/topics/git/lfs/index.md2
-rw-r--r--doc/update/index.md2
-rw-r--r--doc/user/admin_area/settings/security_and_compliance.md4
-rw-r--r--doc/user/application_security/api_security/api_discovery/index.md2
-rw-r--r--doc/user/application_security/container_scanning/index.md26
-rw-r--r--doc/user/compliance/compliance_report/index.md13
-rw-r--r--doc/user/group/access_and_permissions.md2
-rw-r--r--doc/user/group/manage.md4
-rw-r--r--doc/user/group/settings/group_access_tokens.md4
-rw-r--r--doc/user/okrs.md2
-rw-r--r--doc/user/packages/container_registry/index.md2
-rw-r--r--doc/user/project/description_templates.md4
-rw-r--r--doc/user/project/file_lock.md3
-rw-r--r--doc/user/project/issues/associate_zoom_meeting.md2
-rw-r--r--doc/user/project/merge_requests/approvals/rules.md6
-rw-r--r--doc/user/project/merge_requests/approvals/settings.md2
-rw-r--r--doc/user/project/merge_requests/dependencies.md2
-rw-r--r--doc/user/project/merge_requests/index.md3
-rw-r--r--doc/user/project/releases/index.md4
-rw-r--r--doc/user/project/releases/release_fields.md10
-rw-r--r--doc/user/project/repository/branches/default.md4
-rw-r--r--doc/user/project/repository/branches/index.md2
-rw-r--r--doc/user/project/repository/forking_workflow.md4
-rw-r--r--doc/user/project/settings/project_access_tokens.md4
-rw-r--r--doc/user/project/wiki/group.md2
-rw-r--r--doc/user/tasks.md2
-rw-r--r--lib/gitlab/ci/templates/Jobs/Container-Scanning.gitlab-ci.yml2
-rw-r--r--lib/gitlab/ci/templates/Jobs/Container-Scanning.latest.gitlab-ci.yml2
-rw-r--r--lib/gitlab/database/schema_validation/adapters/column_database_adapter.rb4
-rw-r--r--lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter.rb18
-rw-r--r--lib/gitlab/database/schema_validation/database.rb4
-rw-r--r--lib/gitlab/database/schema_validation/inconsistency_filter.rb43
-rw-r--r--lib/gitlab/database/schema_validation/schema_objects/column.rb2
-rw-r--r--lib/gitlab/database/schema_validation/schema_objects/table.rb2
-rw-r--r--lib/gitlab/database/schema_validation/structure_sql.rb4
-rw-r--r--lib/gitlab/tracking.rb17
-rw-r--r--lib/gitlab/tracking/standard_context.rb31
-rw-r--r--lib/tasks/gitlab/db.rake10
-rw-r--r--qa/lib/gitlab/page/group/settings/billing.rb4
-rw-r--r--spec/fixtures/structure.sql6
-rw-r--r--spec/lib/gitlab/database/schema_validation/adapters/column_database_adapter_spec.rb8
-rw-r--r--spec/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter_spec.rb55
-rw-r--r--spec/lib/gitlab/database/schema_validation/database_spec.rb2
-rw-r--r--spec/lib/gitlab/database/schema_validation/schema_objects/table_spec.rb9
-rw-r--r--spec/lib/gitlab/tracking/standard_context_spec.rb6
-rw-r--r--spec/lib/gitlab/tracking_spec.rb2
-rw-r--r--spec/migrations/20230502102832_schedule_index_to_members_on_source_and_type_and_access_level_spec.rb22
-rw-r--r--spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb22
-rw-r--r--spec/migrations/ensure_notes_bigint_backfill_is_finished_for_gitlab_dot_com_spec.rb35
-rw-r--r--spec/tasks/gitlab/db_rake_spec.rb15
-rw-r--r--workhorse/go.mod2
-rw-r--r--workhorse/go.sum4
88 files changed, 556 insertions, 173 deletions
diff --git a/app/models/concerns/enums/package_metadata.rb b/app/models/concerns/enums/package_metadata.rb
index 69108ae9cc4..3f107987ef6 100644
--- a/app/models/concerns/enums/package_metadata.rb
+++ b/app/models/concerns/enums/package_metadata.rb
@@ -22,6 +22,16 @@ module Enums
trivy: 2
}.with_indifferent_access.freeze
+ DATA_TYPES = {
+ advisories: 1,
+ licenses: 2
+ }.with_indifferent_access.freeze
+
+ VERSION_FORMATS = {
+ v1: 1,
+ v2: 2
+ }.with_indifferent_access.freeze
+
def self.purl_types
PURL_TYPES
end
@@ -33,5 +43,13 @@ module Enums
def self.advisory_sources
ADVISORY_SOURCES
end
+
+ def self.data_types
+ DATA_TYPES
+ end
+
+ def self.version_formats
+ VERSION_FORMATS
+ end
end
end
diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml
index 9ec4afec484..669c47bafba 100644
--- a/app/views/admin/application_settings/_localization.html.haml
+++ b/app/views/admin/application_settings/_localization.html.haml
@@ -20,7 +20,7 @@
= _('Default language')
= f.select :default_preferred_language, default_preferred_language_choices, {}, class: 'gl-form-select custom-select'
.form-text.text-muted
- = s_('Default language for users who are not logged in.')
+ = _('Default language for users who are not logged in.')
= f.submit _('Save changes'), pajamas_button: true
diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml
index 60aa7ae1c56..e32a50e252d 100644
--- a/app/views/admin/applications/index.html.haml
+++ b/app/views/admin/applications/index.html.haml
@@ -15,12 +15,12 @@
.gl-max-w-full.gl-m-auto
%h1.h4.gl-font-size-h-display= s_('AdminArea|No applications found')
= render Pajamas::ButtonComponent.new(href: new_admin_application_path, variant: :confirm, button_options: { data: { qa_selector: 'new_application_button' } }) do
- = s_('New application')
+ = _('New application')
- else
%hr
= render Pajamas::ButtonComponent.new(href: new_admin_application_path, variant: :confirm, button_options: { data: { qa_selector: 'new_application_button' } }) do
- = s_('New application')
+ = _('New application')
.table-responsive
%table.b-table.gl-table.gl-w-full{ role: 'table' }
diff --git a/app/views/admin/system_info/show.html.haml b/app/views/admin/system_info/show.html.haml
index 097329a027c..75d23ee3094 100644
--- a/app/views/admin/system_info/show.html.haml
+++ b/app/views/admin/system_info/show.html.haml
@@ -7,7 +7,7 @@
= c.body do
%h4
= sprite_icon('pod', size: 18, css_class: 'gl-text-gray-700')
- = s_('CPU')
+ = _('CPU')
.data
- if @cpus
%h2= _('%{cores} cores') % { cores: @cpus.length }
@@ -19,7 +19,7 @@
= c.body do
%h4
= sprite_icon('status-health', size: 18, css_class: 'gl-text-gray-700')
- = s_('Memory Usage')
+ = _('Memory Usage')
.data
- if @memory
%h2 #{number_to_human_size(@memory.active_bytes)} / #{number_to_human_size(@memory.total_bytes)}
@@ -31,7 +31,7 @@
= c.body do
%h4
= sprite_icon('clock', size: 18, css_class: 'gl-text-gray-700')
- = s_('System started')
+ = _('System started')
.data
%h2= time_ago_with_tooltip(Rails.application.config.booted_at)
.col-sm
@@ -39,7 +39,7 @@
= c.body do
%h4
= sprite_icon('disk', size: 18, css_class: 'gl-text-gray-700')
- = s_('Disk Usage')
+ = _('Disk Usage')
.data
- @disks.each do |disk|
%h2 #{number_to_human_size(disk[:bytes_used])} / #{number_to_human_size(disk[:bytes_total])}
diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml
index 2288ffa620d..399a826d611 100644
--- a/app/views/layouts/_snowplow.html.haml
+++ b/app/views/layouts/_snowplow.html.haml
@@ -8,9 +8,10 @@
gl = window.gl || {};
gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new(
- namespace: namespace,
- project: @project,
- user: current_user,
+ namespace_id: namespace&.id,
+ plan_name: namespace&.actual_plan_name,
+ project_id: @project&.id,
+ user_id: current_user&.id,
new_nav: show_super_sidebar?
).to_context.to_json.to_json}
gl.snowplowPseudonymizedPageUrl = #{masked_page_url(group: namespace, project: @project).to_json};
diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml
index 4666ee738d7..e97cae911d9 100644
--- a/app/views/projects/environments/show.html.haml
+++ b/app/views/projects/environments/show.html.haml
@@ -21,7 +21,7 @@
= 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
= render Pajamas::ButtonComponent.new(variant: :confirm, href: help_page_path("ci/environments/index.md")) do
- = s_('Read more')
+ = _('Read more')
- else
.table-holder.gl-overflow-visible
diff --git a/app/views/projects/pages_domains/_certificate.html.haml b/app/views/projects/pages_domains/_certificate.html.haml
index 3433958a397..f3bf07bb487 100644
--- a/app/views/projects/pages_domains/_certificate.html.haml
+++ b/app/views/projects/pages_domains/_certificate.html.haml
@@ -32,7 +32,7 @@
.col-sm-10.offset-sm-2
= render Pajamas::CardComponent.new(body_options: { class: 'gl-display-flex gl-align-items-center gl-justify-content-space-between gl-p-5' }) do |c|
- c.header do
- = s_('Certificate')
+ = _('Certificate')
- c.body do
%span
= domain_presenter.pages_domain.subject || _('missing')
diff --git a/config/dependency_decisions.yml b/config/dependency_decisions.yml
index 2e6bd69fa15..e74e9367304 100644
--- a/config/dependency_decisions.yml
+++ b/config/dependency_decisions.yml
@@ -378,6 +378,6 @@
- - :approve
- elkjs
- :who: John T Skarbek
- :why: https://github.com/mermaid-js/mermaid/pull/3984
- :versions: []
+ :why: https://gitlab.com/gitlab-com/legal-and-compliance/-/issues/1505
+ :versions: ["0.8.2"]
:when: 2023-04-07 09:15:33.00004000 Z
diff --git a/config/feature_flags/development/tofa_experimentation.yml b/config/feature_flags/development/explain_vulnerability_vertex.yml
index b00f1679793..f93be4fc22c 100644
--- a/config/feature_flags/development/tofa_experimentation.yml
+++ b/config/feature_flags/development/explain_vulnerability_vertex.yml
@@ -1,7 +1,7 @@
---
-name: tofa_experimentation
+name: explain_vulnerability_vertex
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/118754
-rollout_issue_url:
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/409182
milestone: '16.0'
type: development
group: group::threat insights
diff --git a/data/removals/16-0/16-0-vulnerabilityFindingDismiss-mutation.yml b/data/removals/16_0/16-0-vulnerabilityFindingDismiss-mutation.yml
index dd9de9e118b..dd9de9e118b 100644
--- a/data/removals/16-0/16-0-vulnerabilityFindingDismiss-mutation.yml
+++ b/data/removals/16_0/16-0-vulnerabilityFindingDismiss-mutation.yml
diff --git a/db/migrate/20230503100753_add_version_format_and_data_type_to_checkpoints.rb b/db/migrate/20230503100753_add_version_format_and_data_type_to_checkpoints.rb
new file mode 100644
index 00000000000..97a0541cdb5
--- /dev/null
+++ b/db/migrate/20230503100753_add_version_format_and_data_type_to_checkpoints.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddVersionFormatAndDataTypeToCheckpoints < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def up
+ add_column(:pm_checkpoints, :data_type, :integer, limit: 2, default: 1, null: false)
+ add_column(:pm_checkpoints, :version_format, :integer, limit: 2, default: 1, null: false)
+ add_index(:pm_checkpoints, [:purl_type, :data_type, :version_format], unique: true, name: :pm_checkpoints_unique_index) # rubocop:disable Migration/AddIndex
+ swap_primary_key(:pm_checkpoints, :pm_checkpoints_pkey, :pm_checkpoints_unique_index)
+ end
+
+ def down
+ add_index(:pm_checkpoints, [:purl_type], unique: true, name: :pm_checkpoints_unique_index) # rubocop:disable Migration/AddIndex
+ unswap_primary_key(:pm_checkpoints, :pm_checkpoints_pkey, :pm_checkpoints_unique_index)
+ remove_column(:pm_checkpoints, :version_format)
+ remove_column(:pm_checkpoints, :data_type)
+ end
+end
diff --git a/db/post_migrate/20230502102832_schedule_index_to_members_on_source_and_type_and_access_level.rb b/db/post_migrate/20230502102832_schedule_index_to_members_on_source_and_type_and_access_level.rb
new file mode 100644
index 00000000000..ce3f0fb8c76
--- /dev/null
+++ b/db/post_migrate/20230502102832_schedule_index_to_members_on_source_and_type_and_access_level.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class ScheduleIndexToMembersOnSourceAndTypeAndAccessLevel < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_members_on_source_and_type_and_access_level'
+
+ def up
+ prepare_async_index :members, %i[source_id source_type type access_level], name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :members, %i[source_id source_type type access_level], name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level.rb b/db/post_migrate/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level.rb
new file mode 100644
index 00000000000..06ff40cddde
--- /dev/null
+++ b/db/post_migrate/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class ScheduleIndexToProjectAuthorizationsOnProjectUserAccessLevel < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_project_authorizations_on_project_user_access_level'
+
+ disable_ddl_transaction!
+
+ def up
+ prepare_async_index :project_authorizations, %i[project_id user_id access_level], unique: true, name: INDEX_NAME
+ end
+
+ def down
+ unprepare_async_index :project_authorizations, %i[project_id user_id access_level], name: INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230504010535_ensure_notes_bigint_backfill_is_finished_for_gitlab_dot_com.rb b/db/post_migrate/20230504010535_ensure_notes_bigint_backfill_is_finished_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..b9d3dc55661
--- /dev/null
+++ b/db/post_migrate/20230504010535_ensure_notes_bigint_backfill_is_finished_for_gitlab_dot_com.rb
@@ -0,0 +1,29 @@
+# frozen_string_literal: true
+
+class EnsureNotesBigintBackfillIsFinishedForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+ disable_ddl_transaction!
+
+ def up
+ return unless should_run?
+
+ ensure_batched_background_migration_is_finished(
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'notes',
+ column_name: 'id',
+ job_arguments: [['id'], ['id_convert_to_bigint']]
+ )
+ end
+
+ def down
+ # no-op
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/post_migrate/20230508034422_notes_bigint_create_indexes_async_for_gitlab_dot_com.rb b/db/post_migrate/20230508034422_notes_bigint_create_indexes_async_for_gitlab_dot_com.rb
new file mode 100644
index 00000000000..b8e8c995713
--- /dev/null
+++ b/db/post_migrate/20230508034422_notes_bigint_create_indexes_async_for_gitlab_dot_com.rb
@@ -0,0 +1,64 @@
+# frozen_string_literal: true
+
+class NotesBigintCreateIndexesAsyncForGitlabDotCom < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::MigrationHelpers::ConvertToBigint
+
+ TABLE_NAME = 'notes'
+ PK_INDEX_NAME = 'index_notes_on_id_convert_to_bigint'
+
+ SECONDARY_INDEXES = [
+ {
+ name: :index_notes_on_author_id_created_at_id_convert_to_bigint,
+ columns: [:author_id, :created_at, :id_convert_to_bigint],
+ options: {}
+ },
+ {
+ name: :index_notes_on_id_convert_to_bigint_where_confidential,
+ columns: [:id_convert_to_bigint],
+ options: { where: 'confidential = true' }
+ },
+ {
+ name: :index_notes_on_id_convert_to_bigint_where_internal,
+ columns: [:id_convert_to_bigint],
+ options: { where: 'internal = true' }
+ },
+ {
+ name: :index_notes_on_project_id_id_convert_to_bigint_system_false,
+ columns: [:project_id, :id_convert_to_bigint],
+ options: { where: 'NOT system' }
+ },
+ {
+ name: :note_mentions_temp_index_convert_to_bigint,
+ columns: [:id_convert_to_bigint, :noteable_type],
+ options: { where: "note ~~ '%@%'::text" }
+ }
+ ]
+
+ # Indexes will be created synchronously in
+ # https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119705
+ def up
+ return unless should_run?
+
+ prepare_async_index TABLE_NAME, :id_convert_to_bigint, unique: true, name: PK_INDEX_NAME
+
+ SECONDARY_INDEXES.each do |index|
+ prepare_async_index TABLE_NAME, index[:columns], **index[:options].merge(name: index[:name])
+ end
+ end
+
+ def down
+ return unless should_run?
+
+ SECONDARY_INDEXES.each do |index|
+ unprepare_async_index TABLE_NAME, index[:columns], name: index[:name]
+ end
+
+ unprepare_async_index TABLE_NAME, :id_convert_to_bigint, name: PK_INDEX_NAME
+ end
+
+ private
+
+ def should_run?
+ com_or_dev_or_test_but_not_jh?
+ end
+end
diff --git a/db/schema_migrations/20230502102832 b/db/schema_migrations/20230502102832
new file mode 100644
index 00000000000..f82a528e5e3
--- /dev/null
+++ b/db/schema_migrations/20230502102832
@@ -0,0 +1 @@
+7543d5128ef49f1c169e30db24015cd1deae271ed20be29d34e67e6cc4ece372 \ No newline at end of file
diff --git a/db/schema_migrations/20230502120021 b/db/schema_migrations/20230502120021
new file mode 100644
index 00000000000..13d84b077b1
--- /dev/null
+++ b/db/schema_migrations/20230502120021
@@ -0,0 +1 @@
+9602256dc3cea8f0fce716ba341e364ac51e592ff6f71e51c230be2896bcfd49 \ No newline at end of file
diff --git a/db/schema_migrations/20230503100753 b/db/schema_migrations/20230503100753
new file mode 100644
index 00000000000..9dfc04b52ae
--- /dev/null
+++ b/db/schema_migrations/20230503100753
@@ -0,0 +1 @@
+2db1e083151334d1f53d3da97c66a5f9995997a1e9556bb7acd54122b6f765f6 \ No newline at end of file
diff --git a/db/schema_migrations/20230504010535 b/db/schema_migrations/20230504010535
new file mode 100644
index 00000000000..77617d38e85
--- /dev/null
+++ b/db/schema_migrations/20230504010535
@@ -0,0 +1 @@
+68d1cbddace4f53fe437d234f9a9eac2264c88ef4a34353abc11bbbbdccc63c3 \ No newline at end of file
diff --git a/db/schema_migrations/20230508034422 b/db/schema_migrations/20230508034422
new file mode 100644
index 00000000000..e4bce1f0681
--- /dev/null
+++ b/db/schema_migrations/20230508034422
@@ -0,0 +1 @@
+22359f0d7c7f08f2293a0302c36854e78cd6fdf51a555ed36303f56bfc6ee914 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index db1260e527c..512e27adb6a 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -20122,7 +20122,9 @@ CREATE TABLE pm_checkpoints (
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
purl_type smallint NOT NULL,
- chunk smallint NOT NULL
+ chunk smallint NOT NULL,
+ data_type smallint DEFAULT 1 NOT NULL,
+ version_format smallint DEFAULT 1 NOT NULL
);
CREATE TABLE pm_licenses (
@@ -27699,7 +27701,7 @@ ALTER TABLE ONLY pm_affected_packages
ADD CONSTRAINT pm_affected_packages_pkey PRIMARY KEY (id);
ALTER TABLE ONLY pm_checkpoints
- ADD CONSTRAINT pm_checkpoints_pkey PRIMARY KEY (purl_type);
+ ADD CONSTRAINT pm_checkpoints_pkey PRIMARY KEY (purl_type, data_type, version_format);
ALTER TABLE ONLY pm_licenses
ADD CONSTRAINT pm_licenses_pkey PRIMARY KEY (id);
diff --git a/doc/administration/external_pipeline_validation.md b/doc/administration/external_pipeline_validation.md
index 2dec3857f75..9d182a95fc9 100644
--- a/doc/administration/external_pipeline_validation.md
+++ b/doc/administration/external_pipeline_validation.md
@@ -160,5 +160,4 @@ required number of seconds.
}
```
-The `namespace` field is only available in [GitLab Premium](https://about.gitlab.com/pricing/)
-and higher.
+The `namespace` field is only available in [GitLab Premium and Ultimate](https://about.gitlab.com/pricing/).
diff --git a/doc/api/deployments.md b/doc/api/deployments.md
index 9cd5381da23..cbcf06e1a11 100644
--- a/doc/api/deployments.md
+++ b/doc/api/deployments.md
@@ -279,7 +279,7 @@ Example response:
}
```
-When the [unified approval setting](../ci/environments/deployment_approvals.md#unified-approval-setting) is configured, deployments created by users on GitLab Premium or higher include the `approvals` and `pending_approval_count` properties:
+When the [unified approval setting](../ci/environments/deployment_approvals.md#unified-approval-setting) is configured, deployments created by users on GitLab Premium or Ultimate include the `approvals` and `pending_approval_count` properties:
```json
{
@@ -304,7 +304,7 @@ When the [unified approval setting](../ci/environments/deployment_approvals.md#u
}
```
-When the [multiple approval rules](../ci/environments/deployment_approvals.md#multiple-approval-rules) is configured, deployments created by users on GitLab Premium or higher include the `approval_summary` property:
+When the [multiple approval rules](../ci/environments/deployment_approvals.md#multiple-approval-rules) is configured, deployments created by users on GitLab Premium or Ultimate include the `approval_summary` property:
```json
{
@@ -393,7 +393,7 @@ Example response:
}
```
-Deployments created by users on GitLab Premium or higher include the `approvals` and `pending_approval_count` properties:
+Deployments created by users on GitLab Premium or Ultimate include the `approvals` and `pending_approval_count` properties:
```json
{
@@ -447,7 +447,7 @@ Example response:
}
```
-Deployments created by users on GitLab Premium or higher include the `approvals` and `pending_approval_count` properties:
+Deployments created by users on GitLab Premium or Ultimate include the `approvals` and `pending_approval_count` properties:
```json
{
diff --git a/doc/api/epic_issues.md b/doc/api/epic_issues.md
index 9d3a32beb07..506d6d4b339 100644
--- a/doc/api/epic_issues.md
+++ b/doc/api/epic_issues.md
@@ -11,7 +11,7 @@ Every API call to the epic issues API endpoint must be authenticated.
If a user is not a member of a group and the group is private, a `GET` request on that group
results in a `404` status code.
-Epics are available only in GitLab [Premium and higher](https://about.gitlab.com/pricing/).
+Epics are available only in GitLab [Premium and Ultimate](https://about.gitlab.com/pricing/).
If the Epics feature is not available, a `403` status code is returned.
## Epic Issues pagination
diff --git a/doc/api/feature_flag_user_lists.md b/doc/api/feature_flag_user_lists.md
index ee8ec3f9595..0152ec62c7f 100644
--- a/doc/api/feature_flag_user_lists.md
+++ b/doc/api/feature_flag_user_lists.md
@@ -11,7 +11,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
API for accessing GitLab feature flag user lists.
-Users with Developer or higher [permissions](../user/permissions.md) can access the feature flag user lists API.
+Users with at least the Developer [role](../user/permissions.md) can access the feature flag user lists API.
NOTE:
`GET` requests return twenty results at a time because the API results
diff --git a/doc/api/groups.md b/doc/api/groups.md
index 25daf473bd1..6d295b50a01 100644
--- a/doc/api/groups.md
+++ b/doc/api/groups.md
@@ -1136,7 +1136,7 @@ Only available to group owners and administrators.
This endpoint:
-- On Premium and higher tiers, marks the group for deletion. The deletion happens 7 days later by default, but you can change the retention period in the [instance settings](../user/admin_area/settings/visibility_and_access_controls.md#deletion-protection).
+- On Premium and Ultimate tiers, marks the group for deletion. The deletion happens 7 days later by default, but you can change the retention period in the [instance settings](../user/admin_area/settings/visibility_and_access_controls.md#deletion-protection).
- On Free tier, removes the group immediately and queues a background job to delete all projects in the group.
- Deletes a subgroup immediately if the subgroup is marked for deletion (GitLab 15.4 and later). The endpoint does not immediately delete top-level groups.
diff --git a/doc/api/projects.md b/doc/api/projects.md
index 414cacb70ec..ca57ca76a81 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -60,7 +60,7 @@ GET /projects
| `simple` | boolean | **{dotted-circle}** No | Return only limited fields for each project. This operation is a no-op without authentication where only simple fields are returned. |
| `sort` | string | **{dotted-circle}** No | Return projects sorted in `asc` or `desc` order. Default is `desc`. |
| `starred` | boolean | **{dotted-circle}** No | Limit by projects starred by the current user. |
-| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
+| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Available only to users with at least the Reporter role. |
| `topic` | string | **{dotted-circle}** No | Comma-separated topic names. Limit results to projects that match all of given topics. See `topics` attribute. |
| `topic_id` | integer | **{dotted-circle}** No | Limit results to projects with the assigned topic given by the topic ID. |
| `visibility` | string | **{dotted-circle}** No | Limit by visibility `public`, `internal`, or `private`. |
@@ -271,11 +271,11 @@ The `tag_list` attribute has been deprecated
and is removed in API v5 in favor of the `topics` attribute.
NOTE:
-For users of [GitLab Premium or higher](https://about.gitlab.com/pricing/),
+For users of [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/),
the `marked_for_deletion_at` attribute has been deprecated, and is removed
in API v5 in favor of the `marked_for_deletion_on` attribute.
-Users of [GitLab Premium or higher](https://about.gitlab.com/pricing/)
+Users of [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/)
can also see the `approvals_before_merge` parameter:
```json
@@ -341,7 +341,7 @@ GET /users/:user_id/projects
| `simple` | boolean | **{dotted-circle}** No | Return only limited fields for each project. Without authentication, this operation is a no-op; only simple fields are returned. |
| `sort` | string | **{dotted-circle}** No | Return projects sorted in `asc` or `desc` order. Default is `desc`. |
| `starred` | boolean | **{dotted-circle}** No | Limit by projects starred by the current user. |
-| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
+| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Available only to users with at least the Reporter role. |
| `visibility` | string | **{dotted-circle}** No | Limit by visibility `public`, `internal`, or `private`. |
| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrator only)_ |
| `with_issues_enabled` | boolean | **{dotted-circle}** No | Limit by enabled issues feature. |
@@ -614,7 +614,7 @@ GET /users/:user_id/starred_projects
| `simple` | boolean | **{dotted-circle}** No | Return only limited fields for each project. Without authentication, this operation is a no-op; only simple fields are returned. |
| `sort` | string | **{dotted-circle}** No | Return projects sorted in `asc` or `desc` order. Default is `desc`. |
| `starred` | boolean | **{dotted-circle}** No | Limit by projects starred by the current user. |
-| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
+| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Available only to users with at least the Reporter role. |
| `visibility` | string | **{dotted-circle}** No | Limit by visibility `public`, `internal`, or `private`. |
| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrator only)_ |
| `with_issues_enabled` | boolean | **{dotted-circle}** No | Limit by enabled issues feature. |
@@ -864,7 +864,7 @@ GET /projects/:id
|--------------------------|----------------|------------------------|-------------|
| `id` | integer or string | **{check-circle}** Yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
| `license` | boolean | **{dotted-circle}** No | Include project license data. |
-| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
+| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Available only to users with at least the Reporter role. |
| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrators only)_ |
```json
@@ -1038,7 +1038,7 @@ NOTE:
The `tag_list` attribute has been deprecated
and is removed in API v5 in favor of the `topics` attribute.
-Users of [GitLab Premium or higher](https://about.gitlab.com/pricing/)
+Users of [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/)
can also see the `approvals_before_merge` parameter:
```json
@@ -1120,7 +1120,7 @@ target the upstream project by default.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55718) in GitLab 13.10.
-Users of [GitLab Premium or higher](https://about.gitlab.com/pricing/)
+Users of [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/)
can also see the `issues_template` and `merge_requests_template` parameters for managing
[issue and merge request description templates](../user/project/description_templates.md).
@@ -1586,7 +1586,7 @@ GET /projects/:id/forks
| `simple` | boolean | **{dotted-circle}** No | Return only limited fields for each project. Without authentication, this operation is a no-op; only simple fields are returned. |
| `sort` | string | **{dotted-circle}** No | Return projects sorted in `asc` or `desc` order. Default is `desc`. |
| `starred` | boolean | **{dotted-circle}** No | Limit by projects starred by the current user. |
-| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Only available to Reporter or higher level role members. |
+| `statistics` | boolean | **{dotted-circle}** No | Include project statistics. Available only to users with at least the Reporter role. |
| `visibility` | string | **{dotted-circle}** No | Limit by visibility `public`, `internal`, or `private`. |
| `with_custom_attributes` | boolean | **{dotted-circle}** No | Include [custom attributes](custom_attributes.md) in response. _(administrators only)_ |
| `with_issues_enabled` | boolean | **{dotted-circle}** No | Limit by enabled issues feature. |
@@ -2241,17 +2241,17 @@ This endpoint:
- Deletes a project including all associated resources (including issues and
merge requests).
- In [GitLab 12.6](https://gitlab.com/gitlab-org/gitlab/-/issues/32935) and later, on
- [Premium or higher](https://about.gitlab.com/pricing/) tiers,
+ [Premium or Ultimate](https://about.gitlab.com/pricing/) tiers,
[delayed project deletion](../user/project/settings/index.md#delayed-project-deletion)
is applied if enabled.
- From [GitLab 13.2](https://gitlab.com/gitlab-org/gitlab/-/issues/220382) on
- [Premium or higher](https://about.gitlab.com/pricing/) tiers, group
+ [Premium or Ultimate](https://about.gitlab.com/pricing/) tiers, group
administrators can [configure](../user/group/manage.md#enable-delayed-project-deletion)
projects within a group to be deleted after a delayed period. When enabled,
actual deletion happens after the number of days specified in the
[default deletion delay](../user/admin_area/settings/visibility_and_access_controls.md#deletion-protection).
- From [GitLab 15.11](https://gitlab.com/gitlab-org/gitlab/-/issues/396500) on
- [Premium or higher](https://about.gitlab.com/pricing/) tiers, deletes a project immediately if the project is already
+ [Premium or Ultimate](https://about.gitlab.com/pricing/) tiers, deletes a project immediately if the project is already
marked for deletion, and the `permanently_remove` and `full_path` parameters are passed.
WARNING:
diff --git a/doc/api/rest/index.md b/doc/api/rest/index.md
index 9365936aad8..0bee7168cfb 100644
--- a/doc/api/rest/index.md
+++ b/doc/api/rest/index.md
@@ -94,8 +94,8 @@ You can authenticate with the GitLab API in several ways:
Project access tokens are supported by:
-- Self-managed GitLab Free and higher.
-- GitLab SaaS Premium and higher.
+- Self-managed GitLab: Free, Premium, and Ultimate.
+- GitLab SaaS: Premium and Ultimate.
If you are an administrator, you or your application can authenticate as a specific user.
To do so, use:
diff --git a/doc/api/templates/dockerfiles.md b/doc/api/templates/dockerfiles.md
index 31b676558db..e9d57061510 100644
--- a/doc/api/templates/dockerfiles.md
+++ b/doc/api/templates/dockerfiles.md
@@ -14,7 +14,7 @@ in the GitLab repository.
## Override Dockerfile API templates **(PREMIUM SELF)**
-In [GitLab Premium and higher](https://about.gitlab.com/pricing/) tiers, GitLab instance
+In [GitLab Premium and Ultimate](https://about.gitlab.com/pricing/) tiers, GitLab instance
administrators can override templates in the
[Admin Area](../../user/admin_area/settings/instance_template_repository.md).
diff --git a/doc/ci/jobs/job_artifacts.md b/doc/ci/jobs/job_artifacts.md
index 0d8c9dcf715..0c9dd658ce2 100644
--- a/doc/ci/jobs/job_artifacts.md
+++ b/doc/ci/jobs/job_artifacts.md
@@ -276,6 +276,8 @@ Replace `<full-project-path>` with a valid project path, you can find it in the
WARNING:
Deleting the job log and artifacts is a destructive action that cannot be reverted. Use with caution.
+Deleting certain files, including report artifacts, job logs, and metadata files, affects
+GitLab features that use these files as data sources.
You can delete a job's artifacts and log.
@@ -288,6 +290,24 @@ To delete a job:
1. Go to a job's detail page.
1. In the upper-right corner of the job's log, select **Erase job log and artifacts** (**{remove}**).
+You can also delete individual artifacts from the [**Artifacts** page](#bulk-delete-artifacts).
+
+### Bulk delete artifacts
+
+- [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/33348) in GitLab 15.10 [with a flag](../../administration/feature_flags.md) named `ci_job_artifact_bulk_destroy`. Disabled by default.
+
+FLAG:
+On self-managed GitLab, by default this feature is not available. To make it available,
+ask an administrator to [enable the feature flag](../../administration/feature_flags.md) named `ci_job_artifact_bulk_destroy`.
+The feature is not ready for production use.
+
+You can delete multiple artifacts at the same time:
+
+1. On the top bar, select **Main menu > Projects** and find your project.
+1. On the left sidebar, select **CI/CD > Artifacts**.
+1. Select the checkboxes next to the artifacts you want to delete. You can select up to 50 artifacts.
+1. Select **Delete selected**.
+
## Link to job artifacts in the merge request UI
Use the [`artifacts:expose_as`](../yaml/index.md#artifactsexpose_as) keyword to display
diff --git a/doc/ci/secrets/index.md b/doc/ci/secrets/index.md
index 6966a6baadf..db9f36f295a 100644
--- a/doc/ci/secrets/index.md
+++ b/doc/ci/secrets/index.md
@@ -53,7 +53,7 @@ and supports multiple secrets engines.
To configure your Vault server:
-1. Ensure your Vault server is running on version 1.2.0 or higher.
+1. Ensure your Vault server is running on version 1.2.0 or later.
1. Enable the authentication method by running these commands. They provide your Vault
server the [JSON Web Key Set](https://www.rfc-editor.org/rfc/rfc7517) (JWKS) endpoint for your GitLab instance, so Vault
can fetch the public signing key and verify the JSON Web Token (JWT) when authenticating:
diff --git a/doc/ci/services/index.md b/doc/ci/services/index.md
index f0d6e795a7c..2e7e89fc601 100644
--- a/doc/ci/services/index.md
+++ b/doc/ci/services/index.md
@@ -189,7 +189,7 @@ following these rules:
- Slash (`/`) is replaced with double underscores (`__`) and the primary alias
is created.
- Slash (`/`) is replaced with a single dash (`-`) and the secondary alias is
- created (requires GitLab Runner v1.1.0 or higher).
+ created (requires GitLab Runner v1.1.0 or later).
To override the default behavior, you can
[specify a service alias](#available-settings-for-services).
diff --git a/doc/development/merge_request_concepts/performance.md b/doc/development/merge_request_concepts/performance.md
index 174307fc6a7..665b84b2c40 100644
--- a/doc/development/merge_request_concepts/performance.md
+++ b/doc/development/merge_request_concepts/performance.md
@@ -211,7 +211,7 @@ By default, this `Gitlab::SQL::CTE` class forces materialization through adding
(this behavior is implemented using a custom Arel node `Gitlab::Database::AsWithMaterialized` under the surface).
WARNING:
-Upgrading to GitLab 14.0 requires PostgreSQL 12 or higher.
+Upgrading to GitLab 14.0 requires PostgreSQL 12 or later.
## Cached Queries
diff --git a/doc/operations/metrics/dashboards/default.md b/doc/operations/metrics/dashboards/default.md
index 96c1238fd34..2ff9e558c48 100644
--- a/doc/operations/metrics/dashboards/default.md
+++ b/doc/operations/metrics/dashboards/default.md
@@ -31,7 +31,7 @@ metrics about the [deployed application](../index.md#configure-prometheus-to-gat
## Kubernetes pod health dashboard
-This dashboard requires Kubernetes v1.14 or higher, due to the
+This dashboard requires Kubernetes v1.14 or later, due to the
[change in metric labels](https://github.com/kubernetes/kubernetes/pull/69099)
in Kubernetes 1.14.
diff --git a/doc/topics/autodevops/upgrading_auto_deploy_dependencies.md b/doc/topics/autodevops/upgrading_auto_deploy_dependencies.md
index d981313b413..0c31ccbfe32 100644
--- a/doc/topics/autodevops/upgrading_auto_deploy_dependencies.md
+++ b/doc/topics/autodevops/upgrading_auto_deploy_dependencies.md
@@ -52,7 +52,7 @@ The following table explains the version compatibility between GitLab and Auto D
| GitLab version | `auto-deploy-image` version | Notes |
|------------------|-----------------------------|-------|
| v10.0 to v14.0 | v0.1.0 to v2.0.0 | v0 and v1 auto-deploy-image are backwards compatible. |
-| v13.4 and higher | v2.0.0 and higher | v2 auto-deploy-image contains breaking changes, as explained in the [upgrade guide](#upgrade-deployments-to-the-v2-auto-deploy-image). |
+| v13.4 and later | v2.0.0 and later | v2 auto-deploy-image contains breaking changes, as explained in the [upgrade guide](#upgrade-deployments-to-the-v2-auto-deploy-image). |
You can find the current stable version of auto-deploy-image in the [Auto Deploy stable template](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml).
diff --git a/doc/topics/autodevops/upgrading_postgresql.md b/doc/topics/autodevops/upgrading_postgresql.md
index 77e98d7bcaa..ffb72b802f7 100644
--- a/doc/topics/autodevops/upgrading_postgresql.md
+++ b/doc/topics/autodevops/upgrading_postgresql.md
@@ -184,7 +184,7 @@ You can also
1. Set `AUTO_DEVOPS_POSTGRES_DELETE_V1` to a non-empty value. This flag is a
safeguard to prevent accidental deletion of databases.
<!-- DO NOT REPLACE when upgrading GitLab's supported version. This is NOT related to GitLab's PostgreSQL version support, but the one deployed by Auto DevOps. -->
-1. If you have a `POSTGRES_VERSION` set, make sure it is set to `9.6.16` *or higher*. This is the
+1. If you have a `POSTGRES_VERSION` set, make sure it is set to `9.6.16` *or later*. This is the
minimum PostgreSQL version supported by Auto DevOps. See also the list of
[tags available](https://hub.docker.com/r/bitnami/postgresql/tags).
1. Set `PRODUCTION_REPLICAS` to `0`. For other environments, use
diff --git a/doc/topics/git/lfs/index.md b/doc/topics/git/lfs/index.md
index 0c2a3642509..4f0d1bfc5e6 100644
--- a/doc/topics/git/lfs/index.md
+++ b/doc/topics/git/lfs/index.md
@@ -29,7 +29,7 @@ Documentation for GitLab instance administrators is under [LFS administration do
## Prerequisites
- Git LFS must be [enabled in project settings](../../../user/project/settings/index.md#configure-project-visibility-features-and-permissions).
-- [Git LFS client](https://git-lfs.com/) version 1.0.1 or higher must be installed.
+- [Git LFS client](https://git-lfs.com/) version 1.0.1 or later must be installed.
## Known limitations
diff --git a/doc/update/index.md b/doc/update/index.md
index 2b01cf0e7e3..ed9d73ba56b 100644
--- a/doc/update/index.md
+++ b/doc/update/index.md
@@ -1538,7 +1538,7 @@ The following upgrade path also works around the bug:
1. [Ensure batched background migrations](background_migrations.md#batched-background-migrations) are complete.
1. Upgrade to an earlier GitLab 15.9 patch release that doesn't have the bug fix.
-It is not then required to upgrade to 15.9.3 or higher for this issue.
+It is not then required to upgrade to 15.9.3 or later for this issue.
[Read the issue](https://gitlab.com/gitlab-org/gitlab/-/issues/393216) for more information.
diff --git a/doc/user/admin_area/settings/security_and_compliance.md b/doc/user/admin_area/settings/security_and_compliance.md
index 13abf1027cd..f70088a8eb6 100644
--- a/doc/user/admin_area/settings/security_and_compliance.md
+++ b/doc/user/admin_area/settings/security_and_compliance.md
@@ -11,6 +11,10 @@ The settings for package metadata synchronization are located in the [Admin Area
## Choose package registry metadata to sync
+WARNING:
+The full package metadata sync can take up to 30 GB of data. Ensure you have provisioned enough disk space before enabling this feature.
+We are actively working on reducing this data size in [epic 10415](https://gitlab.com/groups/gitlab-org/-/epics/10415).
+
To choose the packages you want to synchronize with the GitLab License Database for [License Compliance](../../compliance/license_scanning_of_cyclonedx_files/index.md):
1. On the top bar, select **Main menu > Admin**.
diff --git a/doc/user/application_security/api_security/api_discovery/index.md b/doc/user/application_security/api_security/api_discovery/index.md
index 6a67dfc3f6a..b87c7f40663 100644
--- a/doc/user/application_security/api_security/api_discovery/index.md
+++ b/doc/user/application_security/api_security/api_discovery/index.md
@@ -37,7 +37,7 @@ The following projects demonstrate API Discovery:
- Java: 11, 17 (LTS versions)
- Executable JARs
-API Discovery supports Spring Boot major version 2, minor versions 1 and higher. Versions 2.0.X are not supported due to known bugs which affect API Discovery and were fixed in 2.1.
+API Discovery supports Spring Boot major version 2, minor versions 1 and later. Versions 2.0.X are not supported due to known bugs which affect API Discovery and were fixed in 2.1.
Major version 3 is planned to be supported in the future. Support for major version 1 is not planned.
diff --git a/doc/user/application_security/container_scanning/index.md b/doc/user/application_security/container_scanning/index.md
index 4179410678e..7a82f98425a 100644
--- a/doc/user/application_security/container_scanning/index.md
+++ b/doc/user/application_security/container_scanning/index.md
@@ -82,7 +82,7 @@ To enable container scanning in your pipeline, you need the following:
- GitLab CI/CD pipeline must include the `test` stage, which is available unless overridden with the [`stages`](../../../ci/yaml/index.md#stages) keyword.
- [GitLab Runner](https://docs.gitlab.com/runner/) with the [`docker`](https://docs.gitlab.com/runner/executors/docker.html)
or [`kubernetes`](https://docs.gitlab.com/runner/install/kubernetes.html) executor on Linux/amd64.
-- Docker `18.09.03` or higher installed on the same computer as the runner. If you're using the
+- Docker `18.09.03` or later installed on the same computer as the runner. If you're using the
shared runners on GitLab.com, then this is already the case.
- An image matching the [supported distributions](#supported-distributions).
- [Build and push](../../packages/container_registry/build_and_push_images.md#use-gitlab-cicd)
@@ -184,7 +184,7 @@ container_scanning:
include:
- template: Security/Container-Scanning.gitlab-ci.yml
-variables:
+variables:
CS_IMAGE: <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<image>:<tag>
CS_REGISTRY_USER: AWS
CS_REGISTRY_PASSWORD: "$AWS_ECR_PASSWORD"
@@ -257,7 +257,7 @@ including a large number of false positives.
| `ADDITIONAL_CA_CERT_BUNDLE` | `""` | Bundle of CA certs that you want to trust. See [Using a custom SSL CA certificate authority](#using-a-custom-ssl-ca-certificate-authority) for more details. | All |
| `CI_APPLICATION_REPOSITORY` | `$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG` | Docker repository URL for the image to be scanned. | All |
| `CI_APPLICATION_TAG` | `$CI_COMMIT_SHA` | Docker repository tag for the image to be scanned. | All |
-| `CS_ANALYZER_IMAGE` | `registry.gitlab.com/security-products/container-scanning:5` | Docker image of the analyzer. | All |
+| `CS_ANALYZER_IMAGE` | `registry.gitlab.com/security-products/container-scanning:6` | Docker image of the analyzer. | All |
| `CS_DEFAULT_BRANCH_IMAGE` | `""` | The name of the `CS_IMAGE` on the default branch. See [Setting the default branch image](#setting-the-default-branch-image) for more details. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/338877) in GitLab 14.5. | All |
| `CS_DISABLE_DEPENDENCY_LIST` | `"false"` | Disable Dependency Scanning for packages installed in the scanned image. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/345434) in GitLab 14.6. | All |
| `CS_DISABLE_LANGUAGE_VULNERABILITY_SCAN` | `"true"` | Disable scanning for language-specific packages installed in the scanned image. [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/345434) in GitLab 14.6. | All |
@@ -305,9 +305,9 @@ standard tag plus the `-fips` extension.
| Scanner name | `CS_ANALYZER_IMAGE` |
| --------------- | ------------------- |
-| Default (Trivy) | `registry.gitlab.com/security-products/container-scanning:5-fips` |
-| Grype | `registry.gitlab.com/security-products/container-scanning/grype:5-fips` |
-| Trivy | `registry.gitlab.com/security-products/container-scanning/trivy:5-fips` |
+| Default (Trivy) | `registry.gitlab.com/security-products/container-scanning:6-fips` |
+| Grype | `registry.gitlab.com/security-products/container-scanning/grype:6-fips` |
+| Trivy | `registry.gitlab.com/security-products/container-scanning/trivy:6-fips` |
NOTE:
Prior to GitLab 15.0, the `-ubi` image extension is also available. GitLab 15.0 and later only
@@ -364,9 +364,9 @@ The following options are available:
| Scanner name | `CS_ANALYZER_IMAGE` |
|----------------------------------------------------------|--------------------------------------------------------------------|
-| Default ([Trivy](https://github.com/aquasecurity/trivy)) | `registry.gitlab.com/security-products/container-scanning:5` |
-| [Grype](https://github.com/anchore/grype) | `registry.gitlab.com/security-products/container-scanning/grype:5` |
-| Trivy | `registry.gitlab.com/security-products/container-scanning/trivy:5` |
+| Default ([Trivy](https://github.com/aquasecurity/trivy)) | `registry.gitlab.com/security-products/container-scanning:6` |
+| [Grype](https://github.com/anchore/grype) | `registry.gitlab.com/security-products/container-scanning/grype:6` |
+| Trivy | `registry.gitlab.com/security-products/container-scanning/trivy:6` |
### Setting the default branch image
@@ -557,9 +557,9 @@ For container scanning, import the following images from `registry.gitlab.com` i
[local Docker container registry](../../packages/container_registry/index.md):
```plaintext
-registry.gitlab.com/security-products/container-scanning:5
-registry.gitlab.com/security-products/container-scanning/grype:5
-registry.gitlab.com/security-products/container-scanning/trivy:5
+registry.gitlab.com/security-products/container-scanning:6
+registry.gitlab.com/security-products/container-scanning/grype:6
+registry.gitlab.com/security-products/container-scanning/trivy:6
```
The process for importing Docker images into a local offline Docker registry depends on
@@ -599,7 +599,7 @@ following `.gitlab-ci.yml` example as a template.
```yaml
variables:
- SOURCE_IMAGE: registry.gitlab.com/security-products/container-scanning:5
+ SOURCE_IMAGE: registry.gitlab.com/security-products/container-scanning:6
TARGET_IMAGE: $CI_REGISTRY/namespace/container-scanning
image: docker:stable
diff --git a/doc/user/compliance/compliance_report/index.md b/doc/user/compliance/compliance_report/index.md
index 62f5acc6e71..c6684ba4083 100644
--- a/doc/user/compliance/compliance_report/index.md
+++ b/doc/user/compliance/compliance_report/index.md
@@ -18,7 +18,7 @@ See reports about compliance violations and compliance frameworks for the group.
> - GraphQL API [introduced](https://gitlab.com/groups/gitlab-org/-/epics/7222) in GitLab 14.9.
> - [Generally available](https://gitlab.com/groups/gitlab-org/-/epics/5237) in GitLab 14.10. [Feature flag `compliance_violations_report`](https://gitlab.com/gitlab-org/gitlab/-/issues/346266) removed.
> - [Renamed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112111) to compliance violations report in GitLab 15.9.
-> - [Added](https://gitlab.com/gitlab-org/gitlab/-/issues/394950) ability to create/edit compliance frameworks in GitLab 16.0 [with a flag](../../../administration/feature_flags.md) named `manage_compliance_frameworks_modals_refactor`. Disabled by default.
+> - [Added](https://gitlab.com/gitlab-org/gitlab/-/issues/394950) ability to create/edit compliance frameworks in GitLab 16.0.
With compliance violations report, you can see a high-level view of merge request activity for all projects in the group.
@@ -171,8 +171,7 @@ passing in an optional value to the `commit_sha` query parameter.
## Compliance frameworks report
-> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/387910) in GitLab 15.10.
-> - Support for applying/removing compliance framework [added](https://gitlab.com/gitlab-org/gitlab/-/issues/383209) in GitLab 15.11
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/387910) in GitLab 15.10.
With compliance frameworks report, you can see the compliance frameworks that are applied to projects in a group. Each row of the report shows:
@@ -196,6 +195,10 @@ To view the compliance frameworks report:
### Apply a compliance framework to projects in a group
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/383209) in GitLab 15.11.
+
+You can apply a compliance framework to selected projects in a group.
+
Prerequisites:
- You must have the Owner role for the group.
@@ -212,6 +215,10 @@ To apply a compliance framework to projects in a group:
### Remove a compliance framework from projects in a group
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/383209) in GitLab 15.11.
+
+You can remove a compliance framework from selected projects in a group.
+
Prerequisites:
- You must have the Owner role for the group.
diff --git a/doc/user/group/access_and_permissions.md b/doc/user/group/access_and_permissions.md
index 114e5bd7bbf..5092779b63d 100644
--- a/doc/user/group/access_and_permissions.md
+++ b/doc/user/group/access_and_permissions.md
@@ -203,7 +203,7 @@ your group.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/216987) in GitLab 13.3.
By default, projects in a group can be forked.
-Optionally, on [GitLab Premium](https://about.gitlab.com/pricing/) or higher tiers,
+Optionally, on [GitLab Premium and Ultimate tiers](https://about.gitlab.com/pricing/),
you can prevent the projects in a group from being forked outside of the current top-level group.
This setting is removed from the SAML setting page, and migrated to the
diff --git a/doc/user/group/manage.md b/doc/user/group/manage.md
index 6edf2fef32f..ea150436e5b 100644
--- a/doc/user/group/manage.md
+++ b/doc/user/group/manage.md
@@ -75,7 +75,7 @@ This action removes the group. It also adds a background job to delete all proje
Specifically:
-- In [GitLab 12.8 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/33257), on [GitLab Premium](https://about.gitlab.com/pricing/premium/) or higher tiers, this action adds a background job to mark a group for deletion. By default, the job schedules the deletion 7 days in the future. You can modify this waiting period through the [instance settings](../admin_area/settings/visibility_and_access_controls.md#deletion-protection).
+- In [GitLab 12.8 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/33257), on [GitLab Premium or Ultimate tiers](https://about.gitlab.com/pricing/premium/), this action adds a background job to mark a group for deletion. By default, the job schedules the deletion 7 days in the future. You can modify this waiting period through the [instance settings](../admin_area/settings/visibility_and_access_controls.md#deletion-protection).
- In [GitLab 13.6 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/39504), if the user who sets up the deletion is removed from the group before the
deletion happens, the job is cancelled, and the group is no longer scheduled for deletion.
@@ -324,7 +324,7 @@ To change this setting for a specific group, see [group level default branch pro
To change this setting globally, see [initial default branch protection](../project/repository/branches/default.md#instance-level-default-branch-protection).
NOTE:
-In [GitLab Premium or higher](https://about.gitlab.com/pricing/), GitLab administrators can choose to [disable group owners from updating the default branch protection](../project/repository/branches/default.md#prevent-overrides-of-default-branch-protection).
+In [GitLab Premium or Ultimate](https://about.gitlab.com/pricing/), GitLab administrators can choose to [disable group owners from updating the default branch protection](../project/repository/branches/default.md#prevent-overrides-of-default-branch-protection).
## Use a custom name for the initial branch
diff --git a/doc/user/group/settings/group_access_tokens.md b/doc/user/group/settings/group_access_tokens.md
index 07e0fb4b616..bb421e4e470 100644
--- a/doc/user/group/settings/group_access_tokens.md
+++ b/doc/user/group/settings/group_access_tokens.md
@@ -36,8 +36,8 @@ occurs on self-managed instances when they are upgraded to GitLab 16.0. This cha
You can use group access tokens:
-- On GitLab SaaS if you have the Premium license tier or higher. Group access tokens are not available with a [trial license](https://about.gitlab.com/free-trial/).
-- On self-managed instances of GitLab, with any license tier. If you have the Free tier:
+- On GitLab SaaS: If you have the Premium or Ultimate license tier. Group access tokens are not available with a [trial license](https://about.gitlab.com/free-trial/).
+- On self-managed instances: With any license tier. If you have the Free tier:
- Review your security and compliance policies around
[user self-enrollment](../../admin_area/settings/sign_up_restrictions.md#disable-new-sign-ups).
- Consider [disabling group access tokens](#enable-or-disable-group-access-token-creation) to
diff --git a/doc/user/okrs.md b/doc/user/okrs.md
index a61c395ab00..450827619fd 100644
--- a/doc/user/okrs.md
+++ b/doc/user/okrs.md
@@ -138,7 +138,7 @@ You can add [comments](discussions/index.md) and reply to threads in tasks.
To show who is responsible for an OKR, you can assign users to it.
Users on GitLab Free can assign one user per OKR.
-Users on GitLab Premium and higher can assign multiple users to a single OKR.
+Users on GitLab Premium and Ultimate can assign multiple users to a single OKR.
See also [multiple assignees for issues](project/issues/multiple_assignees_for_issues.md).
Prerequisites:
diff --git a/doc/user/packages/container_registry/index.md b/doc/user/packages/container_registry/index.md
index 4d7b25e2d77..c27265ccc3f 100644
--- a/doc/user/packages/container_registry/index.md
+++ b/doc/user/packages/container_registry/index.md
@@ -143,7 +143,7 @@ see [Container Registry visibility permissions](#container-registry-visibility-p
is internal or private, the Container Registry is also internal or private.
- **Only Project Members**: The Container Registry is visible only to project members with
- Reporter role or higher. This visibility is similar to the behavior of a private project with Container
+ at least the Reporter role. This visibility is similar to the behavior of a private project with Container
Registry visibility set to **Everyone With Access**.
1. Select **Save changes**.
diff --git a/doc/user/project/description_templates.md b/doc/user/project/description_templates.md
index 293884daa03..f0ced95c8eb 100644
--- a/doc/user/project/description_templates.md
+++ b/doc/user/project/description_templates.md
@@ -153,7 +153,7 @@ To set a default description template for merge requests, either:
- [In GitLab 14.8 and later](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78302), [create a merge request template](#create-a-merge-request-template) named `Default.md` (case insensitive)
and save it in `.gitlab/merge_request_templates/`.
This [doesn't overwrite](#priority-of-default-description-templates) the default template if one has been set in the project settings.
-- Users on GitLab Premium and higher: set the default template in project settings:
+- Users on GitLab Premium and Ultimate: set the default template in project settings:
1. On the top bar, select **Main menu > Projects** and find your project.
1. On the left sidebar, select **Settings > Merge requests**.
@@ -165,7 +165,7 @@ To set a default description template for issues, either:
- [In GitLab 14.8 and later](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/78302), [create an issue template](#create-an-issue-template) named `Default.md` (case insensitive)
and save it in `.gitlab/issue_templates/`.
This [doesn't overwrite](#priority-of-default-description-templates) the default template if one has been set in the project settings.
-- Users on GitLab Premium and higher: set the default template in project settings:
+- Users on GitLab Premium and Ultimate: set the default template in project settings:
1. On the top bar, select **Main menu > Projects** and find your project.
1. On the left sidebar, select **Settings > General**.
diff --git a/doc/user/project/file_lock.md b/doc/user/project/file_lock.md
index e4486938edf..c81ba4b7dd3 100644
--- a/doc/user/project/file_lock.md
+++ b/doc/user/project/file_lock.md
@@ -195,8 +195,7 @@ Suggested workflow for shared projects:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/440) in GitLab 8.9.
This process allows you to lock one file at a time through the GitLab UI and
-requires access to [GitLab Premium](https://about.gitlab.com/pricing/)
-or higher tiers.
+requires access to the [GitLab Premium or Ultimate tier](https://about.gitlab.com/pricing/).
Default branch file and directory locks only apply to the
[default branch](repository/branches/default.md) set in the project's settings.
diff --git a/doc/user/project/issues/associate_zoom_meeting.md b/doc/user/project/issues/associate_zoom_meeting.md
index c7187323850..d286e784e0a 100644
--- a/doc/user/project/issues/associate_zoom_meeting.md
+++ b/doc/user/project/issues/associate_zoom_meeting.md
@@ -36,7 +36,7 @@ You are only allowed to attach a single Zoom meeting to an issue. If you attempt
to add a second Zoom meeting using the `/zoom` quick action, it doesn't work. You
need to [remove it](#removing-an-existing-zoom-meeting-from-an-issue) first.
-Users on GitLab Premium and higher can also
+Users on GitLab Premium and Ultimate can also
[add multiple Zoom links to incidents](../../../operations/incident_management/linked_resources.md#link-zoom-meetings-from-an-incident).
## Removing an existing Zoom meeting from an issue
diff --git a/doc/user/project/merge_requests/approvals/rules.md b/doc/user/project/merge_requests/approvals/rules.md
index 5c0282dd9e0..d55ca5dff04 100644
--- a/doc/user/project/merge_requests/approvals/rules.md
+++ b/doc/user/project/merge_requests/approvals/rules.md
@@ -53,7 +53,7 @@ To add a merge request approval rule:
1. Select **Add approval rule**.
-Users of GitLab Premium and higher tiers can create [additional approval rules](#add-multiple-approval-rules).
+Users of GitLab Premium and Ultimate tiers can create [additional approval rules](#add-multiple-approval-rules).
Your configuration for approval rule overrides determines if the new rule is applied
to existing merge requests:
@@ -91,7 +91,7 @@ To edit a merge request approval rule:
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/1979) in GitLab 11.10.
-In GitLab Premium and higher tiers, you can enforce multiple approval rules on a
+In GitLab Premium and Ultimate tiers, you can enforce multiple approval rules on a
merge request, and multiple default approval rules for a project. If your tier
supports multiple default rules:
@@ -134,7 +134,7 @@ who commented on the merge request. It helps authors and reviewers identify who
contact with questions about the merge request's content.
If the number of required approvals is greater than the number of assigned approvers,
-approvals from other users with Developer [permissions](../../../permissions.md) or higher
+approvals from other users with at least the Developer [role](../../../permissions.md)
in the project counts toward meeting the required number of approvals, even if the
users were not explicitly listed in the approval rules.
diff --git a/doc/user/project/merge_requests/approvals/settings.md b/doc/user/project/merge_requests/approvals/settings.md
index 154be8a83bb..6c079dc9319 100644
--- a/doc/user/project/merge_requests/approvals/settings.md
+++ b/doc/user/project/merge_requests/approvals/settings.md
@@ -121,7 +121,7 @@ permission enables an electronic signature for approvals, such as the one define
## Remove all approvals when commits are added to the source branch
By default, an approval on a merge request is removed when you add more changes
-after the approval. In GitLab Premium and higher tiers, to keep existing approvals
+after the approval. In GitLab Premium and Ultimate tiers, to keep existing approvals
after more changes are added to the merge request:
1. On the left sidebar, select **Settings > Merge requests**.
diff --git a/doc/user/project/merge_requests/dependencies.md b/doc/user/project/merge_requests/dependencies.md
index 231c1dda5b7..3d92fc9a91e 100644
--- a/doc/user/project/merge_requests/dependencies.md
+++ b/doc/user/project/merge_requests/dependencies.md
@@ -85,7 +85,7 @@ other specific work merges, even if the merge request is in a different project.
Prerequisites:
- You must have at least the Developer role or be allowed to create merge requests in the project.
-- The dependent merge request must be in a project in a **PREMIUM** or higher tier.
+- The dependent merge request must be in a project in the Premium or Ultimate tier.
To create a new merge request and mark it as dependent on another:
diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md
index acc64e513ce..a65c5518658 100644
--- a/doc/user/project/merge_requests/index.md
+++ b/doc/user/project/merge_requests/index.md
@@ -321,13 +321,14 @@ For a web developer writing a webpage for your company's website:
FLAG:
On self-managed GitLab, by default this feature is not available.
To make it available per user, ask an administrator to [enable the feature flag](../../../administration/feature_flags.md) named `mr_activity_filters` for individual or groups of users.
-On GitLab.com, this feature is enabled for all GitLab team members.
+On GitLab.com, this feature unavailable.
To understand the history of a merge request, filter its activity feed to show you
only the items that are relevant to you.
1. On the top bar, select **Main menu > Projects** and find your project.
1. On the left sidebar, select **Merge requests**.
+1. Select a merge request.
1. Scroll to **Activity**.
1. On the right side of the page, select **Activity filter** to show the filter options.
If you've selected filter options previously, this field shows a summary of your
diff --git a/doc/user/project/releases/index.md b/doc/user/project/releases/index.md
index 59155f63075..d0c44b7e837 100644
--- a/doc/user/project/releases/index.md
+++ b/doc/user/project/releases/index.md
@@ -45,8 +45,8 @@ To view a list of releases:
![Number of Releases](img/releases_count_v13_2.png "Incremental counter of Releases")
- On public projects, this number is visible to all users.
- - On private projects, this number is visible to users with Reporter
- [permissions](../../permissions.md#project-members-permissions) or higher.
+ - On private projects, this number is visible to users with at least the Reporter
+ [role](../../permissions.md#project-members-permissions).
### Sort releases
diff --git a/doc/user/project/releases/release_fields.md b/doc/user/project/releases/release_fields.md
index 3269c75d362..d26ca87e384 100644
--- a/doc/user/project/releases/release_fields.md
+++ b/doc/user/project/releases/release_fields.md
@@ -90,6 +90,8 @@ By default, GitLab fetches the release using `released_at` time. The use of the
#### Permanent links to release assets
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/375489) in GitLab 15.9, links for private releases can be accessed using a Personal Access Token.
+
The assets associated with a release are accessible through a permanent URL.
GitLab always redirects this URL to the actual asset
location, so even if the assets move to a different location, you can continue
@@ -121,6 +123,14 @@ https://gitlab.com/gitlab-org/gitlab-runner/-/releases/v11.9.0-rc2/downloads/bin
The physical location of the asset can change at any time and the direct link remains unchanged.
+If the release is private, you need to provide a Personal Access Token with either `api` or `read_api` scopes using
+a `private_token` query parameter or a `HTTP_PRIVATE_TOKEN` header when making the request. For example:
+
+```shell
+curl --location --output filename "https://gitlab.example.com/my-group/my-project/-/releases/:release/downloads/:filepath?private_token=<your_access_token>"
+curl --location --output filename --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/my-group/my-project/-/releases/:release/downloads/:filepath"
+```
+
#### Permanent links to latest release assets
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16821) in GitLab 14.9.
diff --git a/doc/user/project/repository/branches/default.md b/doc/user/project/repository/branches/default.md
index b33dc4450a9..e58cc0bf6a4 100644
--- a/doc/user/project/repository/branches/default.md
+++ b/doc/user/project/repository/branches/default.md
@@ -134,7 +134,7 @@ groups and subgroups can override this instance-wide setting for their projects.
Instance-level protections for default branches
can be overridden on a per-group basis by the group's owner. In
-[GitLab Premium or higher](https://about.gitlab.com/pricing/), GitLab administrators can
+[GitLab Premium or Ultimate](https://about.gitlab.com/pricing/), GitLab administrators can
disable this privilege for group owners, enforcing the instance-level protection rule:
1. On the top bar, select **Main menu > Admin**.
@@ -153,7 +153,7 @@ GitLab administrators can still update the default branch protection of a group.
Instance-level protections for [default branch](#default-branch)
can be overridden on a per-group basis by the group's owner. In
-[GitLab Premium or higher](https://about.gitlab.com/pricing/), GitLab administrators can
+[GitLab Premium or Ultimate](https://about.gitlab.com/pricing/), GitLab administrators can
[enforce protection of initial default branches](#prevent-overrides-of-default-branch-protection)
which locks this setting for group owners.
diff --git a/doc/user/project/repository/branches/index.md b/doc/user/project/repository/branches/index.md
index af260fa2554..7c09ce5c580 100644
--- a/doc/user/project/repository/branches/index.md
+++ b/doc/user/project/repository/branches/index.md
@@ -66,7 +66,7 @@ When viewing an issue, you can create an associated branch directly from that pa
Prerequisites:
-- You must have the Developer or higher role in the project.
+- You must have at least the Developer role in the project.
To create a branch from an issue:
diff --git a/doc/user/project/repository/forking_workflow.md b/doc/user/project/repository/forking_workflow.md
index b08ac3fef4f..74d765fa7fe 100644
--- a/doc/user/project/repository/forking_workflow.md
+++ b/doc/user/project/repository/forking_workflow.md
@@ -49,7 +49,7 @@ A fork can fall out of sync with its upstream repository, and require an update:
your changes up, and pull the upstream repository's new changes into your fork.
To sync your fork with its upstream repository, update it from the GitLab UI
-or the command line. GitLab Premium and higher tiers can also automate updates by
+or the command line. GitLab Premium and Ultimate tiers can also automate updates by
[configuring forks as pull mirrors](#with-repository-mirroring) of the upstream repository.
### From the UI
@@ -142,7 +142,7 @@ an `upstream` remote repository for your fork:
A fork can be configured as a mirror of the upstream if all these conditions are met:
-1. Your subscription is **Premium** or higher.
+1. Your subscription is **Premium** or **Ultimate**.
1. You create all changes in branches (not `main`).
1. You do not work on [merge requests for confidential issues](../merge_requests/confidential.md),
which requires changes to `main`.
diff --git a/doc/user/project/settings/project_access_tokens.md b/doc/user/project/settings/project_access_tokens.md
index b4d48e52e46..ff69d7e4763 100644
--- a/doc/user/project/settings/project_access_tokens.md
+++ b/doc/user/project/settings/project_access_tokens.md
@@ -36,8 +36,8 @@ occurs on self-managed instances when they are upgraded to GitLab 16.0. This cha
You can use project access tokens:
-- On GitLab SaaS if you have the Premium license tier or higher. Project access tokens are not available with a [trial license](https://about.gitlab.com/free-trial/).
-- On self-managed instances of GitLab, with any license tier. If you have the Free tier:
+- On GitLab SaaS: If you have the Premium or Ultimate license tier. Project access tokens are not available with a [trial license](https://about.gitlab.com/free-trial/).
+- On self-managed instances of GitLab: With any license tier. If you have the Free tier:
- Review your security and compliance policies around
[user self-enrollment](../../admin_area/settings/sign_up_restrictions.md#disable-new-sign-ups).
- Consider [disabling project access tokens](#enable-or-disable-project-access-token-creation) to
diff --git a/doc/user/project/wiki/group.md b/doc/user/project/wiki/group.md
index a3a6cad65e1..9327ce53b3f 100644
--- a/doc/user/project/wiki/group.md
+++ b/doc/user/project/wiki/group.md
@@ -20,7 +20,7 @@ Group wikis are similar to [project wikis](index.md), with a few limitations:
For updates, follow [the epic that tracks feature parity with project wikis](https://gitlab.com/groups/gitlab-org/-/epics/2782).
Similar to project wikis, group members with at least the Developer role
-and higher can edit group wikis. Group wiki repositories can be moved using the
+can edit group wikis. Group wiki repositories can be moved using the
[Group repository storage moves API](../../../api/group_repository_storage_moves.md).
## View a group wiki
diff --git a/doc/user/tasks.md b/doc/user/tasks.md
index 48a6b3e6490..c0c0946dd8c 100644
--- a/doc/user/tasks.md
+++ b/doc/user/tasks.md
@@ -165,7 +165,7 @@ To delete a task:
To show who is responsible for a task, you can assign users to it.
Users on GitLab Free can assign one user per task.
-Users on GitLab Premium and higher can assign multiple users to a single task.
+Users on GitLab Premium and Ultimate can assign multiple users to a single task.
See also [multiple assignees for issues](project/issues/multiple_assignees_for_issues.md).
Prerequisites:
diff --git a/lib/gitlab/ci/templates/Jobs/Container-Scanning.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Container-Scanning.gitlab-ci.yml
index 8063f3d1e69..97a9d94f42a 100644
--- a/lib/gitlab/ci/templates/Jobs/Container-Scanning.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Jobs/Container-Scanning.gitlab-ci.yml
@@ -22,7 +22,7 @@
# List of available variables: https://docs.gitlab.com/ee/user/application_security/container_scanning/#available-variables
variables:
- CS_ANALYZER_IMAGE: "$CI_TEMPLATE_REGISTRY_HOST/security-products/container-scanning:5"
+ CS_ANALYZER_IMAGE: "$CI_TEMPLATE_REGISTRY_HOST/security-products/container-scanning:6"
CS_SCHEMA_MODEL: 15
container_scanning:
diff --git a/lib/gitlab/ci/templates/Jobs/Container-Scanning.latest.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Container-Scanning.latest.gitlab-ci.yml
index 24c23ce89f3..9a4c75e7402 100644
--- a/lib/gitlab/ci/templates/Jobs/Container-Scanning.latest.gitlab-ci.yml
+++ b/lib/gitlab/ci/templates/Jobs/Container-Scanning.latest.gitlab-ci.yml
@@ -22,7 +22,7 @@
# List of available variables: https://docs.gitlab.com/ee/user/application_security/container_scanning/#available-variables
variables:
- CS_ANALYZER_IMAGE: "$CI_TEMPLATE_REGISTRY_HOST/security-products/container-scanning:5"
+ CS_ANALYZER_IMAGE: "$CI_TEMPLATE_REGISTRY_HOST/security-products/container-scanning:6"
CS_SCHEMA_MODEL: 15
container_scanning:
diff --git a/lib/gitlab/database/schema_validation/adapters/column_database_adapter.rb b/lib/gitlab/database/schema_validation/adapters/column_database_adapter.rb
index 10603b3dbad..32d638380ea 100644
--- a/lib/gitlab/database/schema_validation/adapters/column_database_adapter.rb
+++ b/lib/gitlab/database/schema_validation/adapters/column_database_adapter.rb
@@ -33,6 +33,10 @@ module Gitlab
'NOT NULL' if query_result['not_null']
end
+ def partition_key?
+ query_result['partition_key']
+ end
+
private
attr_reader :query_result
diff --git a/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter.rb b/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter.rb
index 30a13b5dff1..420195d89dd 100644
--- a/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter.rb
+++ b/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter.rb
@@ -17,9 +17,10 @@ module Gitlab
attr_reader :table_name
- def initialize(table_name, pg_query_stmt)
+ def initialize(table_name, pg_query_stmt, partitioning_stmt)
@table_name = table_name
@pg_query_stmt = pg_query_stmt
+ @partitioning_stmt = partitioning_stmt
end
def name
@@ -44,9 +45,13 @@ module Gitlab
'NOT NULL' if constraints.any? { |node| node.constraint.contype == NOT_NULL_CONSTR }
end
+ def partition_key?
+ partition_keys.include?(name)
+ end
+
private
- attr_reader :pg_query_stmt
+ attr_reader :pg_query_stmt, :partitioning_stmt
def constraints
@constraints ||= pg_query_stmt.constraints
@@ -81,6 +86,7 @@ module Gitlab
# Parses PGQuery nodes recursively
#
# :constraint:: nodes that groups column default info
+ # :partition_elem:: node that store partition key info
# :func_cal:: nodes that stores functions, like +now()+
# :a_const:: nodes that stores constant values, like +t+, +f+, +0.0.0.0+, +255+, +1.0+
# :type_cast:: nodes that stores casting values, like +'name'::text+, +'0.0.0.0'::inet+
@@ -93,6 +99,8 @@ module Gitlab
case node.node
when :constraint
parse_node(node.constraint.raw_expr)
+ when :partition_elem
+ node.partition_elem.name
when :func_call
"#{parse_node(node.func_call.funcname.first)}()"
when :a_const
@@ -107,6 +115,12 @@ module Gitlab
node.to_h[node.node].values.last
end
end
+
+ def partition_keys
+ return [] unless partitioning_stmt
+
+ @partition_keys ||= partitioning_stmt.part_params.map { |key_stmt| parse_node(key_stmt) }
+ end
end
end
end
diff --git a/lib/gitlab/database/schema_validation/database.rb b/lib/gitlab/database/schema_validation/database.rb
index 9ff4a843e6d..7a0e348a27b 100644
--- a/lib/gitlab/database/schema_validation/database.rb
+++ b/lib/gitlab/database/schema_validation/database.rb
@@ -105,12 +105,14 @@ module Gitlab
table_information.relname AS table_name,
col_information.attname AS column_name,
col_information.attnotnull AS not_null,
+ col_information.attnum = ANY(pg_partitioned_table.partattrs) as partition_key,
format_type(col_information.atttypid, col_information.atttypmod) AS data_type,
pg_get_expr(col_default_information.adbin, col_default_information.adrelid) AS column_default
FROM pg_attribute AS col_information
JOIN pg_class AS table_information ON col_information.attrelid = table_information.oid
JOIN pg_namespace AS schema_information ON table_information.relnamespace = schema_information.oid
- LEFT JOIN pg_attrdef AS col_default_information ON col_information.attrelid = col_default_information.adrelid
+ LEFT JOIN pg_partitioned_table ON pg_partitioned_table.partrelid = table_information.oid
+ LEFT JOIN pg_attrdef AS col_default_information ON col_information.attrelid = col_default_information.adrelid
AND col_information.attnum = col_default_information.adnum
WHERE NOT col_information.attisdropped
AND col_information.attnum > 0
diff --git a/lib/gitlab/database/schema_validation/inconsistency_filter.rb b/lib/gitlab/database/schema_validation/inconsistency_filter.rb
new file mode 100644
index 00000000000..aa3a71c0edb
--- /dev/null
+++ b/lib/gitlab/database/schema_validation/inconsistency_filter.rb
@@ -0,0 +1,43 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module Database
+ module SchemaValidation
+ class InconsistencyFilter
+ def initialize(tables, triggers)
+ @tables = tables
+ @triggers = triggers
+ end
+
+ def to_proc
+ proc do |inconsistency|
+ inconsistency unless ignored?(inconsistency)
+ end
+ end
+
+ private
+
+ attr_reader :tables, :triggers
+
+ def ignored?(inconsistency)
+ case inconsistency.type
+ in 'extra_tables' | 'missing_tables'
+ ignored_table?(inconsistency.table_name)
+ in 'extra_triggers' | 'missing_triggers'
+ ignored_trigger?(inconsistency.object_name)
+ else
+ false
+ end
+ end
+
+ def ignored_table?(name)
+ tables.include?(name)
+ end
+
+ def ignored_trigger?(name)
+ triggers.any? { |ignored_object| name.to_s.include?(ignored_object) }
+ end
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/database/schema_validation/schema_objects/column.rb b/lib/gitlab/database/schema_validation/schema_objects/column.rb
index 38ad8e309a3..bd219300a13 100644
--- a/lib/gitlab/database/schema_validation/schema_objects/column.rb
+++ b/lib/gitlab/database/schema_validation/schema_objects/column.rb
@@ -11,7 +11,7 @@ module Gitlab
attr_reader :adapter
- delegate :name, :table_name, to: :adapter
+ delegate :name, :table_name, :partition_key?, to: :adapter
def statement
[name, adapter.data_type, adapter.default, adapter.nullable].compact.join(' ')
diff --git a/lib/gitlab/database/schema_validation/schema_objects/table.rb b/lib/gitlab/database/schema_validation/schema_objects/table.rb
index 6f573e7027f..de2e675d20e 100644
--- a/lib/gitlab/database/schema_validation/schema_objects/table.rb
+++ b/lib/gitlab/database/schema_validation/schema_objects/table.rb
@@ -31,7 +31,7 @@ module Gitlab
private
def columns_statement
- columns.map(&:statement).join(', ')
+ columns.reject(&:partition_key?).map(&:statement).join(', ')
end
end
end
diff --git a/lib/gitlab/database/schema_validation/structure_sql.rb b/lib/gitlab/database/schema_validation/structure_sql.rb
index e93c33aedcd..299db1c2a7e 100644
--- a/lib/gitlab/database/schema_validation/structure_sql.rb
+++ b/lib/gitlab/database/schema_validation/structure_sql.rb
@@ -38,9 +38,11 @@ module Gitlab
def tables
@tables ||= table_statements.map do |stmt|
table_name = stmt.relation.relname
+ partition_stmt = stmt.partspec
columns = stmt.table_elts.select { |n| n.node == :column_def }.map do |column|
- SchemaObjects::Column.new(Adapters::ColumnStructureSqlAdapter.new(table_name, column.column_def))
+ adapter = Adapters::ColumnStructureSqlAdapter.new(table_name, column.column_def, partition_stmt)
+ SchemaObjects::Column.new(adapter)
end
SchemaObjects::Table.new(table_name, columns)
diff --git a/lib/gitlab/tracking.rb b/lib/gitlab/tracking.rb
index deef3a9a38b..52aee4d2d45 100644
--- a/lib/gitlab/tracking.rb
+++ b/lib/gitlab/tracking.rb
@@ -9,11 +9,15 @@ module Gitlab
def event(category, action, label: nil, property: nil, value: nil, context: [], project: nil, user: nil, namespace: nil, **extra) # rubocop:disable Metrics/ParameterLists
action = action.to_s
+
+ project_id = project.is_a?(Integer) ? project : project&.id
+
contexts = [
Tracking::StandardContext.new(
- project: project,
- user: user,
- namespace: namespace,
+ namespace_id: namespace&.id,
+ plan_name: namespace&.actual_plan_name,
+ project_id: project_id,
+ user_id: user&.id,
**extra).to_context, *context
]
@@ -25,9 +29,10 @@ module Gitlab
destination = Gitlab::Tracking::Destinations::DatabaseEventsSnowplow.new
contexts = [
Tracking::StandardContext.new(
- project: project,
- user: user,
- namespace: namespace,
+ namespace_id: namespace&.id,
+ plan_name: namespace&.actual_plan_name,
+ project_id: project&.id,
+ user_id: user&.id,
**extra).to_context, *context
]
diff --git a/lib/gitlab/tracking/standard_context.rb b/lib/gitlab/tracking/standard_context.rb
index 50467de44b8..62c45368410 100644
--- a/lib/gitlab/tracking/standard_context.rb
+++ b/lib/gitlab/tracking/standard_context.rb
@@ -6,15 +6,16 @@ module Gitlab
GITLAB_STANDARD_SCHEMA_URL = 'iglu:com.gitlab/gitlab_standard/jsonschema/1-0-8'
GITLAB_RAILS_SOURCE = 'gitlab-rails'
- def initialize(namespace: nil, project: nil, user: nil, **extra)
- check_argument_type(:namespace, namespace, [Namespace])
- check_argument_type(:project, project, [Project, Integer])
- check_argument_type(:user, user, [User, DeployToken])
-
- @namespace = namespace
- @plan = namespace&.actual_plan_name
- @project = project
- @user = user
+ def initialize(namespace_id: nil, plan_name: nil, project_id: nil, user_id: nil, **extra)
+ check_argument_type(:namespace_id, namespace_id, [Integer])
+ check_argument_type(:plan_name, plan_name, [String])
+ check_argument_type(:project_id, project_id, [Integer])
+ check_argument_type(:user_id, user_id, [Integer])
+
+ @namespace_id = namespace_id
+ @plan_name = plan_name
+ @project_id = project_id
+ @user_id = user_id
@extra = extra
end
@@ -40,25 +41,21 @@ module Gitlab
private
- attr_accessor :namespace, :project, :extra, :plan, :user
+ attr_accessor :namespace_id, :project_id, :extra, :plan_name, :user_id
def to_h
{
environment: environment,
source: source,
- plan: plan,
+ plan: plan_name,
extra: extra,
- user_id: user&.id,
- namespace_id: namespace&.id,
+ user_id: user_id,
+ namespace_id: namespace_id,
project_id: project_id,
context_generated_at: Time.current
}
end
- def project_id
- project.is_a?(Integer) ? project : project&.id
- end
-
def check_argument_type(argument_name, argument_value, allowed_classes)
return if argument_value.nil? || allowed_classes.any? { |allowed_class| argument_value.is_a?(allowed_class) }
diff --git a/lib/tasks/gitlab/db.rake b/lib/tasks/gitlab/db.rake
index 372ebcfbee8..ad5595afe0e 100644
--- a/lib/tasks/gitlab/db.rake
+++ b/lib/tasks/gitlab/db.rake
@@ -449,6 +449,11 @@ namespace :gitlab do
end
namespace :schema_checker do
+ # TODO: Remove `test_replication` after PG 14 upgrade is finished
+ # https://gitlab.com/gitlab-com/gl-infra/db-migration/-/merge_requests/406#note_1369214728
+ IGNORED_TABLES = %w[test_replication].freeze
+ IGNORED_TRIGGERS = ['gitlab_schema_write_trigger_for_'].freeze
+
desc 'Checks schema inconsistencies'
task run: :environment do
database_model = Gitlab::Database.database_base_models[Gitlab::Database::MAIN_DATABASE_NAME]
@@ -457,7 +462,10 @@ namespace :gitlab do
stucture_sql_path = Rails.root.join('db/structure.sql')
structure_sql = Gitlab::Database::SchemaValidation::StructureSql.new(stucture_sql_path)
- inconsistencies = Gitlab::Database::SchemaValidation::Runner.new(structure_sql, database).execute
+ filter = Gitlab::Database::SchemaValidation::InconsistencyFilter.new(IGNORED_TABLES, IGNORED_TRIGGERS)
+
+ inconsistencies =
+ Gitlab::Database::SchemaValidation::Runner.new(structure_sql, database).execute.filter_map(&filter)
gitlab_url = 'gitlab-org/gitlab'
diff --git a/qa/lib/gitlab/page/group/settings/billing.rb b/qa/lib/gitlab/page/group/settings/billing.rb
index ec4567cd4a6..1cb31c995f6 100644
--- a/qa/lib/gitlab/page/group/settings/billing.rb
+++ b/qa/lib/gitlab/page/group/settings/billing.rb
@@ -34,8 +34,8 @@ module Gitlab
#
# @param subscription_plan [String]
def wait_for_subscription(subscription_plan, page:)
- ::QA::Support::Waiter.wait_until(max_duration: 30, sleep_interval: 2, reload_page: page) do
- billing_plan_header.match?(/currently using the #{subscription_plan} plan/i)
+ ::QA::Support::Waiter.wait_until(max_duration: 30, sleep_interval: 3, reload_page: page) do
+ billing_plan_header.match?(/currently using the #{subscription_plan} saas plan/i)
end
end
end
diff --git a/spec/fixtures/structure.sql b/spec/fixtures/structure.sql
index 5a7deb4fadf..11e4f754abc 100644
--- a/spec/fixtures/structure.sql
+++ b/spec/fixtures/structure.sql
@@ -49,8 +49,10 @@ CREATE TABLE test_table (
uuid_with_default_column uuid DEFAULT '00000000-0000-0000-0000-000000000000'::uuid NOT NULL,
bytea_column bytea,
bytea_with_default_column bytea DEFAULT '\xDEADBEEF'::bytea,
- unmapped_column_type anyarray
-);
+ unmapped_column_type anyarray,
+ partition_key bigint DEFAULT 1 NOT NULL,
+ created_at timestamp with time zone DEFAULT now() NOT NULL
+) PARTITION BY HASH (partition_key, created_at);
CREATE TABLE ci_project_mirrors (
id bigint NOT NULL,
diff --git a/spec/lib/gitlab/database/schema_validation/adapters/column_database_adapter_spec.rb b/spec/lib/gitlab/database/schema_validation/adapters/column_database_adapter_spec.rb
index 13c4bc0b054..d81f5f3dbec 100644
--- a/spec/lib/gitlab/database/schema_validation/adapters/column_database_adapter_spec.rb
+++ b/spec/lib/gitlab/database/schema_validation/adapters/column_database_adapter_spec.rb
@@ -8,13 +8,15 @@ RSpec.describe Gitlab::Database::SchemaValidation::Adapters::ColumnDatabaseAdapt
let(:column_name) { 'email' }
let(:column_default) { "'no-reply@gitlab.com'::character varying" }
let(:not_null) { true }
+ let(:partition_key) { false }
let(:db_result) do
{
'table_name' => 'projects',
'column_name' => column_name,
'data_type' => 'character varying',
'column_default' => column_default,
- 'not_null' => not_null
+ 'not_null' => not_null,
+ 'partition_key' => partition_key
}
end
@@ -63,4 +65,8 @@ RSpec.describe Gitlab::Database::SchemaValidation::Adapters::ColumnDatabaseAdapt
it { expect(adapter.nullable).to be_nil }
end
end
+
+ describe '#partition_key?' do
+ it { expect(adapter.partition_key?).to be(false) }
+ end
end
diff --git a/spec/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter_spec.rb b/spec/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter_spec.rb
index d7e5c6e896e..64b59e65be6 100644
--- a/spec/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter_spec.rb
+++ b/spec/lib/gitlab/database/schema_validation/adapters/column_structure_sql_adapter_spec.rb
@@ -3,36 +3,41 @@
require 'spec_helper'
RSpec.describe Gitlab::Database::SchemaValidation::Adapters::ColumnStructureSqlAdapter, feature_category: :database do
- subject(:adapter) { described_class.new(table_name, column_def) }
+ subject(:adapter) { described_class.new(table_name, column_def, partition_stmt) }
- let(:table_name) { 'my_table' }
+ let(:table_name) { 'test_table' }
let(:file_path) { Rails.root.join('spec/fixtures/structure.sql') }
let(:table_stmts) { PgQuery.parse(File.read(file_path)).tree.stmts.filter_map { |s| s.stmt.create_stmt } }
- let(:column_stmts) { table_stmts.find { |table| table.relation.relname == 'test_table' }.table_elts }
+ let(:table) { table_stmts.find { |table| table.relation.relname == table_name } }
+ let(:partition_stmt) { table.partspec }
+ let(:column_stmts) { table.table_elts }
let(:column_def) { column_stmts.find { |col| col.column_def.colname == column_name }.column_def }
- where(:column_name, :data_type, :default_value, :nullable) do
+ where(:column_name, :data_type, :default_value, :nullable, :partition_key) do
[
- ['id', 'bigint', nil, 'NOT NULL'],
- ['integer_column', 'integer', nil, nil],
- ['integer_with_default_column', 'integer', 'DEFAULT 1', nil],
- ['smallint_with_default_column', 'smallint', 'DEFAULT 0', 'NOT NULL'],
- ['double_precision_with_default_column', 'double precision', 'DEFAULT 1.0', nil],
- ['numeric_with_default_column', 'numeric', 'DEFAULT 1.0', 'NOT NULL'],
- ['boolean_with_default_colum', 'boolean', 'DEFAULT true', 'NOT NULL'],
- ['varying_with_default_column', 'character varying', "DEFAULT 'DEFAULT'::character varying", 'NOT NULL'],
- ['varying_with_limit_and_default_column', 'character varying(255)', "DEFAULT 'DEFAULT'::character varying", nil],
- ['text_with_default_column', 'text', "DEFAULT ''::text", 'NOT NULL'],
- ['array_with_default_column', 'character varying(255)[]', "DEFAULT '{one,two}'::character varying[]", 'NOT NULL'],
- ['jsonb_with_default_column', 'jsonb', "DEFAULT '[]'::jsonb", 'NOT NULL'],
- ['timestamptz_with_default_column', 'timestamp(6) with time zone', "DEFAULT now()", nil],
+ ['id', 'bigint', nil, 'NOT NULL', false],
+ ['integer_column', 'integer', nil, nil, false],
+ ['integer_with_default_column', 'integer', 'DEFAULT 1', nil, false],
+ ['smallint_with_default_column', 'smallint', 'DEFAULT 0', 'NOT NULL', false],
+ ['double_precision_with_default_column', 'double precision', 'DEFAULT 1.0', nil, false],
+ ['numeric_with_default_column', 'numeric', 'DEFAULT 1.0', 'NOT NULL', false],
+ ['boolean_with_default_colum', 'boolean', 'DEFAULT true', 'NOT NULL', false],
+ ['varying_with_default_column', 'character varying', "DEFAULT 'DEFAULT'::character varying", 'NOT NULL', false],
+ ['varying_with_limit_and_default_column', 'character varying(255)', "DEFAULT 'DEFAULT'::character varying",
+ nil, false],
+ ['text_with_default_column', 'text', "DEFAULT ''::text", 'NOT NULL', false],
+ ['array_with_default_column', 'character varying(255)[]', "DEFAULT '{one,two}'::character varying[]",
+ 'NOT NULL', false],
+ ['jsonb_with_default_column', 'jsonb', "DEFAULT '[]'::jsonb", 'NOT NULL', false],
+ ['timestamptz_with_default_column', 'timestamp(6) with time zone', "DEFAULT now()", nil, false],
['timestamp_with_default_column', 'timestamp(6) without time zone',
- "DEFAULT '2022-01-23 00:00:00+00'::timestamp without time zone", 'NOT NULL'],
- ['date_with_default_column', 'date', 'DEFAULT 2023-04-05', nil],
- ['inet_with_default_column', 'inet', "DEFAULT '0.0.0.0'::inet", 'NOT NULL'],
- ['macaddr_with_default_column', 'macaddr', "DEFAULT '00-00-00-00-00-000'::macaddr", 'NOT NULL'],
- ['uuid_with_default_column', 'uuid', "DEFAULT '00000000-0000-0000-0000-000000000000'::uuid", 'NOT NULL'],
- ['bytea_with_default_column', 'bytea', "DEFAULT '\\xDEADBEEF'::bytea", nil]
+ "DEFAULT '2022-01-23 00:00:00+00'::timestamp without time zone", 'NOT NULL', false],
+ ['date_with_default_column', 'date', 'DEFAULT 2023-04-05', nil, false],
+ ['inet_with_default_column', 'inet', "DEFAULT '0.0.0.0'::inet", 'NOT NULL', false],
+ ['macaddr_with_default_column', 'macaddr', "DEFAULT '00-00-00-00-00-000'::macaddr", 'NOT NULL', false],
+ ['uuid_with_default_column', 'uuid', "DEFAULT '00000000-0000-0000-0000-000000000000'::uuid", 'NOT NULL', false],
+ ['partition_key', 'bigint', 'DEFAULT 1', 'NOT NULL', true],
+ ['created_at', 'timestamp with time zone', 'DEFAULT now()', 'NOT NULL', true]
]
end
@@ -56,6 +61,10 @@ RSpec.describe Gitlab::Database::SchemaValidation::Adapters::ColumnStructureSqlA
describe '#default' do
it { expect(adapter.default).to eq(default_value) }
end
+
+ describe '#partition_key?' do
+ it { expect(adapter.partition_key?).to eq(partition_key) }
+ end
end
context 'when the data type is not mapped' do
diff --git a/spec/lib/gitlab/database/schema_validation/database_spec.rb b/spec/lib/gitlab/database/schema_validation/database_spec.rb
index 8fd98382625..0b5f433b1c9 100644
--- a/spec/lib/gitlab/database/schema_validation/database_spec.rb
+++ b/spec/lib/gitlab/database/schema_validation/database_spec.rb
@@ -74,6 +74,7 @@ RSpec.describe Gitlab::Database::SchemaValidation::Database, feature_category: :
'column_name' => 'id',
'not_null' => true,
'data_type' => 'bigint',
+ 'partition_key' => false,
'column_default' => "nextval('audit_events_id_seq'::regclass)"
},
{
@@ -81,6 +82,7 @@ RSpec.describe Gitlab::Database::SchemaValidation::Database, feature_category: :
'column_name' => 'details',
'not_null' => false,
'data_type' => 'text',
+ 'partition_key' => false,
'column_default' => nil
}
]
diff --git a/spec/lib/gitlab/database/schema_validation/schema_objects/table_spec.rb b/spec/lib/gitlab/database/schema_validation/schema_objects/table_spec.rb
index 6c2efee056b..60ea9581517 100644
--- a/spec/lib/gitlab/database/schema_validation/schema_objects/table_spec.rb
+++ b/spec/lib/gitlab/database/schema_validation/schema_objects/table_spec.rb
@@ -9,8 +9,9 @@ RSpec.describe Gitlab::Database::SchemaValidation::SchemaObjects::Table, feature
let(:column_class) { 'Gitlab::Database::SchemaValidation::SchemaObjects::Column' }
let(:columns) do
[
- instance_double(column_class, name: 'id', statement: 'id bigint NOT NULL'),
- instance_double(column_class, name: 'col', statement: 'col text')
+ instance_double(column_class, name: 'id', statement: 'id bigint NOT NULL', partition_key?: false),
+ instance_double(column_class, name: 'col', statement: 'col text', partition_key?: false),
+ instance_double(column_class, name: 'partition', statement: 'partition integer DEFAULT 1', partition_key?: true)
]
end
@@ -24,6 +25,10 @@ RSpec.describe Gitlab::Database::SchemaValidation::SchemaObjects::Table, feature
describe '#statement' do
it { expect(table.statement).to eq('CREATE TABLE my_table (id bigint NOT NULL, col text)') }
+
+ it 'ignores the partition column' do
+ expect(table.statement).not_to include('partition integer DEFAULT 1')
+ end
end
describe '#fetch_column_by_name' do
diff --git a/spec/lib/gitlab/tracking/standard_context_spec.rb b/spec/lib/gitlab/tracking/standard_context_spec.rb
index cfb83bc0528..e1ae362e797 100644
--- a/spec/lib/gitlab/tracking/standard_context_spec.rb
+++ b/spec/lib/gitlab/tracking/standard_context_spec.rb
@@ -70,7 +70,9 @@ RSpec.describe Gitlab::Tracking::StandardContext do
end
context 'when namespace is available' do
- subject { described_class.new(namespace: create(:namespace)) }
+ let(:namespace) { create(:namespace) }
+
+ subject { described_class.new(namespace_id: namespace.id, plan_name: namespace.actual_plan_name) }
it 'contains plan name' do
expect(snowplow_context.to_json.dig(:data, :plan)).to eq(Plan::DEFAULT)
@@ -93,7 +95,7 @@ RSpec.describe Gitlab::Tracking::StandardContext do
end
context 'with incorrect argument type' do
- subject { described_class.new(project: create(:group)) }
+ subject { described_class.new(project_id: create(:group)) }
it 'does call `track_and_raise_for_dev_exception`' do
expect(Gitlab::ErrorTracking).to receive(:track_and_raise_for_dev_exception)
diff --git a/spec/lib/gitlab/tracking_spec.rb b/spec/lib/gitlab/tracking_spec.rb
index a3de64a002e..a353a3a512c 100644
--- a/spec/lib/gitlab/tracking_spec.rb
+++ b/spec/lib/gitlab/tracking_spec.rb
@@ -134,7 +134,7 @@ RSpec.describe Gitlab::Tracking, feature_category: :application_instrumentation
expect(Gitlab::Tracking::StandardContext)
.to receive(:new)
- .with(project: project, user: user, namespace: namespace, extra_key_1: 'extra value 1', extra_key_2: 'extra value 2')
+ .with(project_id: project.id, user_id: user.id, namespace_id: namespace.id, plan_name: namespace.actual_plan_name, extra_key_1: 'extra value 1', extra_key_2: 'extra value 2')
.and_call_original
expect_any_instance_of(klass).to receive(:event) do |_, category, action, args|
diff --git a/spec/migrations/20230502102832_schedule_index_to_members_on_source_and_type_and_access_level_spec.rb b/spec/migrations/20230502102832_schedule_index_to_members_on_source_and_type_and_access_level_spec.rb
new file mode 100644
index 00000000000..34d69642802
--- /dev/null
+++ b/spec/migrations/20230502102832_schedule_index_to_members_on_source_and_type_and_access_level_spec.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require "spec_helper"
+
+require_migration!
+
+RSpec.describe ScheduleIndexToMembersOnSourceAndTypeAndAccessLevel, feature_category: :security_policy_management do
+ let(:async_index) { Gitlab::Database::AsyncIndexes::PostgresAsyncIndex }
+ let(:index_name) { described_class::INDEX_NAME }
+
+ it "schedules the index" do
+ reversible_migration do |migration|
+ migration.before -> do
+ expect(async_index.where(name: index_name).count).to be(0)
+ end
+
+ migration.after -> do
+ expect(async_index.where(name: index_name).count).to be(1)
+ end
+ end
+ end
+end
diff --git a/spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb b/spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb
new file mode 100644
index 00000000000..9759fa7862d
--- /dev/null
+++ b/spec/migrations/20230502120021_schedule_index_to_project_authorizations_on_project_user_access_level_spec.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+require "spec_helper"
+
+require_migration!
+
+RSpec.describe ScheduleIndexToProjectAuthorizationsOnProjectUserAccessLevel, feature_category: :security_policy_management do
+ let(:async_index) { Gitlab::Database::AsyncIndexes::PostgresAsyncIndex }
+ let(:index_name) { described_class::INDEX_NAME }
+
+ it "schedules the index" do
+ reversible_migration do |migration|
+ migration.before -> do
+ expect(async_index.where(name: index_name).count).to be(0)
+ end
+
+ migration.after -> do
+ expect(async_index.where(name: index_name).count).to be(1)
+ end
+ end
+ end
+end
diff --git a/spec/migrations/ensure_notes_bigint_backfill_is_finished_for_gitlab_dot_com_spec.rb b/spec/migrations/ensure_notes_bigint_backfill_is_finished_for_gitlab_dot_com_spec.rb
new file mode 100644
index 00000000000..2832be38f9d
--- /dev/null
+++ b/spec/migrations/ensure_notes_bigint_backfill_is_finished_for_gitlab_dot_com_spec.rb
@@ -0,0 +1,35 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require_migration!
+
+RSpec.describe EnsureNotesBigintBackfillIsFinishedForGitlabDotCom, feature_category: :database do
+ describe '#up' do
+ let(:migration_arguments) do
+ {
+ job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
+ table_name: 'notes',
+ column_name: 'id',
+ job_arguments: [['id'], ['id_convert_to_bigint']]
+ }
+ end
+
+ it 'ensures the migration is completed for GitLab.com, dev, or test' do
+ expect_next_instance_of(described_class) do |instance|
+ expect(instance).to receive(:com_or_dev_or_test_but_not_jh?).and_return(true)
+ expect(instance).to receive(:ensure_batched_background_migration_is_finished).with(migration_arguments)
+ end
+
+ migrate!
+ end
+
+ it 'skips the check for other instances' do
+ expect_next_instance_of(described_class) do |instance|
+ expect(instance).to receive(:com_or_dev_or_test_but_not_jh?).and_return(false)
+ expect(instance).not_to receive(:ensure_batched_background_migration_is_finished)
+ end
+
+ migrate!
+ end
+ end
+end
diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb
index eb4024bbe6a..95730f62b28 100644
--- a/spec/tasks/gitlab/db_rake_spec.rb
+++ b/spec/tasks/gitlab/db_rake_spec.rb
@@ -353,20 +353,17 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout, feature_categor
end
describe 'schema inconsistencies' do
- let(:expected_value) do
- [
- { inconsistency_type: 'wrong_indexes', object_name: 'index_1' },
- { inconsistency_type: 'missing_indexes', object_name: 'index_2' }
- ]
- end
-
let(:runner) { instance_double(Gitlab::Database::SchemaValidation::Runner, execute: inconsistencies) }
let(:inconsistency_class) { Gitlab::Database::SchemaValidation::Inconsistency }
let(:inconsistencies) do
[
- instance_double(inconsistency_class, inspect: 'index_statement_1'),
- instance_double(inconsistency_class, inspect: 'index_statement_2')
+ instance_double(inconsistency_class, inspect: 'index_statement_1', type: 'wrong_indexes'),
+ instance_double(inconsistency_class, inspect: 'index_statement_2', type: 'missing_indexes'),
+ instance_double(inconsistency_class, inspect: 'table_statement_1', type: 'extra_tables',
+ table_name: 'test_replication'),
+ instance_double(inconsistency_class, inspect: 'trigger_statement', type: 'missing_triggers',
+ object_name: 'gitlab_schema_write_trigger_for_users')
]
end
diff --git a/workhorse/go.mod b/workhorse/go.mod
index 75d7c021ca7..7c7a92824df 100644
--- a/workhorse/go.mod
+++ b/workhorse/go.mod
@@ -7,7 +7,7 @@ require (
github.com/BurntSushi/toml v1.2.1
github.com/FZambia/sentinel v1.1.1
github.com/alecthomas/chroma/v2 v2.7.0
- github.com/aws/aws-sdk-go v1.44.254
+ github.com/aws/aws-sdk-go v1.44.255
github.com/disintegration/imaging v1.6.2
github.com/getsentry/raven-go v0.2.0
github.com/golang-jwt/jwt/v5 v5.0.0
diff --git a/workhorse/go.sum b/workhorse/go.sum
index 6582f087a64..a0ec0e19366 100644
--- a/workhorse/go.sum
+++ b/workhorse/go.sum
@@ -569,8 +569,8 @@ github.com/aws/aws-sdk-go v1.43.31/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4
github.com/aws/aws-sdk-go v1.44.156/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.44.187/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.44.200/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
-github.com/aws/aws-sdk-go v1.44.254 h1:8baW4yal2xGiM/Wm5/ZU10drS8sd+BVjMjPFjJx2ooc=
-github.com/aws/aws-sdk-go v1.44.254/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
+github.com/aws/aws-sdk-go v1.44.255 h1:tOd7OP5V6BeHhANksc7CFB/ILS2mHj3kRhTfZKFnsS0=
+github.com/aws/aws-sdk-go v1.44.255/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4=
github.com/aws/aws-sdk-go-v2 v1.17.4 h1:wyC6p9Yfq6V2y98wfDsj6OnNQa4w2BLGCLIxzNhwOGY=
github.com/aws/aws-sdk-go-v2 v1.17.4/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw=