From 37d5cece3603d8df9f75c507594e70dade80c99f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 1 Dec 2021 09:51:31 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-5-stable-ee --- lib/gitlab/checks/branch_check.rb | 1 + .../patch/action_cable_subscription_adapter_identifier.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 lib/gitlab/patch/action_cable_subscription_adapter_identifier.rb (limited to 'lib') diff --git a/lib/gitlab/checks/branch_check.rb b/lib/gitlab/checks/branch_check.rb index cfff6e919dc..237a6bbb0f2 100644 --- a/lib/gitlab/checks/branch_check.rb +++ b/lib/gitlab/checks/branch_check.rb @@ -40,6 +40,7 @@ module Gitlab private def prohibited_branch_checks + return if deletion? return unless Feature.enabled?(:prohibit_hexadecimal_branch_names, project, default_enabled: true) if branch_name =~ /\A\h{40}\z/ diff --git a/lib/gitlab/patch/action_cable_subscription_adapter_identifier.rb b/lib/gitlab/patch/action_cable_subscription_adapter_identifier.rb new file mode 100644 index 00000000000..e7ac562d844 --- /dev/null +++ b/lib/gitlab/patch/action_cable_subscription_adapter_identifier.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# Modifies https://github.com/rails/rails/blob/v6.1.4.1/actioncable/lib/action_cable/subscription_adapter/base.rb so +# that we do not overwrite an id that was explicitly set to `nil` in cable.yml. +# This is needed to support GCP Memorystore. See https://github.com/rails/rails/issues/38244. + +module Gitlab + module Patch + module ActionCableSubscriptionAdapterIdentifier + def identifier + @server.config.cable.has_key?(:id) ? @server.config.cable[:id] : super # rubocop:disable Gitlab/ModuleWithInstanceVariables + end + end + end +end -- cgit v1.2.3