diff --git a/ee/lib/gitlab/checks/secret_push_protection/payload_processor.rb b/ee/lib/gitlab/checks/secret_push_protection/payload_processor.rb index d0a7efa7b105e712b5b18ca1c6db5471ab2fd5e5..90578ea65d9e7e9ef33d51dc168cbadec2172b61 100644 --- a/ee/lib/gitlab/checks/secret_push_protection/payload_processor.rb +++ b/ee/lib/gitlab/checks/secret_push_protection/payload_processor.rb @@ -205,7 +205,7 @@ def diff_blobs_with_raw_info(paths_slice) # old_path should only be set for file renames. # Remove this code when addressing https://gitlab.com/gitlab-org/gitlab/-/issues/568266 - params[:old_path] = path.old_path if path.old_path != path.path + params[:old_path] = path.old_path if path.status == :RENAMED Gitaly::ChangedPaths.new(params) end @@ -217,7 +217,9 @@ def diff_blobs_with_raw_info(paths_slice) ).to_a rescue StandardError secret_detection_logger.error( - "diff_blobs_with_raw_info Gitaly call failed with args: #{raw_info_data.map(&:inspect)}" + "diff_blobs_with_raw_info Gitaly call failed. " \ + "args: #{raw_info_data.map(&:inspect)} " \ + "paths: #{paths_slice.map(&:inspect)}" ) raise end diff --git a/ee/spec/lib/gitlab/checks/secret_push_protection/payload_processor_spec.rb b/ee/spec/lib/gitlab/checks/secret_push_protection/payload_processor_spec.rb index 7964af55db0dda423231c2e06d597eb6cd062782..bd8f0cfa013d9befd02ae1715f8d486ae27b6194 100644 --- a/ee/spec/lib/gitlab/checks/secret_push_protection/payload_processor_spec.rb +++ b/ee/spec/lib/gitlab/checks/secret_push_protection/payload_processor_spec.rb @@ -67,7 +67,7 @@ it 'logs the failing arguments and re-raises the error' do expect(secret_detection_logger).to receive(:error).with( - a_string_starting_with("diff_blobs_with_raw_info Gitaly call failed with args:") + a_string_starting_with("diff_blobs_with_raw_info Gitaly call failed.") ) expect { payload_processor.standardize_payloads }.to raise_error(GRPC::Internal)