diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-08-08 17:39:48 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-08-08 17:39:48 +0000 |
commit | 8bce4a3fde12435ad50e5c8f0c43c238cdee3e24 (patch) | |
tree | 357a7c04f58ad15e07bfa89fe1d2761ebba3a852 /app/workers | |
parent | 59ce1af53b8d25d1b4ae8b6e59f069c5147ca572 (diff) | |
parent | c74005e75cf29eb14d2e9f5a2c3744b6e06ded0a (diff) | |
download | gitlab-ce-8bce4a3fde12435ad50e5c8f0c43c238cdee3e24.tar.gz |
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
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/post_receive.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/workers/post_receive.rb b/app/workers/post_receive.rb index 09035a7cf2d..a9a2b716005 100644 --- a/app/workers/post_receive.rb +++ b/app/workers/post_receive.rb @@ -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? |