Skip to content

FIX gracefully handle logging exceptions in Argus and Colossus#4963

Merged
mnaamani merged 2 commits intoJoystream:masterfrom
zeeshanakram3:fix-logging-exceptions
Nov 10, 2023
Merged

FIX gracefully handle logging exceptions in Argus and Colossus#4963
mnaamani merged 2 commits intoJoystream:masterfrom
zeeshanakram3:fix-logging-exceptions

Conversation

@zeeshanakram3
Copy link
Copy Markdown
Contributor

Context

As reported by @kdembler the Distributor node crashed with restarting the ES node, or if providing the wrong credentials. This happened because the code was not gracefully the exceptions

Fix

This PR gracefully handles logging exceptions in Argus and Colossus

@@ -50,7 +50,7 @@
"url-join": "^4.0.1",
"winston": "^3.3.3",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we maybe bump winston as well while we're at it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok. I tried to update the winston to the most recent version and it turned out that it contains breaking changes (so will have to update code at couple of places). So unless we absolutely want to update the dependency, I would say it's fine for now. WDYT?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes, let's ignore in that case

Copy link
Copy Markdown
Collaborator

@kdembler kdembler left a comment

Choose a reason for hiding this comment

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

For some weird reason I can't get it to connect to local ES when developing, but seems that was also the case for me before this PR.

That said, tested with public ES and it indeed caught the exception and didn't crash on failed write, so all good, thanks!

@mnaamani mnaamani self-requested a review November 10, 2023 19:07
@mnaamani mnaamani merged commit 1289bab into Joystream:master Nov 10, 2023
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.

3 participants