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

Display error in "Finished building block" only if error. #14722

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

Conversation

nalepae
Copy link
Contributor

@nalepae nalepae commented Dec 13, 2024

What type of PR is this?
Other

What does this PR do? Why is it needed?
When building a block, display the error only if not nil.

Before:

INFO rpc/validator: Finished building block err=None sinceSlotStartTime=0.121271s slot=60 validator=19

After:

INFO rpc/validator: Begin building block sinceSlotStartTime=0.080358s slot=2

Acknowledgements

  • I have read CONTRIBUTING.md.
  • I have made an appropriate entry to CHANGELOG.md.
  • I have added a description to this PR with sufficient context for reviewers to understand this PR.

@nalepae nalepae requested a review from a team as a code owner December 13, 2024 14:57
@nalepae nalepae requested review from kasey, potuz and rkapka December 13, 2024 14:57
@prestonvanloon
Copy link
Member

prestonvanloon commented Dec 13, 2024

Please see the discussion in #14696

I was against having an entirely different log message when there is an error. If i'm using log messages to extract data about how long block production is taking (success OR failure) then this PR makes that job harder.

Edit: OK it's not different at all. I misread it. Sure, this is OK. Thanks

@nalepae nalepae added this pull request to the merge queue Dec 13, 2024
if err != nil {
log.WithError(err).Error("Finished building block")
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the error path still say Finished building block? I think something like Could not build block/Failed to build block would be more appropriate

Copy link
Contributor

Choose a reason for hiding this comment

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

I take it back. The log level makes it clear there was an error

@nalepae nalepae removed this pull request from the merge queue due to a manual request Dec 13, 2024
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