-
Notifications
You must be signed in to change notification settings - Fork 41
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
Enhance logs in mithril-signer and mithril-persistence #1992
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alenar
force-pushed
the
djo/1981/enhance_logs_in_signer
branch
from
October 9, 2024 14:48
871be9c
to
02cd14d
Compare
Alenar
temporarily deployed
to
testing-sanchonet
October 9, 2024 14:56 — with
GitHub Actions
Inactive
Alenar
force-pushed
the
djo/1981/enhance_logs_in_signer
branch
from
October 9, 2024 15:06
02cd14d
to
25769a2
Compare
Alenar
temporarily deployed
to
testing-sanchonet
October 9, 2024 15:14 — with
GitHub Actions
Inactive
sfauvel
approved these changes
Oct 9, 2024
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.
LGTM
dlachaume
approved these changes
Oct 9, 2024
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.
LGTM 🚀
jpraynaud
approved these changes
Oct 10, 2024
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.
LGTM 👍
Each service now create a child logger that's tagged with its name so we can know more easily the source of a log. This allow to remove `slog_scope` from the main dependencies (its still used by the integration tests).
Since now each logs are tagged with their source component.
+ add some logs in the connection builder + remove unneeded 'slog-*' dependencies
Instead of the default `slog-rs`.
And instead add them to a property. This allow to keep the main log messages leans while still providing detailed errors info.
* Always include the status code text in the issued error, this should add more context when the response text is empty. * When the response contains json: try to parse ideally as a `ClientError` or `ServerError` to use their properties, if of an unknown type it will output all the json key/value pairs as a fallback.
Alenar
force-pushed
the
djo/1981/enhance_logs_in_signer
branch
from
October 10, 2024 10:33
25769a2
to
be2657a
Compare
* mithril-persistence from `0.2.27` to `0.2.28` * mithril-signer from `0.2.195` to `0.2.196`
Alenar
temporarily deployed
to
testing-preview
October 10, 2024 11:37 — with
GitHub Actions
Inactive
Alenar
temporarily deployed
to
testing-sanchonet
October 10, 2024 11:37 — with
GitHub Actions
Inactive
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Content
This PR refactor the log usage in
mithril-signer
andmithril-persistence
:slog_scope
to enforce the usage of a name tagged child logger (only kept in the integration tests).slog-rs
tomithril-signer
.Also this PR enhance errors issued by the signer
AggregatorClient
when there's an http error:ClientError
orServerError
(returned by the aggregator with 4xx and 5xx errors respectively). There's fallback in case of unknown format.Also this PR fix an issue when registering a signature: if the aggregator returned a 202 (Accepted) status code it was handled as an error, making the state machine fail its cycle.
Pre-submit checklist
Issue(s)
Relates to #1981