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

Decrease number of logs during cnf_install and cnf_uninstall #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rafal-lal
Copy link
Collaborator

Small PR that addresses looped logs during cnf install.

  • Commit updated shard.lock after running 'shards install'
  • Add new constant for repeated logs interval

- 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}" }
Copy link

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.

Copy link
Collaborator Author

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}" }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants