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

Fix logging early errors from goroutines and panic with custom Kubeconfig #1088

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

pkosiec
Copy link
Member

@pkosiec pkosiec commented Jun 13, 2023

Description

Changes proposed in this pull request:

  • Always log early errors from goroutines
  • Ensure Cloud Slack doesn't return error on exiting Botkube OS
  • Fix panic when using custom Kubeconfig
  • Ensure Botkube dev version is valid Semver one (for dev purpose when used with remote config)

Testing

You can try to add an error in one of goroutines and see if it is properly logged. For example, with Cloud Slack invalid auth:

INFO[2023-06-13T13:19:08+02:00] Skipping waiting for Config Watcher sync...   component="Config Watcher Sync"
INFO[2023-06-13T13:19:08+02:00] Starting...                                   component="Config Updater"
INFO[2023-06-13T13:19:08+02:00] Shutdown requested. Finishing...              component="Health server"
INFO[2023-06-13T13:19:08+02:00] Shutdown requested. Finishing...              component="Config Updater"
INFO[2023-06-13T13:19:08+02:00] Shutdown requested. Finishing...              component="Metrics server"
INFO[2023-06-13T13:19:08+02:00] plugin process exited                         path=/tmp/botkube/source_v0.0.0-latest_kubernetes pid=19261 plugin=botkube/kubernetes
INFO[2023-06-13T13:19:08+02:00] plugin process exited                         path=/tmp/botkube/executor_v0.0.0-latest_kubectl pid=19260 plugin=botkube/kubectl
DEBU[2023-06-13T13:19:08+02:00] Reporting...                                  component=GraphQLStatusReporter deploymentID=074e325a-0dc7-4c9f-8d35-879ee5df4196 resourceVersion=40 type=failure
DEBU[2023-06-13T13:19:09+02:00] Reporting successful.                         component=GraphQLStatusReporter deploymentID=074e325a-0dc7-4c9f-8d35-879ee5df4196 resourceVersion=40 type=failure
ERRO[2023-06-13T13:19:09+02:00] while waiting for goroutines to finish gracefully: while receiving cloud slack events: rpc error: code = Unknown desc = invalid API key
2023/06/13 13:19:09 while sending initial help message: while getting the help data: while getting the Config Map: Get "https://35.185.103.213/api/v1/namespaces/botkube/configmaps/botkube-system": context canceled
exit status 1

@pkosiec pkosiec added the bug Something isn't working label Jun 13, 2023
@pkosiec pkosiec force-pushed the workaround-log-issue branch 3 times, most recently from 6ca9700 to 7dfafe8 Compare June 13, 2023 11:16
@pkosiec pkosiec marked this pull request as ready for review June 13, 2023 11:16
@pkosiec pkosiec requested review from a team and PrasadG193 as code owners June 13, 2023 11:16
@pkosiec pkosiec changed the title Workaround logging Fix logging early errors from goroutines and panic with custom Kubeconfig Jun 13, 2023
@pkosiec pkosiec added this to the v1.1.0 milestone Jun 13, 2023
Copy link

@josefkarasek josefkarasek left a comment

Choose a reason for hiding this comment

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

lgtm 👍

@pkosiec pkosiec merged commit 428e624 into kubeshop:main Jun 13, 2023
@pkosiec pkosiec deleted the workaround-log-issue branch June 13, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants