Merge branch 'decode-log-postreceive-args' into 'master'
Log base64-decoded PostReceive arguments The change to base64-encoding the third argument to PostReceive in gitlab-shell made our Sidekiq ArgumentsLogger a little less useful. This change adds decoded data to the log statement. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/20381 See merge request !5547
This commit is contained in:
commit
8bce4a3fde
2 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,10 @@ class PostReceive
|
|||
log("Check gitlab.yml config for correct repositories.storages values. No repository storage path matches \"#{repo_path}\"")
|
||||
end
|
||||
|
||||
changes = Base64.decode64(changes) unless changes.include?(' ')
|
||||
# Use Sidekiq.logger so arguments can be correlated with execution
|
||||
# time and thread ID's.
|
||||
Sidekiq.logger.info "changes: #{changes.inspect}" if ENV['SIDEKIQ_LOG_ARGUMENTS']
|
||||
post_received = Gitlab::GitPostReceive.new(repo_path, identifier, changes)
|
||||
|
||||
if post_received.project.nil?
|
||||
|
|
|
@ -39,7 +39,6 @@ module Gitlab
|
|||
end
|
||||
|
||||
def deserialize_changes(changes)
|
||||
changes = Base64.decode64(changes) unless changes.include?(' ')
|
||||
changes = utf8_encode_changes(changes)
|
||||
changes.lines
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue