Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-12-27 15:29:40 +00:00
parent 2c7d948103
commit 807796d848
19 changed files with 215 additions and 105 deletions

View File

@ -1 +1 @@
51b9843589ad33dd4c41b1ea34e0e98f7a5fdbce
5a5b62e8ec571f8362eb06bd614335660d8547fa

View File

@ -1 +1 @@
aef787134ce907cfc179f3c1b8486c5d5b180d68
0c5599189417797ec1554f332415bb15c7b8e03b

View File

@ -30,7 +30,7 @@ gem 'bundler-checksum', '~> 0.1.0', path: 'vendor/gems/bundler-checksum', requir
# See https://docs.gitlab.com/ee/development/gemfile.html#upgrade-rails for guidelines when upgrading Rails
if next?
gem 'rails', '~> 7.1.4', feature_category: :shared
gem 'rails', '~> 7.1.5', feature_category: :shared
else
gem 'rails', '~> 7.0.8.6', feature_category: :shared
end

View File

@ -2,18 +2,18 @@
{"name":"CFPropertyList","version":"3.0.5","platform":"ruby","checksum":"a78551cd4768d78ebca98488c27e33652ef818be64697a54676d34e6434674a4"},
{"name":"RedCloth","version":"4.3.4","platform":"ruby","checksum":"5231b2fdd91a933915cba330e5fd1a74025e77b56f57b7404c7191ebf2812297"},
{"name":"acme-client","version":"2.0.18","platform":"ruby","checksum":"3feab341926ffc16eb65babe51ba4dad8180c13e21e774871344e0b3502ef275"},
{"name":"actioncable","version":"7.1.4.2","platform":"ruby","checksum":"4235bd313a88a7ac594505247d3563603d4baaf080f5877c8bdf0af2f28354a3"},
{"name":"actionmailbox","version":"7.1.4.2","platform":"ruby","checksum":"8e5c3ea53177588a63cb333602ac0bbdd0f9e380bece15ff889e22aa1da960dd"},
{"name":"actionmailer","version":"7.1.4.2","platform":"ruby","checksum":"f5fe514a35034b7ccf34010bfe5f558dc3e22c7936be9b9b660f14dfd00f3c9e"},
{"name":"actionpack","version":"7.1.4.2","platform":"ruby","checksum":"3179f100ee4ddb28bfc4c896de9974dbb0ad177cc72ac726a28d8549be2a79b9"},
{"name":"actiontext","version":"7.1.4.2","platform":"ruby","checksum":"aa39ed36e522bd25346776a33224cbb946c3a547e95e0667c9d58a1f75db7f0a"},
{"name":"actionview","version":"7.1.4.2","platform":"ruby","checksum":"f9e2f4c8be9de72e4f6ec50194d59052798925dbdf0cb274da9a7249e8bda645"},
{"name":"activejob","version":"7.1.4.2","platform":"ruby","checksum":"61d8628c37de4a55903c6a8b4f02598e0ae20d95565ff6b7dfe9888648c4c793"},
{"name":"activemodel","version":"7.1.4.2","platform":"ruby","checksum":"1e591404197fb71a47bf1cd3579794131c629dd23c95b629b46df261587e5cc4"},
{"name":"activerecord","version":"7.1.4.2","platform":"ruby","checksum":"e9821c610adf329ad050b133f8e3a14d94421a3f195d58466c0f647e6a9416f1"},
{"name":"actioncable","version":"7.1.5.1","platform":"ruby","checksum":"764637b5b2d97b94e412d562c177bfd16b0fd769d55c98846362f5263e8aaa0d"},
{"name":"actionmailbox","version":"7.1.5.1","platform":"ruby","checksum":"c3c20589fe43e6fa88bba2d76a6f9805ffdd02531f4a9a4af8197d59f5a5360a"},
{"name":"actionmailer","version":"7.1.5.1","platform":"ruby","checksum":"b213d6d880b23b093ccfef3b4f87a3d27e4666442f71b5b634b2d19e19a49759"},
{"name":"actionpack","version":"7.1.5.1","platform":"ruby","checksum":"2bc263d9f43f16cc3b3360f59659ab11f140577602f371f1a968e2672b38d718"},
{"name":"actiontext","version":"7.1.5.1","platform":"ruby","checksum":"b8e261cfad5bc6a78b3f15be5e7c7f32190041b3dc6f027a3a353b4392d2f7ec"},
{"name":"actionview","version":"7.1.5.1","platform":"ruby","checksum":"8c559a213501798e29b50b5341a643a70bbf6fa0aa2abaf571d0efc59dc4f6aa"},
{"name":"activejob","version":"7.1.5.1","platform":"ruby","checksum":"7633376c857f4c491d06b5a7f5d86d9f07afc595398354a3f1abe80eb7e35767"},
{"name":"activemodel","version":"7.1.5.1","platform":"ruby","checksum":"74727466854a7fbdfe8f2702ca3112b23877500d4926bf7e02e921ad542191f1"},
{"name":"activerecord","version":"7.1.5.1","platform":"ruby","checksum":"f40ad1609bf33b9ba5bdc4e16d80a77b1517153234ceb413d31d635d7b91f1e3"},
{"name":"activerecord-explain-analyze","version":"0.1.0","platform":"ruby","checksum":"5debb11fe23f35b91953a80677d80ba9284ee737fd9d148c1d7603ce45217f7b"},
{"name":"activestorage","version":"7.1.4.2","platform":"ruby","checksum":"6835f8be3e67a8185017fea8ef2c9c48cec015cea537b5ca412da26da84579a2"},
{"name":"activesupport","version":"7.1.4.2","platform":"ruby","checksum":"821705c3ffd375d4a85bcba8b4e94f44b7117b73bdcfd8cdc44c00b96c65f920"},
{"name":"activestorage","version":"7.1.5.1","platform":"ruby","checksum":"ae6b8b076858c666eaad6f896d786b67654235e861e24a83f61f1cc97b43ff63"},
{"name":"activesupport","version":"7.1.5.1","platform":"ruby","checksum":"9f0c482e473b9868cb3dfe3e9db549a3bd2302c02e4f595a5caac144a8c7cfb8"},
{"name":"addressable","version":"2.8.7","platform":"ruby","checksum":"462986537cf3735ab5f3c0f557f14155d778f4b43ea4f485a9deb9c8f7c58232"},
{"name":"aes_key_wrap","version":"1.1.0","platform":"ruby","checksum":"b935f4756b37375895db45669e79dfcdc0f7901e12d4e08974d5540c8e0776a5"},
{"name":"akismet","version":"3.0.0","platform":"ruby","checksum":"74991b8e3d3257eeea996b47069abb8da2006c84a144255123e8dffd1c86b230"},
@ -50,7 +50,7 @@
{"name":"batch-loader","version":"2.0.5","platform":"ruby","checksum":"964bf638b8f498bab40abaafc6f89c057b2e02aa25b64fc1ec12872ad6bff213"},
{"name":"bcrypt","version":"3.1.18","platform":"java","checksum":"5464e06c00cb6bd3ff982feef4cb7f1efc9b302753cbaf12e73512d8f401f2d2"},
{"name":"bcrypt","version":"3.1.18","platform":"ruby","checksum":"154de0b0b089e56d5980c5037ad85fc9554cfbf4996538673c1ddbc9b61b1f11"},
{"name":"benchmark","version":"0.2.0","platform":"ruby","checksum":"5f7087b794613abdd3ac9c13f4351f65b164bcb15ced2ad29508e365f9b28c77"},
{"name":"benchmark","version":"0.4.0","platform":"ruby","checksum":"0f12f8c495545e3710c3e4f0480f63f06b4c842cc94cec7f33a956f5180e874a"},
{"name":"benchmark-ips","version":"2.11.0","platform":"ruby","checksum":"1eaa89841073895af0ee7ff72eb069e5c7dda01c6d6a8b3e79e363bace596dec"},
{"name":"benchmark-malloc","version":"0.2.0","platform":"ruby","checksum":"37c68f0435261634026f584d79956a35325a3027e3e6b4cc8d7575aa10537e6b"},
{"name":"benchmark-memory","version":"0.2.0","platform":"ruby","checksum":"ca1e436433b09535ee8f64f80600a5edb407cff1f6ac70e089ca238118e6ab5c"},
@ -553,12 +553,12 @@
{"name":"rack-test","version":"2.1.0","platform":"ruby","checksum":"0c61fc61904049d691922ea4bb99e28004ed3f43aa5cfd495024cc345f125dfb"},
{"name":"rack-timeout","version":"0.7.0","platform":"ruby","checksum":"757337e9793cca999bb73a61fe2a7d4280aa9eefbaf787ce3b98d860749c87d9"},
{"name":"rackup","version":"1.0.1","platform":"ruby","checksum":"ba86604a28989fe1043bff20d819b360944ca08156406812dca6742b24b3c249"},
{"name":"rails","version":"7.1.4.2","platform":"ruby","checksum":"6100b88adcd277f69b02a35a54459846bcb1214401688ca9beb49d468b88c130"},
{"name":"rails","version":"7.1.5.1","platform":"ruby","checksum":"05aea2ed7b6392b41ce0fc11455de118455025a431b6ea334a7ac2b101608804"},
{"name":"rails-controller-testing","version":"1.0.5","platform":"ruby","checksum":"741448db59366073e86fc965ba403f881c636b79a2c39a48d0486f2607182e94"},
{"name":"rails-dom-testing","version":"2.2.0","platform":"ruby","checksum":"e515712e48df1f687a1d7c380fd7b07b8558faa26464474da64183a7426fa93b"},
{"name":"rails-html-sanitizer","version":"1.6.1","platform":"ruby","checksum":"e3d2fb10339f03b802e39c7f6cac28c54fd404d3f65ae39c31cca9d150c5cbf0"},
{"name":"rails-i18n","version":"7.0.10","platform":"ruby","checksum":"efae16e0ac28c0f42e98555c8db1327d69ab02058c8b535e0933cb106dd931ca"},
{"name":"railties","version":"7.1.4.2","platform":"ruby","checksum":"8b2b7fbf29baffb052a263c958ac12442776ed28ee426b3e517f4e17439d7a89"},
{"name":"railties","version":"7.1.5.1","platform":"ruby","checksum":"0be15562e2ded4efdc1b6c30f884b6d838c9ba49573dde042334b752b043e2fb"},
{"name":"rainbow","version":"3.1.1","platform":"ruby","checksum":"039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a"},
{"name":"rake","version":"13.0.6","platform":"ruby","checksum":"5ce4bf5037b4196c24ac62834d8db1ce175470391026bd9e557d669beeb19097"},
{"name":"rb-fsevent","version":"0.11.2","platform":"ruby","checksum":"43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe"},
@ -676,6 +676,7 @@
{"name":"sass-embedded","version":"1.77.5","platform":"x86_64-linux-musl","checksum":"c5dd43155112f7b4eb9e3cafb8ceaa54a157977a2033b1022875bac71a4a4d56"},
{"name":"sawyer","version":"0.9.2","platform":"ruby","checksum":"fa3a72d62a4525517b18857ddb78926aab3424de0129be6772a8e2ba240e7aca"},
{"name":"sd_notify","version":"0.1.1","platform":"ruby","checksum":"cbc7ac6caa7cedd26b30a72b5eeb6f36050dc0752df263452ea24fb5a4ad3131"},
{"name":"securerandom","version":"0.4.1","platform":"ruby","checksum":"cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1"},
{"name":"seed-fu","version":"2.3.7","platform":"ruby","checksum":"f19673443e9af799b730e3d4eca6a89b39e5a36825015dffd00d02ea3365cf74"},
{"name":"selenium-webdriver","version":"4.27.0","platform":"ruby","checksum":"8821f4ad60b935cfcdc5954c0a6642d894e936250aece8bf37a6fcbebe5eb6e0"},
{"name":"semver_dialects","version":"3.4.5","platform":"ruby","checksum":"7382ca351dc4796a8c824447a1ad87dfdea41f73b625cd2a5efabe54d11be63e"},

View File

@ -238,35 +238,35 @@ GEM
acme-client (2.0.18)
faraday (>= 1.0, < 3.0.0)
faraday-retry (>= 1.0, < 3.0.0)
actioncable (7.1.4.2)
actionpack (= 7.1.4.2)
activesupport (= 7.1.4.2)
actioncable (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.4.2)
actionpack (= 7.1.4.2)
activejob (= 7.1.4.2)
activerecord (= 7.1.4.2)
activestorage (= 7.1.4.2)
activesupport (= 7.1.4.2)
actionmailbox (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.4.2)
actionpack (= 7.1.4.2)
actionview (= 7.1.4.2)
activejob (= 7.1.4.2)
activesupport (= 7.1.4.2)
actionmailer (7.1.5.1)
actionpack (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activesupport (= 7.1.5.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.4.2)
actionview (= 7.1.4.2)
activesupport (= 7.1.4.2)
actionpack (7.1.5.1)
actionview (= 7.1.5.1)
activesupport (= 7.1.5.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
@ -274,46 +274,49 @@ GEM
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.4.2)
actionpack (= 7.1.4.2)
activerecord (= 7.1.4.2)
activestorage (= 7.1.4.2)
activesupport (= 7.1.4.2)
actiontext (7.1.5.1)
actionpack (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.4.2)
activesupport (= 7.1.4.2)
actionview (7.1.5.1)
activesupport (= 7.1.5.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.4.2)
activesupport (= 7.1.4.2)
activejob (7.1.5.1)
activesupport (= 7.1.5.1)
globalid (>= 0.3.6)
activemodel (7.1.4.2)
activesupport (= 7.1.4.2)
activerecord (7.1.4.2)
activemodel (= 7.1.4.2)
activesupport (= 7.1.4.2)
activemodel (7.1.5.1)
activesupport (= 7.1.5.1)
activerecord (7.1.5.1)
activemodel (= 7.1.5.1)
activesupport (= 7.1.5.1)
timeout (>= 0.4.0)
activerecord-explain-analyze (0.1.0)
activerecord (>= 4)
pg
activestorage (7.1.4.2)
actionpack (= 7.1.4.2)
activejob (= 7.1.4.2)
activerecord (= 7.1.4.2)
activesupport (= 7.1.4.2)
activestorage (7.1.5.1)
actionpack (= 7.1.5.1)
activejob (= 7.1.5.1)
activerecord (= 7.1.5.1)
activesupport (= 7.1.5.1)
marcel (~> 1.0)
activesupport (7.1.4.2)
activesupport (7.1.5.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
@ -387,7 +390,7 @@ GEM
base64 (0.2.0)
batch-loader (2.0.5)
bcrypt (3.1.18)
benchmark (0.2.0)
benchmark (0.4.0)
benchmark-ips (2.11.0)
benchmark-malloc (0.2.0)
benchmark-memory (0.2.0)
@ -1514,20 +1517,20 @@ GEM
rackup (1.0.1)
rack (< 3)
webrick
rails (7.1.4.2)
actioncable (= 7.1.4.2)
actionmailbox (= 7.1.4.2)
actionmailer (= 7.1.4.2)
actionpack (= 7.1.4.2)
actiontext (= 7.1.4.2)
actionview (= 7.1.4.2)
activejob (= 7.1.4.2)
activemodel (= 7.1.4.2)
activerecord (= 7.1.4.2)
activestorage (= 7.1.4.2)
activesupport (= 7.1.4.2)
rails (7.1.5.1)
actioncable (= 7.1.5.1)
actionmailbox (= 7.1.5.1)
actionmailer (= 7.1.5.1)
actionpack (= 7.1.5.1)
actiontext (= 7.1.5.1)
actionview (= 7.1.5.1)
activejob (= 7.1.5.1)
activemodel (= 7.1.5.1)
activerecord (= 7.1.5.1)
activestorage (= 7.1.5.1)
activesupport (= 7.1.5.1)
bundler (>= 1.15.0)
railties (= 7.1.4.2)
railties (= 7.1.5.1)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
@ -1542,9 +1545,9 @@ GEM
rails-i18n (7.0.10)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 8)
railties (7.1.4.2)
actionpack (= 7.1.4.2)
activesupport (= 7.1.4.2)
railties (7.1.5.1)
actionpack (= 7.1.5.1)
activesupport (= 7.1.5.1)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
@ -1735,6 +1738,7 @@ GEM
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
sd_notify (0.1.1)
securerandom (0.4.1)
seed-fu (2.3.7)
activerecord (>= 3.1)
activesupport (>= 3.1)
@ -2280,7 +2284,7 @@ DEPENDENCIES
rack-oauth2 (~> 2.2.1)
rack-proxy (~> 0.7.7)
rack-timeout (~> 0.7.0)
rails (~> 7.1.4)
rails (~> 7.1.5)
rails-controller-testing
rails-i18n (~> 7.0, >= 7.0.9)
rainbow (~> 3.0)

View File

@ -643,7 +643,7 @@ module Issuable
includes << :project unless notes.projects_loaded?
includes << :system_note_metadata unless notes.system_note_metadata_loaded?
if includes.any?
if persisted? && includes.any?
notes.includes(includes)
else
notes

View File

@ -798,7 +798,9 @@ class Note < ApplicationRecord
def does_not_exceed_notes_limit?
return unless noteable
errors.add(:base, _('Maximum number of comments exceeded')) if noteable.notes.count >= Noteable::MAX_NOTES_LIMIT
notes_count = noteable.persisted? ? noteable.notes.count : noteable.notes.size
errors.add(:base, _('Maximum number of comments exceeded')) if notes_count >= Noteable::MAX_NOTES_LIMIT
end
def noteable_label_url_method

View File

@ -662,6 +662,7 @@ module Gitlab
# Used in app/services/web_hooks/log_execution_service.rb: log_execution
ActiveSupport::TimeWithZone,
ActiveSupport::TimeZone,
ActiveSupport::SafeBuffer,
Gitlab::Color, # https://gitlab.com/gitlab-org/gitlab/-/issues/368844,
Hashie::Array, # https://gitlab.com/gitlab-org/gitlab/-/issues/378089
Hashie::Mash # https://gitlab.com/gitlab-org/gitlab/-/issues/440316

View File

@ -0,0 +1,19 @@
# frozen_string_literal: true
if ::Gitlab.next_rails?
# Override the method to use Set instead of Array:
#
# https://github.com/rails/rails/blob/v7.1.5.1/activemodel/lib/active_model/attribute_methods.rb#L398
#
# Otherwise, the background migrations are very slow.
# Explanation: https://gitlab.com/gitlab-org/gitlab/-/issues/495067#note_2260634049
module ActiveModel
module AttributeMethods
module ClassMethods
def aliases_by_attribute_name
@aliases_by_attribute_name ||= Hash.new { |h, k| h[k] = Set.new }
end
end
end
end
end

View File

@ -77,6 +77,10 @@
- major: 16
minor: 11
- major: 17
minor: 1
comments: "[Conditional stop](https://docs.gitlab.com/ee/update/versions/gitlab_17_changes.html#long-running-pipeline-messages-data-change). Not required by all instances."
- major: 17
minor: 3

View File

@ -69,20 +69,3 @@ By creating dependencies that don't unnecessarily
block each other, your pipelines run as quickly as possible regardless of
pipeline stages, ensuring output (including errors) is available to developers
as quickly as possible.
<!--- start_remove The following content will be removed on remove_date: '2024-12-19' -->
## Needs dependency visualization (deprecated)
WARNING:
This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/336560) in GitLab 17.1
and was [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/156207) in 17.4.
View `needs` relationships in the [full pipeline graph](../pipelines/index.md#group-jobs-by-stage-or-needs-configuration)
instead.
The needs dependency visualization makes it easier to visualize the dependencies
between jobs in a pipeline. This graph displays all the jobs in a pipeline
that need or are needed by other jobs. Jobs with no dependencies are not displayed in this view.
To see the needs visualization, select **Needs** when viewing a pipeline that uses the `needs` keyword.
Selecting a node highlights all the job paths it depends on.
<!--- end_remove -->

View File

@ -31,18 +31,19 @@ To determine your upgrade path:
- [`15.0.5`](versions/gitlab_15_changes.md#1500).
- [`15.1.6`](versions/gitlab_15_changes.md#1510). GitLab instances with multiple web nodes.
- [`15.4.6`](versions/gitlab_15_changes.md#1540).
- [`15.11.13`](versions/gitlab_15_changes.md#15110). The latest GitLab 15.11 release.
- [`15.11.13`](versions/gitlab_15_changes.md#15110).
- GitLab 16 includes the following required upgrade stops:
- [`16.0.9`](versions/gitlab_16_changes.md#1600). Instances with
- [`16.0.10`](versions/gitlab_16_changes.md#1600). Instances with
[lots of users](versions/gitlab_16_changes.md#long-running-user-type-data-change) or
[large pipeline variables history](versions/gitlab_16_changes.md#1610).
- [`16.1.7`](versions/gitlab_16_changes.md#1610). Instances with NPM packages in their package registry.
- [`16.2.10`](versions/gitlab_16_changes.md#1620). Instances with [large pipeline variables history](versions/gitlab_16_changes.md#1630).
- [`16.3.8`](versions/gitlab_16_changes.md#1630).
- [`16.7.z`](versions/gitlab_16_changes.md#1670). The latest GitLab 16.7 release.
- [`16.11.z`](https://gitlab.com/gitlab-org/gitlab/-/releases). The latest GitLab 16.11 release.
- [`16.1.8`](versions/gitlab_16_changes.md#1610). Instances with NPM packages in their package registry.
- [`16.2.11`](versions/gitlab_16_changes.md#1620). Instances with [large pipeline variables history](versions/gitlab_16_changes.md#1630).
- [`16.3.9`](versions/gitlab_16_changes.md#1630).
- [`16.7.10`](versions/gitlab_16_changes.md#1670).
- [`16.11.10`](https://gitlab.com/gitlab-org/gitlab/-/releases).
- GitLab 17 includes the following required upgrade stops:
- [`17.3.z`](versions/gitlab_17_changes.md#1730). The latest GitLab 17.3 release.
- [`17.1.8`](versions/gitlab_17_changes.md#long-running-pipeline-messages-data-change). Instances with large `ci_pipeline_messages` tables.
- [`17.3.7`](versions/gitlab_17_changes.md#1730). The latest GitLab 17.3 release.
- [`17.5.z`](versions/gitlab_17_changes.md#1750). The latest GitLab 17.5 release.
- `17.8.z`. Not yet released.
- `17.11.z`. Not yet released.

View File

@ -366,6 +366,70 @@ The OpenSSL 3 upgrade has been postponed to GitLab 17.7.0.
This is due to a bug.
[Issue 468875](https://gitlab.com/gitlab-org/gitlab/-/issues/468875) has been fixed with GitLab 17.1.2.
### Long-running pipeline messages data change
GitLab 17.1 is a required stop for large GitLab instances with a lot of records in the `ci_pipeline_messages` table.
A data change might take many hours to complete on larger GitLab instances, at a rate of 1.5-2 million records
processed per hour. If your instance is affected:
1. Upgrade to 17.1.
1. [Make sure all batched migrations have completed successfully](../background_migrations.md#batched-background-migrations).
1. Upgrade to 17.2 or 17.3.
To check if you are affected:
1. Start a [database console](../../administration/troubleshooting/postgresql.md#start-a-database-console)
1. Run:
```sql
SELECT relname as table,n_live_tup as rows FROM pg_stat_user_tables
WHERE relname='ci_pipeline_messages' and n_live_tup>1500000;
```
1. If the query returns output with a count for `ci_pipeline_messages` then your
instance meets the threshold for this required stop. Instances reporting `0 rows` can skip
the 17.1 upgrade stop.
GitLab 17.1 introduced a [batched background migration](../background_migrations.md#batched-background-migrations)
that ensures every record in the `ci_pipeline_messages` table has the [correct partitioning key](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/153391).
Partitioning CI tables is expected to provide performance improvements for instances with large amounts of CI data.
The upgrade to GitLab 17.2 runs a `Finalize` migration which ensures the 17.1 background migration is completed,
executing the 17.1 change synchronously during the upgrade if required.
GitLab 17.2 also [adds foreign key database constraints](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/158065)
which require the partitioning key to be populated. The constraints [are validated](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/159571)
as part of the upgrade to GitLab 17.3.
If 17.1 is omitted from the upgrade path (or the 17.1 migration is not complete):
- There is extended downtime for affected instances while the upgrade completes.
- Fixing forward is safe.
- To make the environment available sooner, a Rake task can be used to run the migration:
```shell
sudo gitlab-rake gitlab:background_migrations:finalize[BackfillPartitionIdCiPipelineMessage,ci_pipeline_messages,id,'[]']
```
Until all database migrations are complete, GitLab is likely to be unusable, generating `500` errors, caused by incompatibility between the partly upgraded database schema and the running Sidekiq and Puma processes.
The Linux package (Omnibus) or Docker upgrade is likely to fail
with a time out after an hour:
```plaintext
FATAL: Mixlib::ShellOut::CommandTimeout: rails_migration[gitlab-rails]
[..]
Mixlib::ShellOut::CommandTimeout: Command timed out after 3600s:
```
To fix this:
1. Run the Rake task above to complete the batched migration.
1. [Complete the rest of the timed-out operation](../package/package_troubleshooting.md#mixlibshelloutcommandtimeout-rails_migrationgitlab-rails--command-timed-out-after-3600s). At the end of this process, Sidekiq and Puma are restarted to fix the `500` errors.
Feedback about this conditional stop on the upgrade path can be provided [in the issue](https://gitlab.com/gitlab-org/gitlab/-/issues/503891).
### Geo installations 17.1.0
- In GitLab 16.11 through GitLab 17.2, a missing PostgreSQL index can cause high CPU usage, slow job artifact verification progress, and slow or timed out Geo metrics status updates. The index was added in GitLab 17.3. To manually add the index, see [Geo Troubleshooting - High CPU usage on primary during job artifact verification](../../administration/geo/replication/troubleshooting/common.md#high-cpu-usage-on-primary-during-object-verification).

View File

@ -11,7 +11,7 @@ module Gitlab
::Gitlab::Redis::ClusterUtil.batch_entries(names) do |batched_names|
super(batched_names, **options)
end.reduce(&:merge)
end.reduce({}, &:merge)
end
# `delete_multi_entries` in Rails runs a multi-key `del` command

View File

@ -0,0 +1,26 @@
# frozen_string_literal: true
require 'spec_helper'
if ::Gitlab.next_rails?
RSpec.describe 'ActiveModel::AttributeMethods Patch', feature_category: :database do
before do
load Rails.root.join('config/initializers/active_model_attribute_methods.rb')
end
describe '.aliases_by_attribute_name' do
let(:klass) do
Class.new do
include ActiveModel::AttributeMethods
alias_attribute :id_value, :id
alias_attribute :id_value, :id
end
end
it 'stores the alias attribute only once' do
expect(klass.aliases_by_attribute_name['id'].to_a).to eq(['id_value'])
end
end
end
end

View File

@ -619,8 +619,13 @@ RSpec.describe Gitlab::Database::PartitioningMigrationHelpers::TableManagementHe
context 'when the table is not empty' do
before do
source_model.create!(id: 1, runner_type: 2)
source_model.create!(id: 2, runner_type: 3)
if ::Gitlab.next_rails?
source_model.create!(id: [1, 2])
source_model.create!(id: [2, 3])
else
source_model.create!(id: 1, runner_type: 2)
source_model.create!(id: 2, runner_type: 3)
end
end
let(:opts) { {} }

View File

@ -108,7 +108,7 @@ RSpec.describe Gitlab::Diff::Line do
context 'when has plain text only' do
before do
line.text = '+added'.html_safe
line.text = '+added'
end
it 'returns unprefixed plain text' do

View File

@ -128,7 +128,7 @@ RSpec.describe Note, feature_category: :team_planning do
end
context 'when creating a user note' do
subject { build(:note, project: noteable.project, noteable: noteable) }
subject { build(:note, project: noteable.project, noteable: noteable.reload) }
it { is_expected.not_to be_valid }
end

View File

@ -6,7 +6,7 @@ RSpec.shared_examples 'setting CSP' do |rule_name|
shared_context 'csp config' do |csp_rule|
before do
csp = ActionDispatch::ContentSecurityPolicy.new do |p|
p.send(csp_rule, default_csp_values) if csp_rule
p.send(csp_rule, *default_csp_values.split(' ')) if csp_rule
end
expect_next_instance_of(extended_controller_class) do |controller|