Skip to content

Commit

Permalink
Merge pull request #3016 from zendesk/grosser/snap
Browse files Browse the repository at this point in the history
snapshot time for log printing so it is consistent for all pods
  • Loading branch information
grosser authored Oct 23, 2018
2 parents 971eb81 + 6871937 commit a775423
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/kubernetes/app/models/kubernetes/deploy_executor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def fetch_pods

def show_logs_on_deploy_if_requested(statuses)
pods = statuses.map(&:pod).compact.select { |p| p.annotations[:'samson/show_logs_on_deploy'] == 'true' }
pods.each { |pod| print_pod_details(pod, Time.now, events: false) }
log_end = Time.now # here to be consistent for all pods
pods.each { |pod| print_pod_details(pod, log_end, events: false) }
rescue StandardError
info = ErrorNotifier.notify($!, sync: true)
@output.puts "Error showing logs: #{info}"
Expand Down

0 comments on commit a775423

Please sign in to comment.