summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-16 00:08:46 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-16 00:08:46 +0000
commitcc93ae5beb8a50c959373b77a9fdd6b31a88f00c (patch)
treeb203d2fefffb1d78b653282de554d26d50a0d75b
parent2b5079efdb7c4e7d5a607d95747ddeb0b8af9678 (diff)
downloadgitlab-ce-cc93ae5beb8a50c959373b77a9fdd6b31a88f00c.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--.gitlab/merge_request_templates/Removals.md1
-rw-r--r--app/models/notes/note_metadata.rb13
-rw-r--r--data/deprecations/14-5-remove-package-pipelines-api.yml4
-rw-r--r--data/deprecations/15-8-raise-permissions-settings-package-stage.yml6
-rw-r--r--data/removals/16_0/16-0-gitaly-legacy-config-vars.yml19
-rw-r--r--doc/update/deprecations.md76
-rw-r--r--doc/update/index.md1
-rw-r--r--doc/update/removals.md13
-rw-r--r--spec/models/notes/note_metadata_spec.rb26
9 files changed, 111 insertions, 48 deletions
diff --git a/.gitlab/merge_request_templates/Removals.md b/.gitlab/merge_request_templates/Removals.md
index 5b4c8473d1d..39b99c00314 100644
--- a/.gitlab/merge_request_templates/Removals.md
+++ b/.gitlab/merge_request_templates/Removals.md
@@ -46,7 +46,6 @@ Please review:
- [ ] Set yourself as the Assignee, meaning you are the DRI.
- [ ] If the removal is a [breaking change](https://about.gitlab.com/handbook/product/gitlab-the-product/#breaking-change), add label `breaking change`.
- [ ] Follow the process to [create a removal YAML file](https://about.gitlab.com/handbook/marketing/blog/release-posts/#creating-a-removal-entry).
-- [ ] Make sure that the milestone dates are based on the dates in [Product milestone creation](https://about.gitlab.com/handbook/product/milestones/#product-milestone-creation).
- [ ] Add reviewers by the 10th.
- [ ] When ready to be merged and not later than the 15th, add the ~ready label and @ message the TW for final review and merge.
- Removal notices should not be merged before the code is removed from the product. Do not mark ~ready until the removal is complete, or you are certain it will be completed within the current milestone and released. If PMs are not sure, they should confirm with their Engineering Manager.
diff --git a/app/models/notes/note_metadata.rb b/app/models/notes/note_metadata.rb
index 96e0917734b..54c3688170f 100644
--- a/app/models/notes/note_metadata.rb
+++ b/app/models/notes/note_metadata.rb
@@ -4,9 +4,20 @@ module Notes
class NoteMetadata < ApplicationRecord
self.table_name = :note_metadata
+ EMAIL_PARTICIPANT_LENGTH = 255
+
belongs_to :note, inverse_of: :note_metadata
- validates :email_participant, length: { maximum: 255 }
alias_attribute :external_author, :email_participant
+
+ before_save :ensure_email_participant_length
+
+ private
+
+ def ensure_email_participant_length
+ return unless email_participant.present?
+
+ self.email_participant = email_participant.truncate(EMAIL_PARTICIPANT_LENGTH)
+ end
end
end
diff --git a/data/deprecations/14-5-remove-package-pipelines-api.yml b/data/deprecations/14-5-remove-package-pipelines-api.yml
index f6a091c7c4b..ebb39ee6999 100644
--- a/data/deprecations/14-5-remove-package-pipelines-api.yml
+++ b/data/deprecations/14-5-remove-package-pipelines-api.yml
@@ -1,11 +1,11 @@
- title: "Package pipelines in API payload is paginated" # The name of the feature to be deprecated
announcement_milestone: "14.5" # The milestone when this feature was first announced as deprecated.
- removal_milestone: "16.0" # The milestone when this feature is planned to be removed
+ removal_milestone: "17.0" # The milestone when this feature is planned to be removed
breaking_change: true
body: | # Do not modify this line, instead modify the lines below.
A request to the API for `/api/v4/projects/:id/packages` returns a paginated result of packages. Each package lists all of its pipelines in this response. This is a performance concern, as it's possible for a package to have hundreds or thousands of associated pipelines.
- In milestone 16.0, we will remove the `pipelines` attribute from the API response.
+ In milestone 17.0, we will remove the `pipelines` attribute from the API response.
stage: package
tiers: Free
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/289956
diff --git a/data/deprecations/15-8-raise-permissions-settings-package-stage.yml b/data/deprecations/15-8-raise-permissions-settings-package-stage.yml
index 72b53ee8c9b..a7d211622ff 100644
--- a/data/deprecations/15-8-raise-permissions-settings-package-stage.yml
+++ b/data/deprecations/15-8-raise-permissions-settings-package-stage.yml
@@ -1,17 +1,17 @@
- title: "Maintainer role providing the ability to change Package settings using GraphQL API"
announcement_milestone: "15.8"
- removal_milestone: "16.0"
+ removal_milestone: "17.0"
breaking_change: true
reporter: trizzi
stage: Package
issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/370471
body: |
The ability for users with the Maintainer role to change the **Packages and registries** settings for a group using
- the GraphQL API is deprecated in GitLab 15.8 and will be removed in GitLab 16.0. These settings include:
+ the GraphQL API is deprecated in GitLab 15.8 and will be removed in GitLab 17.0. These settings include:
- [Allowing or preventing duplicate package uploads](https://docs.gitlab.com/ee/user/packages/maven_repository/#do-not-allow-duplicate-maven-packages).
- [Package request forwarding](https://docs.gitlab.com/ee/user/packages/maven_repository/#request-forwarding-to-maven-central).
- [Enabling lifecycle rules for the Dependency Proxy](https://docs.gitlab.com/ee/user/packages/dependency_proxy/reduce_dependency_proxy_storage.html).
- In GitLab 16.0 and later, you must have Owner role for a group to change the **Packages and registries**
+ In GitLab 17.0 and later, you must have the Owner role for a group to change the **Packages and registries**
settings for the group using either the GitLab UI or GraphQL API.
diff --git a/data/removals/16_0/16-0-gitaly-legacy-config-vars.yml b/data/removals/16_0/16-0-gitaly-legacy-config-vars.yml
new file mode 100644
index 00000000000..05bc10114aa
--- /dev/null
+++ b/data/removals/16_0/16-0-gitaly-legacy-config-vars.yml
@@ -0,0 +1,19 @@
+---
+- title: "Legacy Gitaly configuration methods with variables"
+ announcement_milestone: "14.8"
+ removal_milestone: "16.0"
+ breaking_change: true
+ reporter: mjwood
+ stage: Gitaly
+ issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/352609
+ body: |
+ The environment variables `GIT_CONFIG_SYSTEM` and `GIT_CONFIG_GLOBAL` were deprecated in GitLab 14.8 and are removed
+ in GitLab 16.0. These variables are replaced with standard
+ [`config.toml` Gitaly configuration](https://docs.gitlab.com/ee/administration/gitaly/reference.html).
+
+ GitLab instances that use `GIT_CONFIG_SYSTEM` and `GIT_CONFIG_GLOBAL` to configure Gitaly must switch to configuring
+ using `config.toml`.
+ 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]
+ documentation_url: https://docs.gitlab.com/ee/administration/gitaly/reference.html # (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/doc/update/deprecations.md b/doc/update/deprecations.md
index f563e16b778..9a852536c9b 100644
--- a/doc/update/deprecations.md
+++ b/doc/update/deprecations.md
@@ -315,6 +315,44 @@ Due to low customer usage, Load Performance Testing is deprecated and will be re
<div class="deprecation breaking-change" data-milestone="17.0">
+### Maintainer role providing the ability to change Package settings using GraphQL API
+
+<div class="deprecation-notes">
+- Announced in: GitLab <span class="milestone">15.8</span>
+- This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
+- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/370471).
+</div>
+
+The ability for users with the Maintainer role to change the **Packages and registries** settings for a group using
+the GraphQL API is deprecated in GitLab 15.8 and will be removed in GitLab 17.0. These settings include:
+
+- [Allowing or preventing duplicate package uploads](https://docs.gitlab.com/ee/user/packages/maven_repository/#do-not-allow-duplicate-maven-packages).
+- [Package request forwarding](https://docs.gitlab.com/ee/user/packages/maven_repository/#request-forwarding-to-maven-central).
+- [Enabling lifecycle rules for the Dependency Proxy](https://docs.gitlab.com/ee/user/packages/dependency_proxy/reduce_dependency_proxy_storage.html).
+
+In GitLab 17.0 and later, you must have the Owner role for a group to change the **Packages and registries**
+settings for the group using either the GitLab UI or GraphQL API.
+
+</div>
+
+<div class="deprecation breaking-change" data-milestone="17.0">
+
+### Package pipelines in API payload is paginated
+
+<div class="deprecation-notes">
+- Announced in: GitLab <span class="milestone">14.5</span>
+- This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
+- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/289956).
+</div>
+
+A request to the API for `/api/v4/projects/:id/packages` returns a paginated result of packages. Each package lists all of its pipelines in this response. This is a performance concern, as it's possible for a package to have hundreds or thousands of associated pipelines.
+
+In milestone 17.0, we will remove the `pipelines` attribute from the API response.
+
+</div>
+
+<div class="deprecation breaking-change" data-milestone="17.0">
+
### PipelineSecurityReportFinding projectFingerprint GraphQL field
<div class="deprecation-notes">
@@ -1570,28 +1608,6 @@ With external authorization enabled, personal access tokens (PATs) and deploy to
<div class="deprecation breaking-change" data-milestone="16.0">
-### Maintainer role providing the ability to change Package settings using GraphQL API
-
-<div class="deprecation-notes">
-- Announced in: GitLab <span class="milestone">15.8</span>
-- This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
-- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/370471).
-</div>
-
-The ability for users with the Maintainer role to change the **Packages and registries** settings for a group using
-the GraphQL API is deprecated in GitLab 15.8 and will be removed in GitLab 16.0. These settings include:
-
-- [Allowing or preventing duplicate package uploads](https://docs.gitlab.com/ee/user/packages/maven_repository/#do-not-allow-duplicate-maven-packages).
-- [Package request forwarding](https://docs.gitlab.com/ee/user/packages/maven_repository/#request-forwarding-to-maven-central).
-- [Enabling lifecycle rules for the Dependency Proxy](https://docs.gitlab.com/ee/user/packages/dependency_proxy/reduce_dependency_proxy_storage.html).
-
-In GitLab 16.0 and later, you must have Owner role for a group to change the **Packages and registries**
-settings for the group using either the GitLab UI or GraphQL API.
-
-</div>
-
-<div class="deprecation breaking-change" data-milestone="16.0">
-
### Major bundled Helm Chart updates for the GitLab Helm Chart
<div class="deprecation-notes">
@@ -1725,22 +1741,6 @@ The option to delete groups and projects immediately by default was deprecated t
<div class="deprecation breaking-change" data-milestone="16.0">
-### Package pipelines in API payload is paginated
-
-<div class="deprecation-notes">
-- Announced in: GitLab <span class="milestone">14.5</span>
-- This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
-- To discuss this change or learn more, see the [deprecation issue](https://gitlab.com/gitlab-org/gitlab/-/issues/289956).
-</div>
-
-A request to the API for `/api/v4/projects/:id/packages` returns a paginated result of packages. Each package lists all of its pipelines in this response. This is a performance concern, as it's possible for a package to have hundreds or thousands of associated pipelines.
-
-In milestone 16.0, we will remove the `pipelines` attribute from the API response.
-
-</div>
-
-<div class="deprecation breaking-change" data-milestone="16.0">
-
### PipelineSecurityReportFinding name GraphQL field
<div class="deprecation-notes">
diff --git a/doc/update/index.md b/doc/update/index.md
index b5442263106..f1b8bb17f14 100644
--- a/doc/update/index.md
+++ b/doc/update/index.md
@@ -1564,7 +1564,6 @@ configuration. Some `gitaly['..']` configuration options will continue to be use
- `enable`
- `dir`
-- `log_directory`
- `bin_path`
- `env_directory`
- `env`
diff --git a/doc/update/removals.md b/doc/update/removals.md
index abe1ec6e2e6..fcd4de7a2f5 100644
--- a/doc/update/removals.md
+++ b/doc/update/removals.md
@@ -226,6 +226,19 @@ Review the details carefully before upgrading.
The [Jira DVCS connector](https://docs.gitlab.com/ee/integration/jira/dvcs/) for Jira Cloud was deprecated in GitLab 15.1 and has been removed in 16.0. Use the [GitLab for Jira Cloud app](https://docs.gitlab.com/ee/integration/jira/connect-app.html) instead. The Jira DVCS connector was also deprecated for Jira 8.13 and earlier. You can only use the Jira DVCS connector with Jira Data Center or Jira Server in Jira 8.14 and later. Upgrade your Jira instance to Jira 8.14 or later, and reconfigure the Jira integration in your GitLab instance.
If you cannot upgrade your Jira instance in time and are on GitLab self-managed version, we offer a workaround until GitLab 16.6. This breaking change is deployed in GitLab 16.0 behind a feature flag named `jira_dvcs_end_of_life_amnesty`. The flag is disabled by default, but you can ask an administrator to enable the flag at any time. For questions related to this announcement, see the [feedback issue](https://gitlab.com/gitlab-org/gitlab/-/issues/408185).
+### Legacy Gitaly configuration methods with variables
+
+WARNING:
+This is a [breaking change](https://docs.gitlab.com/ee/development/deprecation_guidelines/).
+Review the details carefully before upgrading.
+
+The environment variables `GIT_CONFIG_SYSTEM` and `GIT_CONFIG_GLOBAL` were deprecated in GitLab 14.8 and are removed
+in GitLab 16.0. These variables are replaced with standard
+[`config.toml` Gitaly configuration](https://docs.gitlab.com/ee/administration/gitaly/reference.html).
+
+GitLab instances that use `GIT_CONFIG_SYSTEM` and `GIT_CONFIG_GLOBAL` to configure Gitaly must switch to configuring
+using `config.toml`.
+
### License-Check and the Policies tab on the License Compliance page
WARNING:
diff --git a/spec/models/notes/note_metadata_spec.rb b/spec/models/notes/note_metadata_spec.rb
index 8a11dd1a758..d1b35e0cdf9 100644
--- a/spec/models/notes/note_metadata_spec.rb
+++ b/spec/models/notes/note_metadata_spec.rb
@@ -7,7 +7,29 @@ RSpec.describe Notes::NoteMetadata, feature_category: :team_planning do
it { is_expected.to belong_to(:note) }
end
- describe 'validation' do
- it { is_expected.to validate_length_of(:email_participant).is_at_most(255) }
+ describe 'callbacks' do
+ let_it_be(:note) { create(:note) }
+ let_it_be(:email) { "#{'a' * 255}@example.com" }
+
+ context 'with before_save :ensure_email_participant_length' do
+ let(:note_metadata) { create(:note_metadata, note: note, email_participant: email) }
+
+ context 'when email length is > 255' do
+ let(:expected_email) { "#{'a' * 252}..." }
+
+ it 'rewrites the email within max length' do
+ expect(note_metadata.email_participant.length).to eq(255)
+ expect(note.note_metadata.email_participant).to eq(expected_email)
+ end
+ end
+
+ context 'when email is within permissible length' do
+ let(:email) { 'email@example.com' }
+
+ it 'saves the email as-is' do
+ expect(note_metadata.email_participant).to eq(email)
+ end
+ end
+ end
end
end