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

k8s: use unique error messages #385

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

mdonadoni
Copy link
Member

This commit changes the error messages used to log k8s API errors so
that each of them is unique. This will help to debug #383.

This commit changes the error messages used to log k8s API errors so
that each of them is unique. This will help to debug reanahub#383.
@@ -276,7 +276,7 @@ def watch_jobs(self, job_db, app=None):
:param job_db: Dictionary which contains all current jobs.
"""
while True:
logging.debug("Starting a new stream request to watch Jobs")
logging.info("Starting a new stream request to watch Jobs")
Copy link
Member

Choose a reason for hiding this comment

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

Is the change from "debug" to "info" intended on purpose?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, in this way we can check that when an error occurs the job monitor correctly restarts. Otherwise we would only see the error message, without knowing whether another "watch" request has been made to the Kubernetes API

@tiborsimko tiborsimko merged commit 01c7ed9 into reanahub:master Feb 27, 2023
@mdonadoni mdonadoni deleted the improve-logging branch March 1, 2023 15:09
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