diff --git a/app/graphql/types/ci/config/include_type_enum.rb b/app/graphql/types/ci/config/include_type_enum.rb
index 4a2ac90c77b..328824ae996 100644
--- a/app/graphql/types/ci/config/include_type_enum.rb
+++ b/app/graphql/types/ci/config/include_type_enum.rb
@@ -9,7 +9,7 @@ module Types
value 'remote', description: 'Remote include.', value: :remote
value 'local', description: 'Local include.', value: :local
- value 'project', description: 'Project include.', value: :project
+ value 'file', description: 'Project file include.', value: :file
value 'template', description: 'Template include.', value: :template
end
end
diff --git a/app/helpers/tracking_helper.rb b/app/helpers/tracking_helper.rb
index 1beb88548c5..9ef57a57d62 100644
--- a/app/helpers/tracking_helper.rb
+++ b/app/helpers/tracking_helper.rb
@@ -2,7 +2,7 @@
module TrackingHelper
def tracking_attrs(label, action, property)
- return {} unless tracking_enabled?
+ return {} unless ::Gitlab::Tracking.enabled?
{
data: {
@@ -16,11 +16,4 @@ module TrackingHelper
def tracking_attrs_data(label, action, property)
tracking_attrs(label, action, property).fetch(:data, {})
end
-
- private
-
- def tracking_enabled?
- Rails.env.production? &&
- ::Gitlab::Tracking.enabled?
- end
end
diff --git a/app/models/project.rb b/app/models/project.rb
index 027b2257f2e..524bb072810 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -53,7 +53,6 @@ class Project < ApplicationRecord
ignore_columns :mirror_last_update_at, :mirror_last_successful_update_at, remove_after: '2021-09-22', remove_with: '14.4'
ignore_columns :pull_mirror_branch_prefix, remove_after: '2021-09-22', remove_with: '14.4'
- ignore_columns :build_coverage_regex, remove_after: '2022-07-22', remove_with: '15.0'
STATISTICS_ATTRIBUTE = 'repositories_count'
UNKNOWN_IMPORT_URL = 'http://unknown.git'
diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb
index 878e42172b7..ee6f204be45 100644
--- a/app/services/merge_requests/build_service.rb
+++ b/app/services/merge_requests/build_service.rb
@@ -203,6 +203,12 @@ module MergeRequests
target_branch.blank? || target_project.commit(target_branch)
end
+ def set_draft_title_if_needed
+ return unless compare_commits.empty? || Gitlab::Utils.to_boolean(params[:draft])
+
+ merge_request.title = wip_title
+ end
+
# When your branch name starts with an iid followed by a dash this pattern will be
# interpreted as the user wants to close that issue on this project.
#
@@ -220,7 +226,7 @@ module MergeRequests
assign_title_and_description_from_commits
merge_request.title ||= title_from_issue if target_project.issues_enabled? || target_project.external_issue_tracker
merge_request.title ||= source_branch.titleize.humanize
- merge_request.title = wip_title if compare_commits.empty?
+ set_draft_title_if_needed
append_closes_description
end
diff --git a/app/services/merge_requests/push_options_handler_service.rb b/app/services/merge_requests/push_options_handler_service.rb
index 2b81967b1e3..076fe8c3b21 100644
--- a/app/services/merge_requests/push_options_handler_service.rb
+++ b/app/services/merge_requests/push_options_handler_service.rb
@@ -126,6 +126,7 @@ module MergeRequests
params = {
title: push_options[:title],
description: push_options[:description],
+ draft: push_options[:draft],
target_branch: push_options[:target],
force_remove_source_branch: push_options[:remove_source_branch],
label: push_options[:label],
diff --git a/app/services/merge_requests/update_service.rb b/app/services/merge_requests/update_service.rb
index 391079223ca..6e8afaecbba 100644
--- a/app/services/merge_requests/update_service.rb
+++ b/app/services/merge_requests/update_service.rb
@@ -11,6 +11,10 @@ module MergeRequests
end
def execute(merge_request)
+ if Gitlab::Utils.to_boolean(params[:draft])
+ merge_request.title = merge_request.draft_title
+ end
+
update_merge_request_with_specialized_service(merge_request) || general_fallback(merge_request)
end
diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml
index 5238c712a41..8b186935a4d 100644
--- a/app/views/projects/settings/ci_cd/show.html.haml
+++ b/app/views/projects/settings/ci_cd/show.html.haml
@@ -14,7 +14,7 @@
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand')
%p
- = _("Customize your pipeline configuration and coverage report.")
+ = _("Customize your pipeline configuration.")
.settings-content
= render 'form'
diff --git a/data/deprecations/15-0-JTW_v2_update.yml b/data/deprecations/15-0-JTW_v2_update.yml
deleted file mode 100644
index 3fb36562e42..00000000000
--- a/data/deprecations/15-0-JTW_v2_update.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# This is a template for a feature deprecation
-# A deprecation typically occurs when a feature or capability is planned to be removed in a future release.
-# Deprecations should be announced at least two releases prior to removal. Any breaking changes should only be done in major releases.
-#
-# Below is an example of what a single entry should look like, it's required attributes,
-# and what types we expect those attribute values to be.
-#
-# For more information please refer to the handbook documentation here:
-# https://about.gitlab.com/handbook/marketing/blog/release-posts/#deprecations
-#
-# Please delete this line and above before submitting your merge request.
-
-- name: "Changes to the `CI_JOB_JWT`" # The name of the feature to be deprecated
- announcement_milestone: "14.8" # The milestone when this feature was first announced as deprecated.
- announcement_date: "2022-02-22" # The date of the milestone release when this feature was first announced as deprecated. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
- removal_milestone: "15.0" # The milestone when this feature is planned to be removed
- removal_date: "2022-05-22" # The date of the milestone release when this feature is planned to be removed. This should almost always be the 22nd of a month (YYYY-MM-22), unless you did an out of band blog post.
- breaking_change: true # If this deprecation is a breaking change, set this value to true
- reporter: dhershkovitch # GitLab username of the person reporting the deprecation
- body: | # Do not modify this line, instead modify the lines below.
- The `CI_JOB_JWT` will be updated to support a wider variety of cloud providers. It will be changed to match [`CI_JOB_JWT_V2`](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html), but this change may not be backwards compatible for all users, including Hashicorp Vault users. To maintain the current behavior, users can switch to using `CI_JOB_JWT_V1`, or update their configuration in GitLab 15.0 to use the improved `CI_JOB_JWT`.
-# The following items are not published on the docs page, but may be used in the future.
- stage: verify
- tiers: # (optional - may be required in the future) An array of tiers that the feature is available in currently. e.g., [Free, Silver, Gold, Core, Premium, Ultimate]
- issue_url: # (optional) This is a link to the deprecation issue in GitLab
- documentation_url: # (optional) This is a link to the current documentation page
- image_url: # (optional) This is a link to a thumbnail image depicting the feature
- video_url: # (optional) Use the youtube thumbnail URL with the structure of https://img.youtube.com/vi/UNIQUEID/hqdefault.jpg
diff --git a/db/post_migrate/20220505044348_fix_automatic_iterations_cadences_start_date.rb b/db/post_migrate/20220505044348_fix_automatic_iterations_cadences_start_date.rb
new file mode 100644
index 00000000000..90d70da1a28
--- /dev/null
+++ b/db/post_migrate/20220505044348_fix_automatic_iterations_cadences_start_date.rb
@@ -0,0 +1,28 @@
+# frozen_string_literal: true
+
+class FixAutomaticIterationsCadencesStartDate < Gitlab::Database::Migration[2.0]
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ execute(<<~SQL)
+ UPDATE iterations_cadences
+ SET start_date=COALESCE(
+ (
+ SELECT start_date
+ FROM sprints
+ WHERE iterations_cadences.id=sprints.iterations_cadence_id
+ ORDER BY sprints.start_date ASC
+ LIMIT 1
+ ),
+ start_date
+ )
+ WHERE iterations_cadences.automatic=true;
+ SQL
+ end
+
+ def down
+ # no-op
+ # The migration updates the records for the feature used behind a non-default feature flag.
+ # The correct data can be computed with the records from 'sprints' table.
+ end
+end
diff --git a/db/post_migrate/20220505053504_remove_namespaces_id_parent_id_inverse_partial_index.rb b/db/post_migrate/20220505053504_remove_namespaces_id_parent_id_inverse_partial_index.rb
new file mode 100644
index 00000000000..aca3ccaa03e
--- /dev/null
+++ b/db/post_migrate/20220505053504_remove_namespaces_id_parent_id_inverse_partial_index.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class RemoveNamespacesIdParentIdInversePartialIndex < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ NAME = 'index_namespaces_id_parent_id_is_not_null'
+
+ def up
+ remove_concurrent_index :namespaces, :id, name: NAME
+ end
+
+ def down
+ add_concurrent_index :namespaces, :id, where: 'parent_id IS NOT NULL', name: NAME
+ end
+end
diff --git a/db/schema_migrations/20220505044348 b/db/schema_migrations/20220505044348
new file mode 100644
index 00000000000..0c537719a8f
--- /dev/null
+++ b/db/schema_migrations/20220505044348
@@ -0,0 +1 @@
+50c34d341ad1d989b865e2d9f6ac11d19e18c756436b8385518d1210bc2e6fe1
\ No newline at end of file
diff --git a/db/schema_migrations/20220505053504 b/db/schema_migrations/20220505053504
new file mode 100644
index 00000000000..5a1594ccac7
--- /dev/null
+++ b/db/schema_migrations/20220505053504
@@ -0,0 +1 @@
+e1b5a06c0a72e361d308f599d446125aaf5882a986423cc0b29c5faa9bc3954b
\ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 61a95095e34..2963570aa85 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -28385,8 +28385,6 @@ CREATE UNIQUE INDEX index_namespace_root_storage_statistics_on_namespace_id ON n
CREATE UNIQUE INDEX index_namespace_statistics_on_namespace_id ON namespace_statistics USING btree (namespace_id);
-CREATE INDEX index_namespaces_id_parent_id_is_not_null ON namespaces USING btree (id) WHERE (parent_id IS NOT NULL);
-
CREATE UNIQUE INDEX index_namespaces_name_parent_id_type ON namespaces USING btree (name, parent_id, type);
CREATE INDEX index_namespaces_on_created_at ON namespaces USING btree (created_at);
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index ac634a3502f..5816d438e10 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -17961,8 +17961,8 @@ Include type.
| Value | Description |
| ----- | ----------- |
+| `file` | Project file include. |
| `local` | Local include. |
-| `project` | Project include. |
| `remote` | Remote include. |
| `template` | Template include. |
diff --git a/doc/api/projects.md b/doc/api/projects.md
index dcfd6d537be..64a2e0d801b 100644
--- a/doc/api/projects.md
+++ b/doc/api/projects.md
@@ -49,6 +49,7 @@ GET /projects
| Attribute | Type | Required | Description |
|--------------------------------------------|----------|------------------------|-------------|
| `archived` | boolean | **{dotted-circle}** No | Limit by archived status. |
+| `build_coverage_regex` | string | **{dotted-circle}** No | Test coverage parsing. (`deprecated`, it is [scheduled to be removed](https://gitlab.com/gitlab-org/gitlab/-/issues/357401)) |
| `id_after` | integer | **{dotted-circle}** No | Limit results to projects with IDs greater than the specified ID. |
| `id_before` | integer | **{dotted-circle}** No | Limit results to projects with IDs less than the specified ID. |
| `imported` | boolean | **{dotted-circle}** No | Limit results to projects which were imported from external systems by current user. |
@@ -2757,6 +2758,7 @@ Example response:
"public_jobs": true,
"build_timeout": 3600,
"auto_cancel_pending_pipelines": "enabled",
+ "build_coverage_regex": null, // deprecated, it is scheduled to be removed https://gitlab.com/gitlab-org/gitlab/-/issues/357401
"ci_config_path": null,
"shared_with_groups": [],
"only_allow_merge_if_pipeline_succeeds": false,
diff --git a/doc/development/snowplow/implementation.md b/doc/development/snowplow/implementation.md
index 6e89ada8923..f4123e3ba86 100644
--- a/doc/development/snowplow/implementation.md
+++ b/doc/development/snowplow/implementation.md
@@ -97,10 +97,12 @@ If click events stop propagating, you must implement listeners and [Vue componen
#### Helper methods
-You can use the following Ruby helper:
+You can use the following Ruby helpers:
```ruby
tracking_attrs(label, action, property) # { data: { track_label... } }
+
+tracking_attrs_data(label, action, property) # { track_label... }
```
You can also use it on HAML templates:
@@ -108,8 +110,8 @@ You can also use it on HAML templates:
```haml
%button{ **tracking_attrs('main_navigation', 'click_button', 'navigation') }
-// When adding additional data
-// %button{ data: { platform: "...", **tracking_attrs('main_navigation', 'click_button', 'navigation') } }
+// When merging with additional data
+// %button{ data: { platform: "...", **tracking_attrs_data('main_navigation', 'click_button', 'navigation') } }
```
If you use the GitLab helper method [`nav_link`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/helpers/tab_helper.rb#L76), you must wrap `html_options` under the `html_options` keyword argument. If you
diff --git a/doc/update/deprecations.md b/doc/update/deprecations.md
index c626ca094fb..dd164720ab1 100644
--- a/doc/update/deprecations.md
+++ b/doc/update/deprecations.md
@@ -332,21 +332,6 @@ Any API calls attempting to change the rate limits for `user_email_lookup_limit`
## 14.8
-
-
-### Changes to the `CI_JOB_JWT`
-
-WARNING:
-This feature will be changed or removed in 15.0
-as a [breaking change](https://docs.gitlab.com/ee/development/contributing/#breaking-changes).
-Before updating GitLab, review the details carefully to determine if you need to make any
-changes to your code, settings, or workflow.
-
-The `CI_JOB_JWT` will be updated to support a wider variety of cloud providers. It will be changed to match [`CI_JOB_JWT_V2`](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html), but this change may not be backwards compatible for all users, including Hashicorp Vault users. To maintain the current behavior, users can switch to using `CI_JOB_JWT_V1`, or update their configuration in GitLab 15.0 to use the improved `CI_JOB_JWT`.
-
-**Planned removal milestone: 15.0 (2022-05-22)**
-
-
### Configurable Gitaly `per_repository` election strategy
diff --git a/doc/user/application_security/dependency_scanning/index.md b/doc/user/application_security/dependency_scanning/index.md
index 4ec6b0ccf3d..5baa385e0bd 100644
--- a/doc/user/application_security/dependency_scanning/index.md
+++ b/doc/user/application_security/dependency_scanning/index.md
@@ -1189,7 +1189,7 @@ We recommend committing the lock files, which prevents this warning.
If you have manually set `DS_MAJOR_VERSION` or `DS_ANALYZER_IMAGE` for specific reasons,
and now must update your configuration to again get the latest patched versions of our
-analyzers, edit your `gitlab-ci.yml` file and either:
+analyzers, edit your `.gitlab-ci.yml` file and either:
- Set your `DS_MAJOR_VERSION` to match the latest version as seen in
[our current Dependency Scanning template](https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Security/Dependency-Scanning.gitlab-ci.yml#L18).
diff --git a/doc/user/application_security/index.md b/doc/user/application_security/index.md
index 7642db947c7..b259e01ee05 100644
--- a/doc/user/application_security/index.md
+++ b/doc/user/application_security/index.md
@@ -472,7 +472,7 @@ Additional details about the differences between the two solutions are outlined
| ------ | ------ | ------ |
| **Flexibility** | Supports anything that can be done in a CI file. | Limited to only the items for which GitLab has explicitly added support. DAST, SAST, Secret Detection, and Container Scanning scans are supported. |
| **Usability** | Requires knowledge of CI YAML. | Follows a `rules` and `actions`-based YAML structure. |
-| **Inclusion in CI pipeline** | The compliance pipeline is executed instead of the project's `gitlab-ci.yml` file. To include the project's `gitlab-ci.yml` file, use an `include` statement. Defined variables aren't allowed to be overwritten by the included project's YAML file. | Forced inclusion of a new job into the CI pipeline. DAST jobs that must be customized on a per-project basis can have project-level Site Profiles and Scan Profiles defined. To ensure separation of duties, these profiles are immutable when referenced in a scan execution policy. All jobs can be customized as part of the security policy itself with the same variables that are normally available to the CI job. |
+| **Inclusion in CI pipeline** | The compliance pipeline is executed instead of the project's `.gitlab-ci.yml` file. To include the project's `.gitlab-ci.yml` file, use an `include` statement. Defined variables aren't allowed to be overwritten by the included project's YAML file. | Forced inclusion of a new job into the CI pipeline. DAST jobs that must be customized on a per-project basis can have project-level Site Profiles and Scan Profiles defined. To ensure separation of duties, these profiles are immutable when referenced in a scan execution policy. All jobs can be customized as part of the security policy itself with the same variables that are normally available to the CI job. |
| **Schedulable** | Can be scheduled through a scheduled pipeline on the group. | Can be scheduled natively through the policy configuration itself. |
| **Separation of Duties** | Only group owners can create compliance framework labels. Only project owners can apply compliance framework labels to projects. The ability to make or approve changes to the compliance pipeline definition is limited to individuals who are explicitly given access to the project that contains the compliance pipeline. | Only project owners can define a linked security policy project. The ability to make or approve changes to security policies is limited to individuals who are explicitly given access to the security policy project. |
| **Ability to apply one standard to multiple projects** | The same compliance framework label can be applied to multiple projects inside a group. | The same security policy project can be used for multiple projects across GitLab with no requirement of being located in the same group. |
diff --git a/doc/user/clusters/agent/ci_cd_workflow.md b/doc/user/clusters/agent/ci_cd_workflow.md
index b2ff82ce75d..95e00a2970e 100644
--- a/doc/user/clusters/agent/ci_cd_workflow.md
+++ b/doc/user/clusters/agent/ci_cd_workflow.md
@@ -249,7 +249,7 @@ SPDY protocol.
Tools like `kubectl`, Helm, `kpt`, and `kustomize` cache information about
the cluster in `~/.kube/cache`. If this directory is not writable, the tool fetches information on each invocation,
making interactions slower and creating unnecessary load on the cluster. For the best experience, in the
-image you use in your .`gitlab-ci.yml` file, ensure this directory is writable.
+image you use in your `.gitlab-ci.yml` file, ensure this directory is writable.
### Enable TLS
diff --git a/doc/user/project/push_options.md b/doc/user/project/push_options.md
index d04f79d11c7..6ef8477b6b6 100644
--- a/doc/user/project/push_options.md
+++ b/doc/user/project/push_options.md
@@ -63,6 +63,7 @@ time as pushing changes:
| `merge_request.remove_source_branch` | Set the merge request to remove the source branch when it's merged. | [12.2](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/64320) |
| `merge_request.title=""` | Set the title of the merge request. Ex: `git push -o merge_request.title="The title I want"`. | [12.2](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/64320) |
| `merge_request.description=""` | Set the description of the merge request. Ex: `git push -o merge_request.description="The description I want"`. | [12.2](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/64320) |
+| `merge_request.draft` | Mark the merge request as a draft. Ex: `git push -o merge_request.draft`. | [15.0](https://gitlab.com/gitlab-org/gitlab/-/issues/296673) |
| `merge_request.milestone=""` | Set the milestone of the merge request. Ex: `git push -o merge_request.milestone="3.0"`. | [14.1](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63960) |
| `merge_request.label="