Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prints the correct argument name in error message #660

Merged
merged 1 commit into from
Dec 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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