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

Wrap RPC errors #12638

Merged
merged 5 commits into from
Apr 26, 2024
Merged

Wrap RPC errors #12638

merged 5 commits into from
Apr 26, 2024

Conversation

dhaidashenko
Copy link
Collaborator

@dhaidashenko dhaidashenko commented Mar 29, 2024

Ticket

  • Wrap all RPC related errors to simplify filtering
  • Include RPC name into the error to simplify linking to the health checks
  • Format SendTxErrorCodes to make CRIT error msg more self explanatory

Copy link
Contributor

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset.

@dhaidashenko dhaidashenko marked this pull request as ready for review March 29, 2024 16:47
@dhaidashenko dhaidashenko requested a review from a team as a code owner March 29, 2024 16:47
@dhaidashenko dhaidashenko requested a review from a team March 29, 2024 16:48
return s
}

func (s *subErrorWrapper) close() {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to close the unSub chan?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, we should not close unSub, as it might cause panic on the callers side if it calls Unsubscribe. Example. There is no guarantee that we won't try writing into unsub, even if done is closed.
Also we are not leaking resources. As soon as subErrorWrapper is closed, we won't have any additional reference to the unsub, so when GC collects subErrorWrapper it will also collect unsub.

HelloKashif
HelloKashif previously approved these changes Apr 3, 2024
Copy link
Contributor

@HelloKashif HelloKashif left a comment

Choose a reason for hiding this comment

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

@dhaidashenko looks good to me. Just one thing to confirm:
If I want to filter out all RPC related errors I need to exclude messages prefixed with RPCClient returned error... correct?

Copy link
Contributor

I see you added a changeset file but it does not contain a tag. Please edit the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@prashantkumar1982 prashantkumar1982 added this pull request to the merge queue Apr 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 25, 2024
@prashantkumar1982 prashantkumar1982 added this pull request to the merge queue Apr 26, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 26, 2024
@prashantkumar1982 prashantkumar1982 added this pull request to the merge queue Apr 26, 2024
Merged via the queue into develop with commit bcf7653 Apr 26, 2024
106 checks passed
@prashantkumar1982 prashantkumar1982 deleted the feature/BCI-2666-tag-rpc-errors branch April 26, 2024 16:43
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.

4 participants