Skip to content

Commit

Permalink
Merge pull request #660 from powerhome/global-timeout
Browse files Browse the repository at this point in the history
Prints the correct argument name in error message
  • Loading branch information
dturn committed Dec 23, 2019
2 parents db1734e + 077d10d commit 13f0434
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## next

*Bug Fixes*
- Prints the correct argument name in error message. [#670](https://github.com/Shopify/krane/pull/670)

## 1.1.0

*Bug Fixes*
Expand Down
2 changes: 1 addition & 1 deletion lib/krane/kubernetes_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def debug_message(cause = nil, info_hash = {})
if cause == :gave_up
debug_heading = ColorizedString.new("#{id}: GLOBAL WATCH TIMEOUT (#{info_hash[:timeout]} seconds)").yellow
helpful_info << "If you expected it to take longer than #{info_hash[:timeout]} seconds for your deploy"\
" to roll out, increase --max-watch-seconds."
" to roll out, increase --global-timeout."
elsif deploy_failed?
debug_heading = ColorizedString.new("#{id}: FAILED").red
helpful_info << failure_message if failure_message.present?
Expand Down
2 changes: 1 addition & 1 deletion test/integration/global_deploy_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_global_deploy_task_success_timeout
"Result: TIMED OUT",
"Timed out waiting for 2 resources to deploy",
%r{StorageClass\/testing-storage-class[\w-]+: GLOBAL WATCH TIMEOUT \(0 seconds\)},
"If you expected it to take longer than 0 seconds for your deploy to roll out, increase --max-watch-seconds.",
"If you expected it to take longer than 0 seconds for your deploy to roll out, increase --global-timeout.",
])
end

Expand Down
2 changes: 1 addition & 1 deletion test/integration/krane_deploy_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ def test_resource_watcher_raises_after_timeout_seconds
"Successful resources",
"Service/multi-replica",
"Deployment/undying: GLOBAL WATCH TIMEOUT (5 seconds)",
"If you expected it to take longer than 5 seconds for your deploy to roll out, increase --max-watch-seconds.",
"If you expected it to take longer than 5 seconds for your deploy to roll out, increase --global-timeout.",
], in_order: true)
end

Expand Down

0 comments on commit 13f0434

Please sign in to comment.