-
Notifications
You must be signed in to change notification settings - Fork 3
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
Decrease number of logs during cnf_install and cnf_uninstall #15
base: main
Are you sure you want to change the base?
Conversation
- Commit updated shard.lock after running 'shards install' - Add new constant for repeated logs interval Signed-off-by: Rafal Lal <[email protected]>
@@ -1059,32 +1059,36 @@ module KubectlClient | |||
is_ready = resource_ready?(kind, namespace, resource_name, kubeconfig) | |||
|
|||
until is_ready || second_count > wait_count | |||
Log.info { "KubectlClient::Get.resource_wait_for_install attempt: #{second_count}; is_ready: #{is_ready}" } | |||
if second_count % RESOURCE_WAIT_LOG_INTERVAL == 0 | |||
Log.info { "KubectlClient::Get.resource_wait_for_install seconds elapsed: #{second_count}; is_ready: #{is_ready}" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be scoped through Log.for
instead with a clearer message? The KubectlClient::Get.resource_wait_for_install
part is a bit jarring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working on the log refactor in other PR, wanted to post a quick fix here.
until (resource_uninstalled && resource_uninstalled.as_h == empty_hash) || second_count > wait_count | ||
Log.info { "second_count = #{second_count}" } | ||
if second_count % RESOURCE_WAIT_LOG_INTERVAL == 0 | ||
Log.info { "KubectlClient::Get.resource_wait_for_uninstall seconds elapsed: #{second_count}" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small PR that addresses looped logs during cnf install.