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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2024-01-20 00:08:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-20 00:08:49 +0300
commit1cd61065a0d86b492be5086906429ac5956e3672 (patch)
treebab228469be487451d64eec4a55820501007c8b4
parentd1be3e6f776e1c77976537548c1daa9af2fb2650 (diff)
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.checksum10
-rw-r--r--Gemfile.lock6
-rw-r--r--app/assets/javascripts/ci/pipeline_editor/components/ui/pipeline_editor_empty_state.vue41
-rw-r--r--app/finders/issues_finder.rb2
-rw-r--r--app/helpers/ci/pipeline_editor_helper.rb2
-rw-r--r--app/models/projects/branch_rule.rb7
-rw-r--r--app/services/projects/import_export/relation_export_service.rb10
-rw-r--r--app/workers/project_export_worker.rb2
-rw-r--r--app/workers/projects/import_export/create_relation_exports_worker.rb4
-rw-r--r--app/workers/projects/import_export/relation_export_worker.rb6
-rw-r--r--data/deprecations/16-9-autodevops-build-heroku-builder-upgrade.yml19
-rw-r--r--data/deprecations/16-9-deprecate-version-field-in-ff-api.yml16
-rw-r--r--data/deprecations/16-9-rename-kas-ca-cert-file-cli-option.yml18
-rw-r--r--data/deprecations/templates/example.yml2
-rw-r--r--db/docs/allowed_email_domains.yml13
-rw-r--r--db/docs/group_custom_attributes.yml10
-rw-r--r--db/docs/group_deletion_schedules.yml10
-rw-r--r--db/docs/members.yml2
-rw-r--r--db/docs/namespace_details.yml2
-rw-r--r--db/docs/namespace_settings.yml2
-rw-r--r--db/docs/project_authorizations.yml2
-rw-r--r--db/docs/project_custom_attributes.yml10
-rw-r--r--db/docs/project_settings.yml2
-rw-r--r--db/docs/project_topics.yml10
-rw-r--r--db/docs/projects.yml2
-rw-r--r--db/docs/user_interacted_projects.yml10
-rw-r--r--db/docs/users_star_projects.yml10
-rw-r--r--doc/api/feature_flags.md24
-rw-r--r--doc/api/graphql/reference/index.md52
-rw-r--r--doc/update/deprecations.md56
-rw-r--r--doc/user/clusters/agent/gitops/flux_oci_tutorial.md2
-rw-r--r--doc/user/project/merge_requests/index.md3
-rw-r--r--doc/user/project/repository/code_suggestions/index.md10
-rw-r--r--doc/user/project/repository/code_suggestions/repository_xray.md7
-rw-r--r--doc/user/project/repository/code_suggestions/saas.md5
-rw-r--r--doc/user/project/repository/code_suggestions/self_managed.md5
-rw-r--r--lib/gitlab/import_export/project/relation_saver.rb20
-rw-r--r--spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js63
-rw-r--r--spec/helpers/ci/pipeline_editor_helper_spec.rb2
-rw-r--r--spec/lib/gitlab/import_export/project/relation_saver_spec.rb20
-rw-r--r--spec/services/projects/import_export/relation_export_service_spec.rb3
-rw-r--r--spec/support/shared_examples/workers/project_export_shared_examples.rb6
-rw-r--r--spec/workers/projects/import_export/create_relation_exports_worker_spec.rb2
-rw-r--r--spec/workers/projects/import_export/relation_export_worker_spec.rb11
45 files changed, 347 insertions, 176 deletions
diff --git a/Gemfile b/Gemfile
index 6dd8d6fe19d..86648ac67ca 100644
--- a/Gemfile
+++ b/Gemfile
@@ -226,7 +226,7 @@ gem 'asciidoctor-kroki', '~> 0.8.0', require: false # rubocop:todo Gemfile/Missi
gem 'rouge', '~> 4.2.0' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'truncato', '~> 0.7.12' # rubocop:todo Gemfile/MissingFeatureCategory
gem 'nokogiri', '~> 1.16' # rubocop:todo Gemfile/MissingFeatureCategory
-gem 'gitlab-glfm-markdown', '~> 0.0.10', feature_category: :team_planning
+gem 'gitlab-glfm-markdown', '~> 0.0.11', feature_category: :team_planning
# Calendar rendering
gem 'icalendar' # rubocop:todo Gemfile/MissingFeatureCategory
diff --git a/Gemfile.checksum b/Gemfile.checksum
index 2753440f1cd..5d0ea378879 100644
--- a/Gemfile.checksum
+++ b/Gemfile.checksum
@@ -212,11 +212,11 @@
{"name":"gitlab-dangerfiles","version":"4.6.0","platform":"ruby","checksum":"441b37b17d1dad36268517490a30aaf57e43dffb2e9ebc1da38d3bc9fa20741e"},
{"name":"gitlab-experiment","version":"0.9.1","platform":"ruby","checksum":"f230ee742154805a755d5f2539dc44d93cdff08c5bbbb7656018d61f93d01f48"},
{"name":"gitlab-fog-azure-rm","version":"1.8.0","platform":"ruby","checksum":"e4f24b174b273b88849d12fbcfecb79ae1c09f56cbd614998714c7f0a81e6c28"},
-{"name":"gitlab-glfm-markdown","version":"0.0.10","platform":"aarch64-linux","checksum":"d0baee75081aa5d18bfeda3271844f2d3dbdd1d78fd8d847c4ef60671e47ed6d"},
-{"name":"gitlab-glfm-markdown","version":"0.0.10","platform":"arm64-darwin","checksum":"435f74704886811bf6869c2f9d9c6ec695e11d01d1a2b9414d4b523105ab6f3d"},
-{"name":"gitlab-glfm-markdown","version":"0.0.10","platform":"ruby","checksum":"0310b60304d0a7e6c1bf79f0e6b9ab3cf44befd79a1a9897264f4b4072c17459"},
-{"name":"gitlab-glfm-markdown","version":"0.0.10","platform":"x86_64-darwin","checksum":"5f5b054cdf8a514ff3fae96b9a86a16933d67ef90f25381a47f769ee96b30a4f"},
-{"name":"gitlab-glfm-markdown","version":"0.0.10","platform":"x86_64-linux","checksum":"ce623675f0206d62520384fdd49f2aab9f4586c4f5cbb74362f390bda73dec97"},
+{"name":"gitlab-glfm-markdown","version":"0.0.11","platform":"aarch64-linux","checksum":"6e1d507b40936d6eb287e042f461213e477e4842976a86c2a01ac4b06492ec11"},
+{"name":"gitlab-glfm-markdown","version":"0.0.11","platform":"arm64-darwin","checksum":"1e98714692fb33463027a900818e24d2a74cef70e57993488e5438c78d0c6e41"},
+{"name":"gitlab-glfm-markdown","version":"0.0.11","platform":"ruby","checksum":"4b318fc0271e3ab38920b073b1cbb168f84b5bca74001551779ed3edf622107c"},
+{"name":"gitlab-glfm-markdown","version":"0.0.11","platform":"x86_64-darwin","checksum":"c740f6274f6cd0b8e54cce6250b57880e2a9b6ff7aefbe63c0e813eb49f56c76"},
+{"name":"gitlab-glfm-markdown","version":"0.0.11","platform":"x86_64-linux","checksum":"fbfb0e8699f01e4cd09d60c2f4388ce92ac4975814fdda1e95168fb0213bf4fb"},
{"name":"gitlab-labkit","version":"0.35.0","platform":"ruby","checksum":"26ff06aa4e34ee7b01ead44cc56d01e45822845da70408ca35ff3b20e3c84679"},
{"name":"gitlab-license","version":"2.4.0","platform":"ruby","checksum":"fd238fb1e605a6b9250d4eb1744434ffd131f18d50a3be32f613c883f7635e20"},
{"name":"gitlab-mail_room","version":"0.0.24","platform":"ruby","checksum":"c7bf3df73dbcc024bc98dbf72514520ac2ff2b6d0124de496279fe56c13c3cb3"},
diff --git a/Gemfile.lock b/Gemfile.lock
index eb876ae267d..6cd5f3e16f3 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -695,7 +695,7 @@ GEM
fog-core (= 2.1.0)
fog-json (~> 1.2.0)
mime-types
- gitlab-glfm-markdown (0.0.10)
+ gitlab-glfm-markdown (0.0.11)
rb_sys (~> 0.9.86)
gitlab-labkit (0.35.0)
actionpack (>= 5.0.0, < 8.0.0)
@@ -1894,7 +1894,7 @@ DEPENDENCIES
gitlab-dangerfiles (~> 4.6.0)
gitlab-experiment (~> 0.9.1)
gitlab-fog-azure-rm (~> 1.8.0)
- gitlab-glfm-markdown (~> 0.0.10)
+ gitlab-glfm-markdown (~> 0.0.11)
gitlab-housekeeper!
gitlab-http!
gitlab-labkit (~> 0.35.0)
@@ -2128,4 +2128,4 @@ DEPENDENCIES
yajl-ruby (~> 1.4.3)
BUNDLED WITH
- 2.5.4
+ 2.5.5
diff --git a/app/assets/javascripts/ci/pipeline_editor/components/ui/pipeline_editor_empty_state.vue b/app/assets/javascripts/ci/pipeline_editor/components/ui/pipeline_editor_empty_state.vue
index 90402a89280..7f927498fa1 100644
--- a/app/assets/javascripts/ci/pipeline_editor/components/ui/pipeline_editor_empty_state.vue
+++ b/app/assets/javascripts/ci/pipeline_editor/components/ui/pipeline_editor_empty_state.vue
@@ -1,5 +1,5 @@
<script>
-import { GlButton, GlSprintf } from '@gitlab/ui';
+import { GlButton, GlSprintf, GlEmptyState } from '@gitlab/ui';
import { __ } from '~/locale';
import PipelineEditorFileNav from '~/ci/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue';
@@ -7,6 +7,7 @@ export default {
components: {
GlButton,
GlSprintf,
+ GlEmptyState,
PipelineEditorFileNav,
},
i18n: {
@@ -40,24 +41,22 @@ export default {
<template>
<div>
<pipeline-editor-file-nav v-on="$listeners" />
- <div class="gl-display-flex gl-flex-direction-column gl-align-items-center gl-mt-11">
- <img :src="emptyStateIllustrationPath" />
- <div
- v-if="usesExternalConfig"
- class="gl-display-flex gl-flex-direction-column gl-align-items-center"
- >
- <h1 class="gl-font-size-h1">{{ $options.i18n.externalCiNote }}</h1>
- <p class="gl-mt-3">{{ $options.i18n.externalCiInstructions }}</p>
- </div>
- <div v-else class="gl-display-flex gl-flex-direction-column gl-align-items-center">
- <h1 class="gl-font-size-h1">{{ $options.i18n.title }}</h1>
- <p class="gl-mt-3">
- <gl-sprintf :message="$options.i18n.body">
- <template #code="{ content }">
- <code>{{ content }}</code>
- </template>
- </gl-sprintf>
- </p>
+ <gl-empty-state
+ v-if="usesExternalConfig"
+ :title="$options.i18n.externalCiNote"
+ :description="$options.i18n.externalCiInstructions"
+ :svg-path="emptyStateIllustrationPath"
+ />
+
+ <gl-empty-state v-else :title="$options.i18n.title" :svg-path="emptyStateIllustrationPath">
+ <template #description>
+ <gl-sprintf :message="$options.i18n.body">
+ <template #code="{ content }">
+ <code>{{ content }}</code>
+ </template>
+ </gl-sprintf>
+ </template>
+ <template #actions>
<gl-button
variant="confirm"
class="gl-mt-3"
@@ -66,7 +65,7 @@ export default {
>
{{ $options.i18n.btnText }}
</gl-button>
- </div>
- </div>
+ </template>
+ </gl-empty-state>
</div>
</template>
diff --git a/app/finders/issues_finder.rb b/app/finders/issues_finder.rb
index b47e8a47a7f..8e7bc5d49c3 100644
--- a/app/finders/issues_finder.rb
+++ b/app/finders/issues_finder.rb
@@ -118,7 +118,7 @@ class IssuesFinder < IssuableFinder
namespaces = if relations.one?
relations.first
else
- Namespace.from_union(relations, remove_duplicates: false)
+ Namespace.from_union(relations)
end
items.in_namespaces(namespaces)
diff --git a/app/helpers/ci/pipeline_editor_helper.rb b/app/helpers/ci/pipeline_editor_helper.rb
index f78a4aeaa49..200bd058c37 100644
--- a/app/helpers/ci/pipeline_editor_helper.rb
+++ b/app/helpers/ci/pipeline_editor_helper.rb
@@ -21,7 +21,7 @@ module Ci
"ci-lint-path" => project_ci_lint_path(project),
"ci-troubleshooting-path" => help_page_path('ci/troubleshooting', anchor: 'common-cicd-issues'),
"default-branch" => project.default_branch_or_main,
- "empty-state-illustration-path" => image_path('illustrations/empty-state/empty-dag-md.svg'),
+ "empty-state-illustration-path" => image_path('illustrations/empty-state/empty-pipeline-md.svg'),
"initial-branch-name" => initial_branch,
"includes-help-page-path" => help_page_path('ci/yaml/includes'),
"lint-help-page-path" => help_page_path('ci/lint', anchor: 'check-cicd-syntax'),
diff --git a/app/models/projects/branch_rule.rb b/app/models/projects/branch_rule.rb
index ae59d24e557..a32e981f791 100644
--- a/app/models/projects/branch_rule.rb
+++ b/app/models/projects/branch_rule.rb
@@ -5,12 +5,13 @@ module Projects
extend Forwardable
attr_reader :project, :protected_branch
+ alias_method :branch_protection, :protected_branch
def_delegators(:protected_branch, :name, :group, :default_branch?, :created_at, :updated_at)
def initialize(project, protected_branch)
- @protected_branch = protected_branch
@project = project
+ @protected_branch = protected_branch
end
def protected?
@@ -22,10 +23,6 @@ module Projects
matching_branches = protected_branch.matching(branch_names)
matching_branches.count
end
-
- def branch_protection
- protected_branch
- end
end
end
diff --git a/app/services/projects/import_export/relation_export_service.rb b/app/services/projects/import_export/relation_export_service.rb
index 33da5b39c20..a38d66e5ff7 100644
--- a/app/services/projects/import_export/relation_export_service.rb
+++ b/app/services/projects/import_export/relation_export_service.rb
@@ -5,10 +5,12 @@ module Projects
class RelationExportService
include Gitlab::ImportExport::CommandLineUtil
- def initialize(relation_export, jid)
+ def initialize(relation_export, user, jid, params = {})
@relation_export = relation_export
+ @user = user
@jid = jid
@logger = Gitlab::Export::Logger.build
+ @params = params
end
def execute
@@ -33,7 +35,7 @@ module Projects
private
- attr_reader :relation_export, :jid, :logger
+ attr_reader :relation_export, :user, :jid, :logger, :params
delegate :relation, :project_export_job, to: :relation_export
delegate :project, to: :project_export_job
@@ -60,7 +62,9 @@ module Projects
Gitlab::ImportExport::Project::RelationSaver.new(
project: project,
shared: shared,
- relation: relation
+ relation: relation,
+ user: user,
+ params: params
)
end
end
diff --git a/app/workers/project_export_worker.rb b/app/workers/project_export_worker.rb
index ee892d43313..1b969844884 100644
--- a/app/workers/project_export_worker.rb
+++ b/app/workers/project_export_worker.rb
@@ -15,6 +15,8 @@ class ProjectExportWorker # rubocop:disable Scalability/IdempotentWorker
def perform(current_user_id, project_id, after_export_strategy = {}, params = {})
current_user = User.find(current_user_id)
+ params.symbolize_keys!
+
project = Project.find(project_id)
export_job = project.export_jobs.safe_find_or_create_by(jid: self.jid)
after_export = build!(after_export_strategy)
diff --git a/app/workers/projects/import_export/create_relation_exports_worker.rb b/app/workers/projects/import_export/create_relation_exports_worker.rb
index 9ca69a5500a..e115c8917b1 100644
--- a/app/workers/projects/import_export/create_relation_exports_worker.rb
+++ b/app/workers/projects/import_export/create_relation_exports_worker.rb
@@ -18,7 +18,7 @@ module Projects
INITIAL_DELAY = 10.seconds
# rubocop: disable CodeReuse/ActiveRecord
- def perform(user_id, project_id, after_export_strategy = {})
+ def perform(user_id, project_id, after_export_strategy = {}, params = {})
project = Project.find_by_id(project_id)
return unless project
@@ -30,7 +30,7 @@ module Projects
end
relation_exports.each do |relation_export|
- RelationExportWorker.with_status.perform_async(relation_export.id)
+ RelationExportWorker.with_status.perform_async(relation_export.id, user_id, params)
end
WaitRelationExportsWorker.perform_in(
diff --git a/app/workers/projects/import_export/relation_export_worker.rb b/app/workers/projects/import_export/relation_export_worker.rb
index 7747d4f4099..dd02c36ef42 100644
--- a/app/workers/projects/import_export/relation_export_worker.rb
+++ b/app/workers/projects/import_export/relation_export_worker.rb
@@ -33,13 +33,15 @@ module Projects
Gitlab::Export::Logger.error(log_payload)
end
- def perform(project_relation_export_id)
+ def perform(project_relation_export_id, user_id, params = {})
+ user = User.find(user_id)
+ params.symbolize_keys!
relation_export = Projects::ImportExport::RelationExport.find(project_relation_export_id)
relation_export.retry! if relation_export.started?
if relation_export.queued?
- Projects::ImportExport::RelationExportService.new(relation_export, jid).execute
+ Projects::ImportExport::RelationExportService.new(relation_export, user, jid, params).execute
end
end
end
diff --git a/data/deprecations/16-9-autodevops-build-heroku-builder-upgrade.yml b/data/deprecations/16-9-autodevops-build-heroku-builder-upgrade.yml
new file mode 100644
index 00000000000..541ee0dec27
--- /dev/null
+++ b/data/deprecations/16-9-autodevops-build-heroku-builder-upgrade.yml
@@ -0,0 +1,19 @@
+- title: "Heroku image upgrade in Auto DevOps build"
+ # The milestones for the deprecation announcement, and the removal.
+ removal_milestone: "17.0"
+ announcement_milestone: "16.9"
+ # Change breaking_change to false if needed.
+ breaking_change: true
+ # The stage and GitLab username of the person reporting the change,
+ # and a link to the deprecation issue
+ reporter: timofurrer
+ stage: deploy
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/437937
+ body: | # (required) Don't change this line.
+ In GitLab 17.0, the `auto-build-image` project will upgrade from the `heroku/builder:20` image to `heroku/builder:22`.
+
+ To test the behavior of the new image, set the CI/CD variable `AUTO_DEVOPS_BUILD_IMAGE_CNB_BUILDER` to
+ `heroku/builder:22`.
+
+ To continue to use `heroku/builder:20` after GitLab 17.0,
+ set `AUTO_DEVOPS_BUILD_IMAGE_CNB_BUILDER` to `heroku/builder:20`.
diff --git a/data/deprecations/16-9-deprecate-version-field-in-ff-api.yml b/data/deprecations/16-9-deprecate-version-field-in-ff-api.yml
new file mode 100644
index 00000000000..7e13e7cb868
--- /dev/null
+++ b/data/deprecations/16-9-deprecate-version-field-in-ff-api.yml
@@ -0,0 +1,16 @@
+- title: "Deprecate `version` field in feature flag API"
+ # The milestones for the deprecation announcement, and the removal.
+ removal_milestone: "17.0"
+ announcement_milestone: "16.9"
+ # Change breaking_change to false if needed.
+ breaking_change: true
+ # The stage and GitLab username of the person reporting the change,
+ # and a link to the deprecation issue
+ reporter: timofurrer
+ stage: deploy
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/437986
+ body: | # (required) Don't change this line.
+ The `version` field in the [feature flag REST API](https://docs.gitlab.com/ee/api/feature_flags.html)
+ is deprecated and will be removed in GitLab 17.0.
+
+ After the `version` field is removed, there won't be a way to create legacy feature flags.
diff --git a/data/deprecations/16-9-rename-kas-ca-cert-file-cli-option.yml b/data/deprecations/16-9-rename-kas-ca-cert-file-cli-option.yml
new file mode 100644
index 00000000000..b4c7f89315d
--- /dev/null
+++ b/data/deprecations/16-9-rename-kas-ca-cert-file-cli-option.yml
@@ -0,0 +1,18 @@
+- title: "Agent for Kubernetes option `ca-cert-file` renamed"
+ # The milestones for the deprecation announcement, and the removal.
+ removal_milestone: "17.0"
+ announcement_milestone: "16.9"
+ # Change breaking_change to false if needed.
+ breaking_change: true
+ # The stage and GitLab username of the person reporting the change,
+ # and a link to the deprecation issue
+ reporter: timofurrer
+ stage: deploy
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/437728
+ body: | # (required) Don't change this line.
+ In the GitLab agent for Kubernetes (agentk), the `--ca-cert-file` command line option
+ and the corresponding `config.caCert` Helm chart value have been renamed
+ to `--kas-ca-cert-file` and `config.kasCaCert`, respectively.
+
+ The old `--ca-cert-file` and `config.caCert` options are deprecated, and will
+ be removed in GitLab 17.0.
diff --git a/data/deprecations/templates/example.yml b/data/deprecations/templates/example.yml
index a1ca50f0e1d..dff7075e1bd 100644
--- a/data/deprecations/templates/example.yml
+++ b/data/deprecations/templates/example.yml
@@ -1,4 +1,4 @@
-# Use this template tp announce a feature deprecation or other
+# Use this template to announce a feature deprecation or other
# important planned changes at least three releases prior to removal.
# Breaking changes must happen in a major release.
#
diff --git a/db/docs/allowed_email_domains.yml b/db/docs/allowed_email_domains.yml
index 1ab2f3e1740..9c57efb6c3a 100644
--- a/db/docs/allowed_email_domains.yml
+++ b/db/docs/allowed_email_domains.yml
@@ -4,7 +4,16 @@ classes:
- AllowedEmailDomain
feature_categories:
- groups_and_projects
-description: Stores email domains for group, only members with email from those domains can be added to the group
+description: Stores email domains for group, only members with email from those domains
+ can be added to the group
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/14800
milestone: '12.2'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ group_id: namespaces
diff --git a/db/docs/group_custom_attributes.yml b/db/docs/group_custom_attributes.yml
index 6fed09909c8..1e90187e232 100644
--- a/db/docs/group_custom_attributes.yml
+++ b/db/docs/group_custom_attributes.yml
@@ -7,4 +7,12 @@ feature_categories:
description: Stores custom attributes per group
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14593
milestone: '10.2'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ group_id: namespaces
diff --git a/db/docs/group_deletion_schedules.yml b/db/docs/group_deletion_schedules.yml
index a2e84582ccd..fbfca64b25d 100644
--- a/db/docs/group_deletion_schedules.yml
+++ b/db/docs/group_deletion_schedules.yml
@@ -7,4 +7,12 @@ feature_categories:
description: TODO
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20276
milestone: '12.6'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ group_id: namespaces
diff --git a/db/docs/members.yml b/db/docs/members.yml
index 0d756c18d74..bf5422acbf0 100644
--- a/db/docs/members.yml
+++ b/db/docs/members.yml
@@ -11,3 +11,5 @@ description: Stores members per namespace
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/3503b504eabf95487fc3fb49df953a7d694da4fe
milestone: '7.4'
gitlab_schema: gitlab_main_cell
+sharding_key:
+ member_namespace_id: namespaces
diff --git a/db/docs/namespace_details.yml b/db/docs/namespace_details.yml
index d434f580f1c..2027a8c9df9 100644
--- a/db/docs/namespace_details.yml
+++ b/db/docs/namespace_details.yml
@@ -8,3 +8,5 @@ description: Used to store details for namespaces
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/82958
milestone: '15.3'
gitlab_schema: gitlab_main_cell
+sharding_key:
+ namespace_id: namespaces
diff --git a/db/docs/namespace_settings.yml b/db/docs/namespace_settings.yml
index df723c37fdc..38e9852ea3f 100644
--- a/db/docs/namespace_settings.yml
+++ b/db/docs/namespace_settings.yml
@@ -8,3 +8,5 @@ description: Stores settings per namespace
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36321
milestone: '13.2'
gitlab_schema: gitlab_main_cell
+sharding_key:
+ namespace_id: namespaces
diff --git a/db/docs/project_authorizations.yml b/db/docs/project_authorizations.yml
index 7e15b817122..a8fcc6a3061 100644
--- a/db/docs/project_authorizations.yml
+++ b/db/docs/project_authorizations.yml
@@ -9,3 +9,5 @@ description: Stores maximal access to the project per user
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/6839
milestone: '8.14'
gitlab_schema: gitlab_main_cell
+sharding_key:
+ project_id: projects
diff --git a/db/docs/project_custom_attributes.yml b/db/docs/project_custom_attributes.yml
index d3a5f0ea0a9..8d6e0fc2d6d 100644
--- a/db/docs/project_custom_attributes.yml
+++ b/db/docs/project_custom_attributes.yml
@@ -7,4 +7,12 @@ feature_categories:
description: Stores custom attributes per project
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/14593
milestone: '10.2'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/db/docs/project_settings.yml b/db/docs/project_settings.yml
index d9b1c68a0b9..10bb792b44b 100644
--- a/db/docs/project_settings.yml
+++ b/db/docs/project_settings.yml
@@ -8,3 +8,5 @@ description: Stores settings per project
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/a2a7ad291f64a5db74c1bc21fb556e6e8862d0f3
milestone: '10.8'
gitlab_schema: gitlab_main_cell
+sharding_key:
+ project_id: projects
diff --git a/db/docs/project_topics.yml b/db/docs/project_topics.yml
index 4343b440089..4074fd609c4 100644
--- a/db/docs/project_topics.yml
+++ b/db/docs/project_topics.yml
@@ -7,4 +7,12 @@ feature_categories:
description: Stores topics per project relationship
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/67574
milestone: '14.3'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/db/docs/projects.yml b/db/docs/projects.yml
index 36dc32be0ea..080e5073487 100644
--- a/db/docs/projects.yml
+++ b/db/docs/projects.yml
@@ -27,3 +27,5 @@ schema_inconsistencies:
- type: missing_indexes
object_name: idx_projects_id_created_at_disable_overriding_approvers_false
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/137884
+sharding_key:
+ namespace_id: namespaces
diff --git a/db/docs/user_interacted_projects.yml b/db/docs/user_interacted_projects.yml
index 565dcdedf2c..c93a97bba8f 100644
--- a/db/docs/user_interacted_projects.yml
+++ b/db/docs/user_interacted_projects.yml
@@ -7,4 +7,12 @@ feature_categories:
description: Tracks which projects a given user has actively interacted with
introduced_by_url: https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/17327
milestone: '10.6'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/db/docs/users_star_projects.yml b/db/docs/users_star_projects.yml
index fb5eda2d518..679743a0b69 100644
--- a/db/docs/users_star_projects.yml
+++ b/db/docs/users_star_projects.yml
@@ -7,4 +7,12 @@ feature_categories:
description: Stores conection between users and project through staring action
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/714f7201d3362793d11f33793e5ef6dc83bdd2f0
milestone: '7.1'
-gitlab_schema: gitlab_main
+gitlab_schema: gitlab_main_cell
+allow_cross_joins:
+- gitlab_main_clusterwide
+allow_cross_transactions:
+- gitlab_main_clusterwide
+allow_cross_foreign_keys:
+- gitlab_main_clusterwide
+sharding_key:
+ project_id: projects
diff --git a/doc/api/feature_flags.md b/doc/api/feature_flags.md
index 59fb4660f30..c81a3131f4c 100644
--- a/doc/api/feature_flags.md
+++ b/doc/api/feature_flags.md
@@ -171,19 +171,19 @@ Creates a new feature flag.
POST /projects/:id/feature_flags
```
-| Attribute | Type | Required | Description |
-| ------------------- | ---------------- | ---------- | ---------------------------------------------------------------------------------------|
-| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
-| `name` | string | yes | The name of the feature flag. |
-| `version` | string | yes | The version of the feature flag. Must be `new_version_flag`. Omit to create a Legacy feature flag. |
-| `description` | string | no | The description of the feature flag. |
-| `active` | boolean | no | The active state of the flag. Defaults to true. [Supported](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38350) in GitLab 13.3 and later. |
-| `strategies` | array of strategy JSON objects | no | The feature flag [strategies](../operations/feature_flags.md#feature-flag-strategies). |
+| Attribute | Type | Required | Description |
+| ------------------- | ---------------- | ---------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `id` | integer/string | yes | The ID or [URL-encoded path of the project](rest/index.md#namespaced-path-encoding). |
+| `name` | string | yes | The name of the feature flag. |
+| `version` | string | yes | **Deprecated** The version of the feature flag. Must be `new_version_flag`. Omit to create a Legacy feature flag. |
+| `description` | string | no | The description of the feature flag. |
+| `active` | boolean | no | The active state of the flag. Defaults to true. [Supported](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/38350) in GitLab 13.3 and later. |
+| `strategies` | array of strategy JSON objects | no | The feature flag [strategies](../operations/feature_flags.md#feature-flag-strategies). |
| `strategies:name` | JSON | no | The strategy name. Can be `default`, `gradualRolloutUserId`, `userWithId`, or `gitlabUserList`. In [GitLab 13.5](https://gitlab.com/gitlab-org/gitlab/-/issues/36380) and later, can be [`flexibleRollout`](https://docs.getunleash.io/user_guide/activation_strategy/#gradual-rollout). |
-| `strategies:parameters` | JSON | no | The strategy parameters. |
-| `strategies:scopes` | JSON | no | The scopes for the strategy. |
-| `strategies:scopes:environment_scope` | string | no | The environment scope of the scope. |
-| `strategies:user_list_id` | integer/string | no | The ID of the feature flag user list. If strategy is `gitlabUserList`. |
+| `strategies:parameters` | JSON | no | The strategy parameters. |
+| `strategies:scopes` | JSON | no | The scopes for the strategy. |
+| `strategies:scopes:environment_scope` | string | no | The environment scope of the scope. |
+| `strategies:user_list_id` | integer/string | no | The ID of the feature flag user list. If strategy is `gitlabUserList`. |
```shell
curl "https://gitlab.example.com/api/v4/projects/1/feature_flags" \
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index e48cec20e9e..a5efccabd38 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -1103,10 +1103,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Find a workspace.
-WARNING:
-**Introduced** in 16.0.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`Workspace`](#workspace).
#### Arguments
@@ -1119,10 +1115,6 @@ Returns [`Workspace`](#workspace).
Find workspaces across the entire instance. This field is only available to instance admins, it will return an empty result for all non-admins.
-WARNING:
-**Introduced** in 16.0.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -8743,10 +8735,6 @@ Input type: `WorkItemUpdateInput`
### `Mutation.workspaceCreate`
-WARNING:
-**Introduced** in 16.0.
-This feature is an Experiment. It can be changed or removed at any time.
-
Input type: `WorkspaceCreateInput`
#### Arguments
@@ -8772,10 +8760,6 @@ Input type: `WorkspaceCreateInput`
### `Mutation.workspaceUpdate`
-WARNING:
-**Introduced** in 16.0.
-This feature is an Experiment. It can be changed or removed at any time.
-
Input type: `WorkspaceUpdateInput`
#### Arguments
@@ -14412,10 +14396,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Workspaces owned by the current user.
-WARNING:
-**Introduced** in 16.6.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -15129,10 +15109,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Workspaces owned by the current user.
-WARNING:
-**Introduced** in 16.6.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -16251,10 +16227,6 @@ GitLab CI/CD configuration template.
Workspaces associated with the agent.
-WARNING:
-**Introduced** in 16.7.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -17208,10 +17180,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Workspaces owned by the current user.
-WARNING:
-**Introduced** in 16.6.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -22093,10 +22061,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Workspaces owned by the current user.
-WARNING:
-**Introduced** in 16.6.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -22381,10 +22345,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Workspaces owned by the current user.
-WARNING:
-**Introduced** in 16.6.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -22732,10 +22692,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Workspaces owned by the current user.
-WARNING:
-**Introduced** in 16.6.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -23056,10 +23012,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Workspaces owned by the current user.
-WARNING:
-**Introduced** in 16.6.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
@@ -28163,10 +28115,6 @@ four standard [pagination arguments](#connection-pagination-arguments):
Workspaces owned by the current user.
-WARNING:
-**Introduced** in 16.6.
-This feature is an Experiment. It can be changed or removed at any time.
-
Returns [`WorkspaceConnection`](#workspaceconnection).
This field returns a [connection](#connections). It accepts the
diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md
index a0d1451c2ce..7a7cac19740 100644
--- a/doc/update/deprecations.md
+++ b/doc/update/deprecations.md
@@ -227,6 +227,25 @@ From GitLab 18.0 and later, the methods to register runners introduced by the ne
<div class="deprecation breaking-change" data-milestone="17.0">
+### Agent for Kubernetes option `ca-cert-file` renamed
+
+<div class="deprecation-notes">
+- Announced in GitLab <span class="milestone">16.9</span>
+- Removal in GitLab <span class="milestone">17.0</span> ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change))
+- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/437728).
+</div>
+
+In the GitLab agent for Kubernetes (agentk), the `--ca-cert-file` command line option
+and the corresponding `config.caCert` Helm chart value have been renamed
+to `--kas-ca-cert-file` and `config.kasCaCert`, respectively.
+
+The old `--ca-cert-file` and `config.caCert` options are deprecated, and will
+be removed in GitLab 17.0.
+
+</div>
+
+<div class="deprecation breaking-change" data-milestone="17.0">
+
### Auto DevOps support for Herokuish is deprecated
<div class="deprecation-notes">
@@ -471,6 +490,23 @@ The GitLab Runner Kubernetes executor setting, `terminationGracePeriodSeconds`,
<div class="deprecation breaking-change" data-milestone="17.0">
+### Deprecate `version` field in feature flag API
+
+<div class="deprecation-notes">
+- Announced in GitLab <span class="milestone">16.9</span>
+- Removal in GitLab <span class="milestone">17.0</span> ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change))
+- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/437986).
+</div>
+
+The `version` field in the [feature flag REST API](https://docs.gitlab.com/ee/api/feature_flags.html)
+is deprecated and will be removed in GitLab 17.0.
+
+After the `version` field is removed, there won't be a way to create legacy feature flags.
+
+</div>
+
+<div class="deprecation breaking-change" data-milestone="17.0">
+
### Deprecate change vulnerability status from the Developer role
<div class="deprecation-notes">
@@ -795,6 +831,26 @@ In GitLab 16.0 and later:
<div class="deprecation breaking-change" data-milestone="17.0">
+### Heroku image upgrade in Auto DevOps build
+
+<div class="deprecation-notes">
+- Announced in GitLab <span class="milestone">16.9</span>
+- Removal in GitLab <span class="milestone">17.0</span> ([breaking change](https://docs.gitlab.com/ee/update/terminology.html#breaking-change))
+- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/437937).
+</div>
+
+In GitLab 17.0, the `auto-build-image` project will upgrade from the `heroku/builder:20` image to `heroku/builder:22`.
+
+To test the behavior of the new image, set the CI/CD variable `AUTO_DEVOPS_BUILD_IMAGE_CNB_BUILDER` to
+`heroku/builder:22`.
+
+To continue to use `heroku/builder:20` after GitLab 17.0,
+set `AUTO_DEVOPS_BUILD_IMAGE_CNB_BUILDER` to `heroku/builder:20`.
+
+</div>
+
+<div class="deprecation breaking-change" data-milestone="17.0">
+
### Internal container registry API tag deletion endpoint
<div class="deprecation-notes">
diff --git a/doc/user/clusters/agent/gitops/flux_oci_tutorial.md b/doc/user/clusters/agent/gitops/flux_oci_tutorial.md
index e1832de51af..09e844e448a 100644
--- a/doc/user/clusters/agent/gitops/flux_oci_tutorial.md
+++ b/doc/user/clusters/agent/gitops/flux_oci_tutorial.md
@@ -106,7 +106,7 @@ To configure, create an [`OCIRepository`](https://fluxcd.io/flux/components/sour
with the following contents:
```yaml
- apiVersion: source.toolkit.fluxcd.io/v1
+ apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: web-app-manifests
diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md
index dece5600b0d..345d937ed8c 100644
--- a/doc/user/project/merge_requests/index.md
+++ b/doc/user/project/merge_requests/index.md
@@ -229,6 +229,7 @@ An administrator can make this option the default in the project's settings.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/320902) in GitLab 13.9.
> - [Disabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/320902) in GitLab 13.9.
> - [Enabled on self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/320895) GitLab 13.10.
+> - Chained merge requests [changed](https://gitlab.com/gitlab-org/gitlab/-/issues/323329) to automatically rebase on the new target branch in GitLab 16.9.
Merge requests are often chained together, with one merge request depending on
the code added or changed in another merge request. To support keeping individual
@@ -240,7 +241,7 @@ target branch merges into `main`. For example:
If these merge requests are open at the same time, and merge request 1 (`feature-alpha`)
merges into `main`, GitLab updates the destination of merge request 2 from `feature-alpha`
-to `main`.
+to `main` and then rebases the source branch onto the new target branch.
Merge requests with interconnected content updates are usually handled in one of these ways:
diff --git a/doc/user/project/repository/code_suggestions/index.md b/doc/user/project/repository/code_suggestions/index.md
index ed9eeac1c2c..8f995dc6508 100644
--- a/doc/user/project/repository/code_suggestions/index.md
+++ b/doc/user/project/repository/code_suggestions/index.md
@@ -11,13 +11,18 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - [Introduced support for Code Generation](https://gitlab.com/gitlab-org/gitlab/-/issues/415583) in GitLab 16.3.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/435271) in GitLab 16.7.
+NOTE:
+Starting in February 2024, Code Suggestions will be part of
+[GitLab Duo Pro](https://about.gitlab.com/gitlab-duo/),
+available to Premium and Ultimate users for purchase now.
+
Write code more efficiently by using generative AI to suggest code while you're developing.
With [GitLab Duo Code Suggestions](https://about.gitlab.com/solutions/code-suggestions/), you get:
- Code Completion, which suggests completions to the current line you are typing. These suggestions are usually low latency.
- Code Generation, which generates code based on a natural language code
- comment block. Write a comment like `# Type more here` to generate the
+ comment block. Write a comment like `# Type more here`, then press <kbd>Enter</kbd> to generate the
appropriate code, based on the context of your comment and the rest of your code.
- Algorithms or large code blocks may take more than 10 seconds to generate.
- Streaming of code generation responses is supported in VS Code, leading to faster average response times. Other supported IDEs offer slower response times and will return the generated code in a single block.
@@ -66,8 +71,10 @@ The editor supports these languages:
|------------------|------------------------|------------------------|------------------------|--------|
| C++ | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| C# | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
+| CSS | **{check-circle}** No | **{check-circle}** Yes | **{check-circle}** No | **{check-circle}** No |
| Go | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| Google SQL | **{dotted-circle}** No | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
+| HTML | **{check-circle}** No | **{check-circle}** Yes | **{check-circle}** No | **{check-circle}** No |
| Java | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| JavaScript | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| Kotlin | **{check-circle}** Yes (Requires third-party extension providing Kotlin support) | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
@@ -76,6 +83,7 @@ The editor supports these languages:
| Ruby | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| Rust | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| Scala | **{check-circle}** Yes (Requires third-party extension providing Scala support) | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
+| Shell scripts (`bash` only) | **{check-circle}** No | **{check-circle}** Yes | **{check-circle}** No | **{check-circle}** No |
| Swift | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| TypeScript | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes | **{check-circle}** Yes |
| Terraform | **{check-circle}** Yes (Requires third-party extension providing Terraform support) | **{check-circle}** Yes | **{dotted-circle}** No | **{check-circle}** Yes (Requires third-party extension providing the `terraform` file type) |
diff --git a/doc/user/project/repository/code_suggestions/repository_xray.md b/doc/user/project/repository/code_suggestions/repository_xray.md
index 465bfc8d16a..356b0958344 100644
--- a/doc/user/project/repository/code_suggestions/repository_xray.md
+++ b/doc/user/project/repository/code_suggestions/repository_xray.md
@@ -6,7 +6,12 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Repository X-Ray **(PREMIUM ALL)**
-> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12060) in GitLab 16.7.
+> [Introduced](https://gitlab.com/groups/gitlab-org/-/epics/12060) in GitLab 16.7.
+
+NOTE:
+Starting in February 2024, Code Suggestions will be part of
+[GitLab Duo Pro](https://about.gitlab.com/gitlab-duo/),
+available to Premium and Ultimate users for purchase now.
Repository X-Ray enhances [GitLab Duo Code Suggestions](index.md) by providing additional context to improve the accuracy and relevance of code recommendations.
diff --git a/doc/user/project/repository/code_suggestions/saas.md b/doc/user/project/repository/code_suggestions/saas.md
index 4b1cc762406..a0556d00822 100644
--- a/doc/user/project/repository/code_suggestions/saas.md
+++ b/doc/user/project/repository/code_suggestions/saas.md
@@ -13,6 +13,11 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - [Enabled by default](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121079) in GitLab 16.1.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/435271) in GitLab 16.7.
+NOTE:
+Starting in February 2024, Code Suggestions will be part of
+[GitLab Duo Pro](https://about.gitlab.com/gitlab-duo/),
+available to Premium and Ultimate users for purchase now.
+
Write code more efficiently by using generative AI to suggest code while you're developing.
Usage of GitLab Duo Code Suggestions is governed by the [GitLab Testing Agreement](https://about.gitlab.com/handbook/legal/testing-agreement/).
diff --git a/doc/user/project/repository/code_suggestions/self_managed.md b/doc/user/project/repository/code_suggestions/self_managed.md
index 8cd499c13d0..e14d4197cd9 100644
--- a/doc/user/project/repository/code_suggestions/self_managed.md
+++ b/doc/user/project/repository/code_suggestions/self_managed.md
@@ -12,6 +12,11 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> - Code Suggestions in the GitLab WebIDE enabled for all GitLab-hosted customers.
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/435271) in GitLab 16.7.
+NOTE:
+Starting in February 2024, Code Suggestions will be part of
+[GitLab Duo Pro](https://about.gitlab.com/gitlab-duo/),
+available to Premium and Ultimate users for purchase now.
+
Write code more efficiently by using generative AI to suggest code while you're developing.
GitLab Duo Code Suggestions are available on GitLab Enterprise Edition.
diff --git a/lib/gitlab/import_export/project/relation_saver.rb b/lib/gitlab/import_export/project/relation_saver.rb
index 967239e17c1..94619113102 100644
--- a/lib/gitlab/import_export/project/relation_saver.rb
+++ b/lib/gitlab/import_export/project/relation_saver.rb
@@ -4,10 +4,12 @@ module Gitlab
module ImportExport
module Project
class RelationSaver
- def initialize(project:, shared:, relation:)
+ def initialize(project:, shared:, relation:, user:, params: {})
@project = project
@relation = relation
@shared = shared
+ @user = user
+ @params = params
end
def save
@@ -25,18 +27,28 @@ module Gitlab
private
- attr_reader :project, :relation, :shared
+ attr_reader :project, :relation, :shared, :user, :params
def serializer
@serializer ||= ::Gitlab::ImportExport::Json::StreamingSerializer.new(
- project,
+ presented_project_for_export,
reader.project_tree,
json_writer,
exportable_path: 'tree/project',
- current_user: nil
+ current_user: user
)
end
+ def presented_project_for_export
+ presentable_params = {
+ presenter_class: Projects::ImportExport::ProjectExportPresenter,
+ current_user: user
+ }
+ presentable_params[:override_description] = params[:description] if params[:description].present?
+
+ project.present(**presentable_params)
+ end
+
def root_relation?
relation == Projects::ImportExport::RelationExport::ROOT_RELATION
end
diff --git a/spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js b/spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js
index e636a89c6d9..4bb6a60a141 100644
--- a/spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js
+++ b/spec/frontend/ci/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js
@@ -1,27 +1,27 @@
-import { GlButton, GlSprintf } from '@gitlab/ui';
+import { GlButton, GlSprintf, GlEmptyState } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import PipelineEditorFileNav from '~/ci/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue';
import PipelineEditorEmptyState from '~/ci/pipeline_editor/components/ui/pipeline_editor_empty_state.vue';
+const emptyStateIllustrationPath = 'illustrations/empty-state/empty-pipeline-md.svg';
+
describe('Pipeline editor empty state', () => {
let wrapper;
const defaultProvide = {
- emptyStateIllustrationPath: 'my/svg/path',
+ emptyStateIllustrationPath,
usesExternalConfig: false,
};
const createComponent = ({ provide } = {}) => {
wrapper = shallowMount(PipelineEditorEmptyState, {
provide: { ...defaultProvide, ...provide },
+ stubs: { GlSprintf },
});
};
const findFileNav = () => wrapper.findComponent(PipelineEditorFileNav);
- const findSvgImage = () => wrapper.find('img');
- const findTitle = () => wrapper.find('h1');
- const findExternalCiInstructions = () => wrapper.find('p');
- const findConfirmButton = () => wrapper.findComponent(GlButton);
- const findDescription = () => wrapper.findComponent(GlSprintf);
+ const findEmptyState = () => wrapper.findComponent(GlEmptyState);
+ const findConfirmButton = () => findEmptyState().findComponent(GlButton);
describe('when project uses an external CI config', () => {
beforeEach(() => {
@@ -30,22 +30,13 @@ describe('Pipeline editor empty state', () => {
});
});
- it('renders an svg image', () => {
- expect(findSvgImage().exists()).toBe(true);
- });
-
- it('renders the correct title and instructions', () => {
- expect(findTitle().exists()).toBe(true);
- expect(findExternalCiInstructions().exists()).toBe(true);
-
- expect(findExternalCiInstructions().html()).toContain(
- wrapper.vm.$options.i18n.externalCiInstructions,
- );
- expect(findTitle().text()).toBe(wrapper.vm.$options.i18n.externalCiNote);
- });
-
- it('does not render the CTA button', () => {
- expect(findConfirmButton().exists()).toBe(false);
+ it('renders an empty state', () => {
+ expect(findEmptyState().props()).toMatchObject({
+ description: wrapper.vm.$options.i18n.externalCiInstructions,
+ primaryButtonText: null,
+ svgPath: emptyStateIllustrationPath,
+ title: "This project's pipeline configuration is located outside this repository",
+ });
});
});
@@ -54,27 +45,23 @@ describe('Pipeline editor empty state', () => {
createComponent();
});
- it('renders an svg image', () => {
- expect(findSvgImage().exists()).toBe(true);
+ it('renders the file nav', () => {
+ expect(findFileNav().exists()).toBe(true);
});
- it('renders a title', () => {
- expect(findTitle().exists()).toBe(true);
- expect(findTitle().text()).toBe(wrapper.vm.$options.i18n.title);
+ it('renders an empty state', () => {
+ expect(findEmptyState().exists()).toBe(true);
});
- it('renders a description', () => {
- expect(findDescription().exists()).toBe(true);
- expect(findDescription().html()).toContain(wrapper.vm.$options.i18n.body);
+ it('renders correct title and illustration', () => {
+ expect(findEmptyState().props('svgPath')).toBe(emptyStateIllustrationPath);
+ expect(findEmptyState().props('title')).toBe('Optimize your workflow with CI/CD Pipelines');
});
- it('renders the file nav', () => {
- expect(findFileNav().exists()).toBe(true);
- });
-
- it('renders a CTA button', () => {
- expect(findConfirmButton().exists()).toBe(true);
- expect(findConfirmButton().text()).toBe(wrapper.vm.$options.i18n.btnText);
+ it('renders the correct instructions', () => {
+ expect(findEmptyState().text()).toContain(
+ 'Create a new .gitlab-ci.yml file at the root of the repository to get started.',
+ );
});
it('emits an event when clicking on the CTA', async () => {
diff --git a/spec/helpers/ci/pipeline_editor_helper_spec.rb b/spec/helpers/ci/pipeline_editor_helper_spec.rb
index 7a80aff27c1..22ba253c60b 100644
--- a/spec/helpers/ci/pipeline_editor_helper_spec.rb
+++ b/spec/helpers/ci/pipeline_editor_helper_spec.rb
@@ -57,7 +57,7 @@ RSpec.describe Ci::PipelineEditorHelper, feature_category: :pipeline_composition
allow(helper)
.to receive(:image_path)
- .with('illustrations/empty-state/empty-dag-md.svg')
+ .with('illustrations/empty-state/empty-pipeline-md.svg')
.and_return('illustrations/empty.svg')
allow(helper)
diff --git a/spec/lib/gitlab/import_export/project/relation_saver_spec.rb b/spec/lib/gitlab/import_export/project/relation_saver_spec.rb
index 5032dd864bb..9d1977582a6 100644
--- a/spec/lib/gitlab/import_export/project/relation_saver_spec.rb
+++ b/spec/lib/gitlab/import_export/project/relation_saver_spec.rb
@@ -5,10 +5,14 @@ require 'spec_helper'
RSpec.describe Gitlab::ImportExport::Project::RelationSaver do
include ImportExport::CommonUtil
- subject(:relation_saver) { described_class.new(project: project, shared: shared, relation: relation) }
+ subject(:relation_saver) do
+ described_class.new(project: project, shared: shared, relation: relation, user: user, params: params)
+ end
let_it_be(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
+ let_it_be(:user) { create(:user) }
let_it_be(:project) { setup_project }
+ let(:params) { { description: 'An overridden description' } }
let(:relation) { Projects::ImportExport::RelationExport::ROOT_RELATION }
let(:shared) do
@@ -22,6 +26,16 @@ RSpec.describe Gitlab::ImportExport::Project::RelationSaver do
end
describe '#save' do
+ it 'uses the ImportExport presenter' do
+ expect(project).to receive(:present).with(
+ presenter_class: Projects::ImportExport::ProjectExportPresenter,
+ current_user: user,
+ override_description: params[:description]
+ )
+
+ relation_saver.save # rubocop:disable Rails/SaveBang -- Call RelationSaver's #save, not ActiveRecord
+ end
+
context 'when relation is the root node' do
let(:relation) { Projects::ImportExport::RelationExport::ROOT_RELATION }
@@ -29,14 +43,14 @@ RSpec.describe Gitlab::ImportExport::Project::RelationSaver do
relation_saver.save # rubocop:disable Rails/SaveBang
json = read_json(File.join(shared.export_path, 'tree', 'project.json'))
- expect(json).to include({ 'description' => 'Project description' })
+ expect(json).to include({ 'description' => params[:description] })
end
it 'serializes only allowed attributes' do
relation_saver.save # rubocop:disable Rails/SaveBang
json = read_json(File.join(shared.export_path, 'tree', 'project.json'))
- expect(json).to include({ 'description' => 'Project description' })
+ expect(json).to include({ 'description' => params[:description] })
expect(json.keys).not_to include('name')
end
diff --git a/spec/services/projects/import_export/relation_export_service_spec.rb b/spec/services/projects/import_export/relation_export_service_spec.rb
index 4b44a37b299..d8810126bf3 100644
--- a/spec/services/projects/import_export/relation_export_service_spec.rb
+++ b/spec/services/projects/import_export/relation_export_service_spec.rb
@@ -5,9 +5,10 @@ require 'spec_helper'
RSpec.describe Projects::ImportExport::RelationExportService, feature_category: :importers do
using RSpec::Parameterized::TableSyntax
- subject(:service) { described_class.new(relation_export, 'jid') }
+ subject(:service) { described_class.new(relation_export, user, 'jid') }
let_it_be(:project_export_job) { create(:project_export_job) }
+ let_it_be(:user) { create(:user) }
let_it_be(:export_path) { "#{Dir.tmpdir}/project_tree_saver_spec" }
let_it_be(:archive_path) { "#{Dir.tmpdir}/project_archive_spec" }
diff --git a/spec/support/shared_examples/workers/project_export_shared_examples.rb b/spec/support/shared_examples/workers/project_export_shared_examples.rb
index 175ef9bd012..4210f39bef5 100644
--- a/spec/support/shared_examples/workers/project_export_shared_examples.rb
+++ b/spec/support/shared_examples/workers/project_export_shared_examples.rb
@@ -13,11 +13,13 @@ RSpec.shared_examples 'export worker' do
context 'when it succeeds' do
it 'calls the ExportService' do
- expect_next_instance_of(::Projects::ImportExport::ExportService) do |service|
+ params = { 'description' => 'An overridden description' }
+
+ expect_next_instance_of(::Projects::ImportExport::ExportService, project, user, params.symbolize_keys!) do |service|
expect(service).to receive(:execute)
end
- subject.perform(user.id, project.id, { 'klass' => 'Gitlab::ImportExport::AfterExportStrategies::DownloadNotificationStrategy' })
+ subject.perform(user.id, project.id, { 'klass' => 'Gitlab::ImportExport::AfterExportStrategies::DownloadNotificationStrategy' }, params)
end
context 'export job' do
diff --git a/spec/workers/projects/import_export/create_relation_exports_worker_spec.rb b/spec/workers/projects/import_export/create_relation_exports_worker_spec.rb
index 2ff91150fda..f3696c69f31 100644
--- a/spec/workers/projects/import_export/create_relation_exports_worker_spec.rb
+++ b/spec/workers/projects/import_export/create_relation_exports_worker_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
RSpec.describe Projects::ImportExport::CreateRelationExportsWorker, feature_category: :importers do
- let_it_be(:user) { build_stubbed(:user) }
+ let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:after_export_strategy) { {} }
diff --git a/spec/workers/projects/import_export/relation_export_worker_spec.rb b/spec/workers/projects/import_export/relation_export_worker_spec.rb
index 16ee73040b1..a5ddb85f4e3 100644
--- a/spec/workers/projects/import_export/relation_export_worker_spec.rb
+++ b/spec/workers/projects/import_export/relation_export_worker_spec.rb
@@ -4,7 +4,8 @@ require 'spec_helper'
RSpec.describe Projects::ImportExport::RelationExportWorker, type: :worker, feature_category: :importers do
let(:project_relation_export) { create(:project_relation_export) }
- let(:job_args) { [project_relation_export.id] }
+ let(:user) { create(:user) }
+ let(:job_args) { [project_relation_export.id, user.id] }
it_behaves_like 'an idempotent worker'
@@ -17,7 +18,7 @@ RSpec.describe Projects::ImportExport::RelationExportWorker, type: :worker, feat
expect(service).to receive(:execute)
end
- worker.perform(project_relation_export.id)
+ worker.perform(*job_args)
end
end
@@ -29,7 +30,7 @@ RSpec.describe Projects::ImportExport::RelationExportWorker, type: :worker, feat
expect(service).to receive(:execute)
end
- worker.perform(project_relation_export.id)
+ worker.perform(*job_args)
expect(project_relation_export.reload.queued?).to eq(true)
end
@@ -41,13 +42,13 @@ RSpec.describe Projects::ImportExport::RelationExportWorker, type: :worker, feat
it 'does not export the relation' do
expect(Projects::ImportExport::RelationExportService).not_to receive(:new)
- worker.perform(project_relation_export.id)
+ worker.perform(*job_args)
end
end
end
describe '.sidekiq_retries_exhausted' do
- let(:job) { { 'args' => [project_relation_export.id], 'error_message' => 'Error message' } }
+ let(:job) { { 'args' => job_args, 'error_message' => 'Error message' } }
it 'sets relation export status to `failed`' do
described_class.sidekiq_retries_exhausted_block.call(job)